From 8a1a55ab8dd77a59094dbb49ac0a0043620d0bed Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Fri, 17 Jul 2026 16:04:13 +0000 Subject: [PATCH] Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', SDK Release Type: stable, and CommitSHA: '0ba9ed818bc5bd36e877ad025777534adf8b62ae' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6579762 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- sdk/netapp/azure-mgmt-netapp/CHANGELOG.md | 8 + sdk/netapp/azure-mgmt-netapp/_metadata.json | 10 +- sdk/netapp/azure-mgmt-netapp/api.md | 12869 ++++---- sdk/netapp/azure-mgmt-netapp/api.metadata.yml | 4 +- .../azure-mgmt-netapp/apiview-properties.json | 205 +- .../azure/mgmt/netapp/_client.py | 59 +- .../azure/mgmt/netapp/_configuration.py | 9 +- .../azure/mgmt/netapp/_utils/model_base.py | 19 +- .../azure/mgmt/netapp/_version.py | 2 +- .../azure/mgmt/netapp/aio/_client.py | 61 +- .../azure/mgmt/netapp/aio/_configuration.py | 9 +- .../mgmt/netapp/aio/operations/__init__.py | 18 - .../mgmt/netapp/aio/operations/_operations.py | 10594 +------ .../azure/mgmt/netapp/models/__init__.py | 174 - .../azure/mgmt/netapp/models/_enums.py | 240 +- .../azure/mgmt/netapp/models/_models.py | 6437 +--- .../azure/mgmt/netapp/operations/__init__.py | 18 - .../mgmt/netapp/operations/_operations.py | 26310 +++++----------- .../azure/mgmt/netapp/types.py | 3607 +++ .../accounts_change_key_vault.py | 2 +- .../accounts_create_or_update.py | 2 +- .../accounts_create_or_update_ad.py | 4 +- .../accounts_create_or_update_ldap_config.py | 62 - .../generated_samples/accounts_delete.py | 2 +- .../generated_samples/accounts_get.py | 2 +- ...counts_get_change_key_vault_information.py | 2 +- .../generated_samples/accounts_list.py | 2 +- .../accounts_list_by_subscription.py | 2 +- .../accounts_refresh_ldap_bind_password.py | 41 - .../accounts_renew_credentials.py | 2 +- .../accounts_transition_encryption_key.py | 2 +- .../generated_samples/accounts_update.py | 2 +- ...tive_directory_configs_create_or_update.py | 73 - .../active_directory_configs_delete.py | 41 - .../active_directory_configs_get.py | 42 - ...irectory_configs_list_by_resource_group.py | 42 - ..._directory_configs_list_by_subscription.py | 40 - .../active_directory_configs_update.py | 43 - .../backup_policies_create.py | 2 +- .../backup_policies_delete.py | 2 +- .../generated_samples/backup_policies_get.py | 2 +- .../generated_samples/backup_policies_list.py | 2 +- .../backup_policies_update.py | 2 +- .../generated_samples/backup_vaults_create.py | 2 +- .../generated_samples/backup_vaults_delete.py | 2 +- .../generated_samples/backup_vaults_get.py | 2 +- .../generated_samples/backup_vaults_list.py | 2 +- .../generated_samples/backup_vaults_update.py | 2 +- .../backups_under_account_migrate.py | 2 +- .../backups_under_backup_vault_create.py | 2 +- .../backups_under_backup_vault_delete.py | 2 +- .../backups_under_backup_vault_get.py | 2 +- ....py => backups_under_backup_vault_list.py} | 4 +- ..._under_backup_vault_single_file_restore.py | 2 +- .../backups_under_backup_vault_update.py | 2 +- .../backups_under_volume_migrate.py | 2 +- .../buckets_create_or_update.py | 2 +- .../buckets_create_or_update_with_akv.py | 5 +- .../generated_samples/buckets_delete.py | 2 +- .../buckets_generate_akv_credentials.py | 2 +- .../buckets_generate_credentials.py | 2 +- .../generated_samples/buckets_get.py | 2 +- .../generated_samples/buckets_list.py | 2 +- .../buckets_refresh_certificate.py | 2 +- .../generated_samples/buckets_update.py | 2 +- .../buckets_update_with_akv.py | 5 +- .../caches_create_or_update.py | 2 +- .../generated_samples/caches_delete.py | 2 +- .../generated_samples/caches_get.py | 2 +- .../generated_samples/caches_list.py | 2 +- .../caches_list_peering_passphrases.py | 2 +- .../generated_samples/caches_pool_change.py | 2 +- .../caches_reset_smb_password.py | 2 +- .../generated_samples/caches_update.py | 2 +- .../check_file_path_availability.py | 6 +- .../check_name_availability.py | 2 +- .../check_quota_availability.py | 2 +- .../elastic_accounts_create_or_update.py | 43 - .../elastic_accounts_delete.py | 41 - .../generated_samples/elastic_accounts_get.py | 42 - ...elastic_accounts_list_by_resource_group.py | 42 - .../elastic_accounts_list_by_subscription.py | 40 - .../elastic_accounts_update.py | 43 - ...lastic_backup_policies_create_or_update.py | 52 - .../elastic_backup_policies_delete.py | 42 - .../elastic_backup_policies_get.py | 43 - .../elastic_backup_policies_list.py | 43 - .../elastic_backup_policies_update.py | 51 - .../elastic_backup_vaults_create.py | 44 - .../elastic_backup_vaults_delete.py | 42 - .../elastic_backup_vaults_get.py | 43 - ...c_backup_vaults_list_by_elastic_account.py | 43 - .../elastic_backup_vaults_update.py | 44 - .../elastic_backups_create_or_update.py | 53 - .../elastic_backups_delete.py | 43 - .../generated_samples/elastic_backups_get.py | 44 - .../elastic_backups_list_by_vault.py | 44 - .../elastic_backups_update.py | 72 - .../elastic_capacity_pools_change_zone.py | 44 - ...ols_check_volume_file_path_availability.py | 44 - ...elastic_capacity_pools_create_or_update.py | 54 - ...tic_capacity_pools_create_or_update_cmk.py | 58 - .../elastic_capacity_pools_delete.py | 42 - .../elastic_capacity_pools_get.py | 43 - ..._capacity_pools_list_by_elastic_account.py | 43 - .../elastic_capacity_pools_update.py | 50 - ...stic_snapshot_policies_create_or_update.py | 53 - .../elastic_snapshot_policies_delete.py | 42 - .../elastic_snapshot_policies_get.py | 43 - ...apshot_policies_list_by_elastic_account.py | 43 - ..._snapshot_policies_list_elastic_volumes.py | 44 - .../elastic_snapshot_policies_update.py | 52 - .../elastic_snapshots_create_or_update.py | 59 - .../elastic_snapshots_delete.py | 44 - .../elastic_snapshots_get.py | 45 - ...lastic_snapshots_list_by_elastic_volume.py | 45 - .../elastic_volumes_create_or_update.py | 75 - .../elastic_volumes_delete.py | 43 - .../generated_samples/elastic_volumes_get.py | 44 - .../elastic_volumes_list_by_elastic_pool.py | 44 - .../elastic_volumes_revert.py | 48 - .../elastic_volumes_update.py | 66 - .../group_id_list_for_ldap_user.py | 2 +- ...t_app_resource_quota_limits_account_get.py | 2 +- ..._app_resource_quota_limits_account_list.py | 2 +- .../net_app_resource_quota_limits_get.py | 2 +- .../net_app_resource_quota_limits_list.py | 2 +- .../network_sibling_set_query.py | 4 +- .../network_sibling_set_update.py | 4 +- .../generated_samples/operation_list.py | 2 +- .../pools_create_or_update.py | 2 +- ...ools_create_or_update_custom_throughput.py | 2 +- .../generated_samples/pools_delete.py | 2 +- .../generated_samples/pools_get.py | 2 +- .../pools_get_custom_throughput.py | 2 +- .../generated_samples/pools_list.py | 2 +- .../generated_samples/pools_update.py | 2 +- .../pools_update_custom_throughput.py | 2 +- .../ransomware_reports_clear_suspects.py | 2 +- .../ransomware_reports_get.py | 2 +- .../ransomware_reports_list.py | 2 +- .../generated_samples/region_info.py | 2 +- .../generated_samples/region_infos_get.py | 2 +- .../generated_samples/region_infos_list.py | 2 +- .../snapshot_policies_create.py | 2 +- .../snapshot_policies_delete.py | 2 +- .../snapshot_policies_get.py | 2 +- .../snapshot_policies_list.py | 2 +- .../snapshot_policies_list_volumes.py | 2 +- .../snapshot_policies_update.py | 2 +- .../generated_samples/snapshots_create.py | 2 +- .../generated_samples/snapshots_delete.py | 2 +- .../generated_samples/snapshots_get.py | 2 +- .../generated_samples/snapshots_list.py | 2 +- .../snapshots_single_file_restore.py | 2 +- .../generated_samples/snapshots_update.py | 2 +- .../generated_samples/subvolumes_create.py | 2 +- .../generated_samples/subvolumes_delete.py | 2 +- .../generated_samples/subvolumes_get.py | 2 +- .../generated_samples/subvolumes_list.py | 2 +- .../generated_samples/subvolumes_metadata.py | 2 +- .../generated_samples/subvolumes_update.py | 2 +- .../generated_samples/usages_get.py | 2 +- .../generated_samples/usages_list.py | 2 +- .../volume_groups_create_custom.py | 464 - .../volume_groups_create_custom_smb.py | 284 - .../volume_groups_create_oracle.py | 2 +- .../volume_groups_create_sap_hana.py | 2 +- .../generated_samples/volume_groups_delete.py | 2 +- .../volume_groups_get_custom.py | 43 - .../volume_groups_get_custom_smb.py | 43 - .../volume_groups_get_oracle.py | 2 +- .../volume_groups_get_sap_hana.py | 2 +- .../volume_groups_list_custom.py | 43 - .../volume_groups_list_oracle.py | 2 +- .../volume_groups_list_sap_hana.py | 2 +- .../volume_quota_rules_create.py | 2 +- .../volume_quota_rules_delete.py | 2 +- .../volume_quota_rules_get.py | 2 +- .../volume_quota_rules_list.py | 2 +- .../volume_quota_rules_update.py | 2 +- .../volumes_authorize_external_replication.py | 2 +- .../volumes_authorize_replication.py | 2 +- .../volumes_break_file_locks.py | 2 +- .../volumes_break_replication.py | 2 +- .../volumes_create_or_update.py | 4 +- .../generated_samples/volumes_delete.py | 2 +- .../volumes_delete_replication.py | 2 +- .../volumes_extra_large_volumes_get.py | 44 - .../volumes_extra_large_volumes_list.py | 44 - .../volumes_finalize_external_replication.py | 2 +- .../volumes_finalize_relocation.py | 2 +- .../generated_samples/volumes_get.py | 2 +- .../volumes_latest_backup_status.py | 2 +- .../volumes_latest_restore_status.py | 2 +- .../generated_samples/volumes_list.py | 2 +- .../volumes_list_quota_report.py | 2 +- .../volumes_list_replications.py | 2 +- .../volumes_peer_external_cluster.py | 2 +- .../volumes_perform_replication_transfer.py | 2 +- .../generated_samples/volumes_pool_change.py | 2 +- .../volumes_populate_availability_zones.py | 2 +- .../volumes_re_initialize_replication.py | 2 +- .../volumes_reestablish_replication.py | 2 +- .../generated_samples/volumes_relocate.py | 2 +- .../volumes_replication_status.py | 2 +- .../volumes_reset_cifs_password.py | 2 +- .../volumes_resync_replication.py | 2 +- .../generated_samples/volumes_revert.py | 2 +- .../volumes_revert_relocation.py | 2 +- .../generated_samples/volumes_split_clone.py | 2 +- .../generated_samples/volumes_update.py | 2 +- ..._net_app_management_accounts_operations.py | 66 +- ...pp_management_accounts_operations_async.py | 68 +- ...ent_active_directory_configs_operations.py | 144 - ...tive_directory_configs_operations_async.py | 151 - ...t_net_app_management_buckets_operations.py | 24 +- ...app_management_buckets_operations_async.py | 24 +- ..._management_elastic_accounts_operations.py | 137 - ...ement_elastic_accounts_operations_async.py | 152 - ...ment_elastic_backup_policies_operations.py | 111 - ...lastic_backup_policies_operations_async.py | 118 - ...gement_elastic_backup_vaults_operations.py | 96 - ..._elastic_backup_vaults_operations_async.py | 103 - ...p_management_elastic_backups_operations.py | 139 - ...gement_elastic_backups_operations_async.py | 146 - ...ement_elastic_capacity_pools_operations.py | 140 - ...elastic_capacity_pools_operations_async.py | 155 - ...nt_elastic_snapshot_policies_operations.py | 124 - ...stic_snapshot_policies_operations_async.py | 131 - ...management_elastic_snapshots_operations.py | 88 - ...ment_elastic_snapshots_operations_async.py | 93 - ...p_management_elastic_volumes_operations.py | 175 - ...gement_elastic_volumes_operations_async.py | 184 - ...app_management_volume_groups_operations.py | 4 +- ...nagement_volume_groups_operations_async.py | 4 +- ...t_net_app_management_volumes_operations.py | 4 +- ...app_management_volumes_operations_async.py | 4 +- sdk/netapp/azure-mgmt-netapp/pyproject.toml | 4 +- .../azure-mgmt-netapp/tsp-location.yaml | 2 +- 240 files changed, 19196 insertions(+), 47805 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/types.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ldap_config.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_refresh_ldap_bind_password.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py rename sdk/netapp/azure-mgmt-netapp/generated_samples/{backups_list_by_vault.py => backups_under_backup_vault_list.py} (92%) delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom_smb.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom_smb.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_custom.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py delete mode 100644 sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py diff --git a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md index 2473acdceaeb..12f6bd109b51 100644 --- a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +## 17.1.0 (2026-07-17) + +### Features Added + + - Model `VolumeProperties` added property `breakthrough_mode` + - Model `VolumeProperties` added property `breakthrough_mode_old` + - Added enum `BreakthroughMode` + ## 18.0.0b1 (2026-06-29) ### Features Added diff --git a/sdk/netapp/azure-mgmt-netapp/_metadata.json b/sdk/netapp/azure-mgmt-netapp/_metadata.json index cc880ecdbcac..7ae9ed911639 100644 --- a/sdk/netapp/azure-mgmt-netapp/_metadata.json +++ b/sdk/netapp/azure-mgmt-netapp/_metadata.json @@ -1,11 +1,11 @@ { - "apiVersion": "2026-04-15-preview", + "apiVersion": "2026-05-01", "apiVersions": { - "Microsoft.NetApp": "2026-04-15-preview" + "Microsoft.NetApp": "2026-05-01" }, - "commit": "5bfc5b62dd18f5767b3254cc93e695eeb3d5d689", + "commit": "0ba9ed818bc5bd36e877ad025777534adf8b62ae", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/netapp/resource-manager/Microsoft.NetApp/NetApp", - "emitterVersion": "0.63.2", - "httpClientPythonVersion": "^0.33.0" + "emitterVersion": "0.63.3", + "httpClientPythonVersion": "^0.34.2" } \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/api.md b/sdk/netapp/azure-mgmt-netapp/api.md index af7a1c921c71..1fdaa3f0a3be 100644 --- a/sdk/netapp/azure-mgmt-netapp/api.md +++ b/sdk/netapp/azure-mgmt-netapp/api.md @@ -3,7 +3,6 @@ namespace azure.mgmt.netapp class azure.mgmt.netapp.NetAppManagementClient: implements ContextManager accounts: AccountsOperations - active_directory_configs: ActiveDirectoryConfigsOperations backup_policies: BackupPoliciesOperations backup_vaults: BackupVaultsOperations backups: BackupsOperations @@ -12,14 +11,6 @@ namespace azure.mgmt.netapp backups_under_volume: BackupsUnderVolumeOperations buckets: BucketsOperations caches: CachesOperations - elastic_accounts: ElasticAccountsOperations - elastic_backup_policies: ElasticBackupPoliciesOperations - elastic_backup_vaults: ElasticBackupVaultsOperations - elastic_backups: ElasticBackupsOperations - elastic_capacity_pools: ElasticCapacityPoolsOperations - elastic_snapshot_policies: ElasticSnapshotPoliciesOperations - elastic_snapshots: ElasticSnapshotsOperations - elastic_volumes: ElasticVolumesOperations net_app_resource: NetAppResourceOperations net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations net_app_resource_quota_limits_account: NetAppResourceQuotaLimitsAccountOperations @@ -62,7 +53,6 @@ namespace azure.mgmt.netapp.aio class azure.mgmt.netapp.aio.NetAppManagementClient: implements AsyncContextManager accounts: AccountsOperations - active_directory_configs: ActiveDirectoryConfigsOperations backup_policies: BackupPoliciesOperations backup_vaults: BackupVaultsOperations backups: BackupsOperations @@ -71,14 +61,6 @@ namespace azure.mgmt.netapp.aio backups_under_volume: BackupsUnderVolumeOperations buckets: BucketsOperations caches: CachesOperations - elastic_accounts: ElasticAccountsOperations - elastic_backup_policies: ElasticBackupPoliciesOperations - elastic_backup_vaults: ElasticBackupVaultsOperations - elastic_backups: ElasticBackupsOperations - elastic_capacity_pools: ElasticCapacityPoolsOperations - elastic_snapshot_policies: ElasticSnapshotPoliciesOperations - elastic_snapshots: ElasticSnapshotsOperations - elastic_volumes: ElasticVolumesOperations net_app_resource: NetAppResourceOperations net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations net_app_resource_quota_limits_account: NetAppResourceQuotaLimitsAccountOperations @@ -143,7 +125,7 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[ChangeKeyVault] = None, *, content_type: str = "application/json", **kwargs: Any @@ -176,7 +158,7 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - body: JSON, + body: NetAppAccount, *, content_type: str = "application/json", **kwargs: Any @@ -209,15 +191,6 @@ namespace azure.mgmt.netapp.aio.operations **kwargs: Any ) -> AsyncLROPoller[GetKeyVaultStatusResponse]: ... - @distributed_trace_async - @api_version_validation(method_added_on='2026-04-15-preview', params_added_on={'2026-04-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name']}, api_versions_list=['2026-04-15-preview']) - async def begin_refresh_ldap_bind_password( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @distributed_trace_async async def begin_renew_credentials( self, @@ -242,7 +215,7 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[EncryptionTransitionRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -275,7 +248,7 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - body: JSON, + body: NetAppAccountPatch, *, content_type: str = "application/json", **kwargs: Any @@ -311,111 +284,6 @@ namespace azure.mgmt.netapp.aio.operations def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[NetAppAccount]: ... - class azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: ActiveDirectoryConfig, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'active_directory_config_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def begin_delete( - self, - resource_group_name: str, - active_directory_config_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: ActiveDirectoryConfigUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ActiveDirectoryConfig]: ... - - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'active_directory_config_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def get( - self, - resource_group_name: str, - active_directory_config_name: str, - **kwargs: Any - ) -> ActiveDirectoryConfig: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncItemPaged[ActiveDirectoryConfig]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[ActiveDirectoryConfig]: ... - - class azure.mgmt.netapp.aio.operations.BackupPoliciesOperations: def __init__( @@ -442,7 +310,7 @@ namespace azure.mgmt.netapp.aio.operations resource_group_name: str, account_name: str, backup_policy_name: str, - body: JSON, + body: BackupPolicy, *, content_type: str = "application/json", **kwargs: Any @@ -487,7 +355,7 @@ namespace azure.mgmt.netapp.aio.operations resource_group_name: str, account_name: str, backup_policy_name: str, - body: JSON, + body: BackupPolicyPatch, *, content_type: str = "application/json", **kwargs: Any @@ -549,7 +417,7 @@ namespace azure.mgmt.netapp.aio.operations resource_group_name: str, account_name: str, backup_vault_name: str, - body: JSON, + body: BackupVault, *, content_type: str = "application/json", **kwargs: Any @@ -594,7 +462,7 @@ namespace azure.mgmt.netapp.aio.operations resource_group_name: str, account_name: str, backup_vault_name: str, - body: JSON, + body: BackupVaultPatch, *, content_type: str = "application/json", **kwargs: Any @@ -658,7 +526,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, backup_vault_name: str, backup_name: str, - body: JSON, + body: Backup, *, content_type: str = "application/json", **kwargs: Any @@ -707,7 +575,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, backup_vault_name: str, backup_name: str, - body: Optional[JSON] = None, + body: Optional[BackupPatch] = None, *, content_type: str = "application/json", **kwargs: Any @@ -792,7 +660,7 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - body: JSON, + body: BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -838,7 +706,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, backup_vault_name: str, backup_name: str, - body: JSON, + body: BackupRestoreFiles, *, content_type: str = "application/json", **kwargs: Any @@ -886,7 +754,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -936,7 +804,7 @@ namespace azure.mgmt.netapp.aio.operations pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: Bucket, *, content_type: str = "application/json", **kwargs: Any @@ -957,7 +825,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[Bucket]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def begin_delete( self, resource_group_name: str, @@ -990,7 +858,7 @@ namespace azure.mgmt.netapp.aio.operations pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any @@ -1011,7 +879,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[None]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def begin_refresh_certificate( self, resource_group_name: str, @@ -1044,7 +912,7 @@ namespace azure.mgmt.netapp.aio.operations pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: BucketPatch, *, content_type: str = "application/json", **kwargs: Any @@ -1086,7 +954,7 @@ namespace azure.mgmt.netapp.aio.operations pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any @@ -1107,7 +975,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> BucketGenerateCredentials: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def get( self, resource_group_name: str, @@ -1119,7 +987,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> Bucket: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) def list( self, resource_group_name: str, @@ -1158,7 +1026,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: Cache, *, content_type: str = "application/json", **kwargs: Any @@ -1178,7 +1046,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[Cache]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def begin_delete( self, resource_group_name: str, @@ -1208,7 +1076,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1228,7 +1096,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[Cache]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def begin_reset_smb_password( self, resource_group_name: str, @@ -1258,7 +1126,7 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: CacheUpdate, *, content_type: str = "application/json", **kwargs: Any @@ -1278,7 +1146,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[Cache]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def get( self, resource_group_name: str, @@ -1289,7 +1157,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> Cache: ... @distributed_trace - @api_version_validation(method_added_on='2026-01-01', params_added_on={'2026-01-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2026-01-01', params_added_on={'2026-01-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) def list( self, resource_group_name: str, @@ -1299,7 +1167,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncItemPaged[Cache]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) async def list_peering_passphrases( self, resource_group_name: str, @@ -1310,7 +1178,7 @@ namespace azure.mgmt.netapp.aio.operations ) -> PeeringPassphrases: ... - class azure.mgmt.netapp.aio.operations.ElasticAccountsOperations: + class azure.mgmt.netapp.aio.operations.NetAppResourceOperations: def __init__( self, @@ -1319,213 +1187,164 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @overload - async def begin_create_or_update( + async def begin_update_network_sibling_set( self, - resource_group_name: str, - account_name: str, - body: ElasticAccount, + location: str, + body: UpdateNetworkSiblingSetRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... + ) -> AsyncLROPoller[NetworkSiblingSet]: ... @overload - async def begin_create_or_update( + async def begin_update_network_sibling_set( self, - resource_group_name: str, - account_name: str, - body: JSON, + location: str, + body: UpdateNetworkSiblingSetRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... + ) -> AsyncLROPoller[NetworkSiblingSet]: ... @overload - async def begin_create_or_update( + async def begin_update_network_sibling_set( self, - resource_group_name: str, - account_name: str, + location: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... - - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def begin_delete( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncLROPoller[NetworkSiblingSet]: ... @overload - async def begin_update( + async def check_file_path_availability( self, - resource_group_name: str, - account_name: str, - body: ElasticAccountUpdate, + location: str, + body: FilePathAvailabilityRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_update( + async def check_file_path_availability( self, - resource_group_name: str, - account_name: str, - body: JSON, + location: str, + body: FilePathAvailabilityRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_update( + async def check_file_path_availability( self, - resource_group_name: str, - account_name: str, + location: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticAccount]: ... + ) -> CheckAvailabilityResponse: ... - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def get( + @overload + async def check_name_availability( self, - resource_group_name: str, - account_name: str, + location: str, + body: ResourceNameAvailabilityRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> ElasticAccount: ... + ) -> CheckAvailabilityResponse: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_resource_group( + @overload + async def check_name_availability( self, - resource_group_name: str, + location: str, + body: ResourceNameAvailabilityRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[ElasticAccount]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[ElasticAccount]: ... - - - class azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_create_or_update( + async def check_name_availability( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: ElasticBackupPolicy, + location: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_create_or_update( + async def check_quota_availability( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: JSON, + location: str, + body: QuotaAvailabilityRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_create_or_update( + async def check_quota_availability( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: IO[bytes], + location: str, + body: QuotaAvailabilityRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> CheckAvailabilityResponse: ... - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_policy_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def begin_delete( + @overload + async def check_quota_availability( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> CheckAvailabilityResponse: ... @overload - async def begin_update( + async def query_network_sibling_set( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: ElasticBackupPolicyUpdate, + location: str, + body: QueryNetworkSiblingSetRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> NetworkSiblingSet: ... @overload - async def begin_update( + async def query_network_sibling_set( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: JSON, + location: str, + body: QueryNetworkSiblingSetRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> NetworkSiblingSet: ... @overload - async def begin_update( + async def query_network_sibling_set( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, + location: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupPolicy]: ... + ) -> NetworkSiblingSet: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def get( + async def query_region_info( self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, + location: str, **kwargs: Any - ) -> ElasticBackupPolicy: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncItemPaged[ElasticBackupPolicy]: ... + ) -> RegionInfo: ... - class azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations: + class azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsAccountOperations: def __init__( self, @@ -1533,109 +1352,110 @@ namespace azure.mgmt.netapp.aio.operations **kwargs ) -> None: ... - @overload - async def begin_create_or_update( + @distributed_trace_async + @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'quota_limit_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + async def get( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: ElasticBackupVault, - *, - content_type: str = "application/json", + quota_limit_name: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + ) -> QuotaItem: ... - @overload - async def begin_create_or_update( + @distributed_trace + @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + ) -> AsyncItemPaged[QuotaItem]: ... - @overload - async def begin_create_or_update( + + class azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations: + + def __init__( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + *args, + **kwargs + ) -> None: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def begin_delete( + async def get( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, + location: str, + quota_limit_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> QuotaItem: ... - @overload - async def begin_update( + @distributed_trace + def list( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: ElasticBackupVaultUpdate, - *, - content_type: str = "application/json", + location: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + ) -> AsyncItemPaged[QuotaItem]: ... - @overload - async def begin_update( + + class azure.mgmt.netapp.aio.operations.NetAppResourceRegionInfosOperations: + + def __init__( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def get( + self, + location: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + ) -> RegionInfoResource: ... - @overload - async def begin_update( + @distributed_trace + def list( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", + location: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticBackupVault]: ... + ) -> AsyncItemPaged[RegionInfoResource]: ... + + + class azure.mgmt.netapp.aio.operations.NetAppResourceUsagesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def get( self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, + location: str, + usage_type: str, **kwargs: Any - ) -> ElasticBackupVault: ... + ) -> UsageResult: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( + def list( self, - resource_group_name: str, - account_name: str, + location: str, **kwargs: Any - ) -> AsyncItemPaged[ElasticBackupVault]: ... + ) -> AsyncItemPaged[UsageResult]: ... + + + class azure.mgmt.netapp.aio.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[Operation]: ... - class azure.mgmt.netapp.aio.operations.ElasticBackupsOperations: + class azure.mgmt.netapp.aio.operations.PoolsOperations: def __init__( self, @@ -1648,48 +1468,43 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: ElasticBackup, + pool_name: str, + body: CapacityPool, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @overload async def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + pool_name: str, + body: CapacityPool, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @overload async def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'backup_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def begin_delete( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @@ -1698,63 +1513,56 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: ElasticBackup, + pool_name: str, + body: CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @overload async def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + pool_name: str, + body: CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @overload async def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticBackup]: ... + ) -> AsyncLROPoller[CapacityPool]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'backup_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def get( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, **kwargs: Any - ) -> ElasticBackup: ... + ) -> CapacityPool: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_vault( + def list( self, resource_group_name: str, account_name: str, - backup_vault_name: str, **kwargs: Any - ) -> AsyncItemPaged[ElasticBackup]: ... + ) -> AsyncItemPaged[CapacityPool]: ... - class azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations: + class azure.mgmt.netapp.aio.operations.RansomwareReportsOperations: def __init__( self, @@ -1763,84 +1571,85 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @overload - async def begin_change_zone( + async def begin_clear_suspects( self, resource_group_name: str, account_name: str, pool_name: str, - body: ChangeZoneRequest, + volume_name: str, + ransomware_report_name: str, + body: RansomwareSuspectsClearRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_change_zone( + async def begin_clear_suspects( self, resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + volume_name: str, + ransomware_report_name: str, + body: RansomwareSuspectsClearRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_change_zone( + async def begin_clear_suspects( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, + ransomware_report_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[None]: ... - @overload - async def begin_create_or_update( + @distributed_trace_async + @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'ransomware_report_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + async def get( self, resource_group_name: str, account_name: str, pool_name: str, - body: ElasticCapacityPool, - *, - content_type: str = "application/json", + volume_name: str, + ransomware_report_name: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> RansomwareReport: ... - @overload - async def begin_create_or_update( + @distributed_trace + @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( self, resource_group_name: str, account_name: str, pool_name: str, - body: JSON, - *, - content_type: str = "application/json", + volume_name: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncItemPaged[RansomwareReport]: ... - @overload - async def begin_create_or_update( + + class azure.mgmt.netapp.aio.operations.SnapshotPoliciesOperations: + + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + *args, + **kwargs + ) -> None: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def begin_delete( self, resource_group_name: str, account_name: str, - pool_name: str, + snapshot_policy_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @@ -1849,94 +1658,101 @@ namespace azure.mgmt.netapp.aio.operations self, resource_group_name: str, account_name: str, - pool_name: str, - body: ElasticCapacityPoolUpdate, + snapshot_policy_name: str, + body: SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[SnapshotPolicy]: ... @overload async def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, - body: JSON, + snapshot_policy_name: str, + body: SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[SnapshotPolicy]: ... @overload async def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, + snapshot_policy_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticCapacityPool]: ... + ) -> AsyncLROPoller[SnapshotPolicy]: ... @overload - async def check_volume_file_path_availability( + async def create( self, resource_group_name: str, account_name: str, - pool_name: str, - body: CheckElasticVolumeFilePathAvailabilityRequest, + snapshot_policy_name: str, + body: SnapshotPolicy, *, content_type: str = "application/json", **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... + ) -> SnapshotPolicy: ... @overload - async def check_volume_file_path_availability( + async def create( self, resource_group_name: str, account_name: str, - pool_name: str, - body: JSON, + snapshot_policy_name: str, + body: SnapshotPolicy, *, content_type: str = "application/json", **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... + ) -> SnapshotPolicy: ... @overload - async def check_volume_file_path_availability( + async def create( self, resource_group_name: str, account_name: str, - pool_name: str, + snapshot_policy_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... + ) -> SnapshotPolicy: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def get( self, resource_group_name: str, account_name: str, - pool_name: str, + snapshot_policy_name: str, **kwargs: Any - ) -> ElasticCapacityPool: ... + ) -> SnapshotPolicy: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( + def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncItemPaged[SnapshotPolicy]: ... + + @distributed_trace_async + async def list_volumes( self, resource_group_name: str, account_name: str, + snapshot_policy_name: str, **kwargs: Any - ) -> AsyncItemPaged[ElasticCapacityPool]: ... + ) -> SnapshotPolicyVolumeList: ... - class azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations: + class azure.mgmt.netapp.aio.operations.SnapshotsOperations: def __init__( self, @@ -1945,155 +1761,130 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: ElasticSnapshotPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[Snapshot]: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Snapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... + ) -> AsyncLROPoller[Snapshot]: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... + ) -> AsyncLROPoller[Snapshot]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def begin_delete( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_restore_files( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: ElasticSnapshotPolicyUpdate, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotRestoreFiles, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_restore_files( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotRestoreFiles, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_restore_files( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshotPolicy]: ... - - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def get( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> ElasticSnapshotPolicy: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncItemPaged[ElasticSnapshotPolicy]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_elastic_volumes( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> AsyncItemPaged[ElasticVolume]: ... - - - class azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, snapshot_name: str, - body: ElasticSnapshot, + body: SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshot]: ... + ) -> AsyncLROPoller[Snapshot]: ... @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, snapshot_name: str, - body: JSON, + body: SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshot]: ... + ) -> AsyncLROPoller[Snapshot]: ... @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, account_name: str, @@ -2104,22 +1895,9 @@ namespace azure.mgmt.netapp.aio.operations *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticSnapshot]: ... - - @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'snapshot_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - async def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncLROPoller[Snapshot]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'snapshot_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def get( self, resource_group_name: str, @@ -2128,21 +1906,20 @@ namespace azure.mgmt.netapp.aio.operations volume_name: str, snapshot_name: str, **kwargs: Any - ) -> ElasticSnapshot: ... + ) -> Snapshot: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_volume( + def list( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[ElasticSnapshot]: ... + ) -> AsyncItemPaged[Snapshot]: ... - class azure.mgmt.netapp.aio.operations.ElasticVolumesOperations: + class azure.mgmt.netapp.aio.operations.SubvolumesOperations: def __init__( self, @@ -2151,93 +1928,68 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: ElasticVolume, + subvolume_name: str, + body: SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: JSON, + subvolume_name: str, + body: SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @overload - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def begin_delete( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + subvolume_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ElasticVolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... - - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... - - @overload - async def begin_revert( + @distributed_trace_async + async def begin_get_metadata( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", + subvolume_name: str, **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeModel]: ... @overload async def begin_update( @@ -2246,11 +1998,12 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - body: ElasticVolumeUpdate, + subvolume_name: str, + body: SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @overload async def begin_update( @@ -2259,11 +2012,12 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - body: JSON, + subvolume_name: str, + body: SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @overload async def begin_update( @@ -2272,35 +2026,36 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, + subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ElasticVolume]: ... + ) -> AsyncLROPoller[SubvolumeInfo]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) async def get( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + subvolume_name: str, **kwargs: Any - ) -> ElasticVolume: ... + ) -> SubvolumeInfo: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_pool( + def list_by_volume( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[ElasticVolume]: ... + ) -> AsyncItemPaged[SubvolumeInfo]: ... - class azure.mgmt.netapp.aio.operations.NetAppResourceOperations: + class azure.mgmt.netapp.aio.operations.VolumeGroupsOperations: def __init__( self, @@ -2309,239 +2064,194 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @overload - async def begin_update_network_sibling_set( + async def begin_create( self, - location: str, - body: UpdateNetworkSiblingSetRequest, + resource_group_name: str, + account_name: str, + volume_group_name: str, + body: VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[NetworkSiblingSet]: ... + ) -> AsyncLROPoller[VolumeGroupDetails]: ... @overload - async def begin_update_network_sibling_set( + async def begin_create( self, - location: str, - body: JSON, + resource_group_name: str, + account_name: str, + volume_group_name: str, + body: VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[NetworkSiblingSet]: ... + ) -> AsyncLROPoller[VolumeGroupDetails]: ... @overload - async def begin_update_network_sibling_set( + async def begin_create( self, - location: str, + resource_group_name: str, + account_name: str, + volume_group_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[NetworkSiblingSet]: ... + ) -> AsyncLROPoller[VolumeGroupDetails]: ... - @overload - async def check_file_path_availability( + @distributed_trace_async + async def begin_delete( self, - location: str, - body: FilePathAvailabilityRequest, - *, - content_type: str = "application/json", + resource_group_name: str, + account_name: str, + volume_group_name: str, **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncLROPoller[None]: ... - @overload - async def check_file_path_availability( + @distributed_trace_async + async def get( self, - location: str, - body: JSON, - *, - content_type: str = "application/json", + resource_group_name: str, + account_name: str, + volume_group_name: str, **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> VolumeGroupDetails: ... - @overload - async def check_file_path_availability( + @distributed_trace + def list_by_net_app_account( self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", + resource_group_name: str, + account_name: str, **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncItemPaged[VolumeGroup]: ... - @overload - async def check_name_availability( + + class azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations: + + def __init__( self, - location: str, - body: ResourceNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + *args, + **kwargs + ) -> None: ... @overload - async def check_name_availability( + async def begin_create( self, - location: str, - body: JSON, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... @overload - async def check_name_availability( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... - - @overload - async def check_quota_availability( + async def begin_create( self, - location: str, - body: QuotaAvailabilityRequest, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... @overload - async def check_quota_availability( + async def begin_create( self, - location: str, - body: JSON, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... - @overload - async def check_quota_availability( + @distributed_trace_async + async def begin_delete( self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, **kwargs: Any - ) -> CheckAvailabilityResponse: ... + ) -> AsyncLROPoller[None]: ... @overload - async def query_network_sibling_set( + async def begin_update( self, - location: str, - body: QueryNetworkSiblingSetRequest, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRulePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> NetworkSiblingSet: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... @overload - async def query_network_sibling_set( + async def begin_update( self, - location: str, - body: JSON, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRulePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> NetworkSiblingSet: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... @overload - async def query_network_sibling_set( + async def begin_update( self, - location: str, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> NetworkSiblingSet: ... - - @distributed_trace_async - async def query_region_info( - self, - location: str, - **kwargs: Any - ) -> RegionInfo: ... - - - class azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsAccountOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[VolumeQuotaRule]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'quota_limit_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) async def get( self, resource_group_name: str, account_name: str, - quota_limit_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, **kwargs: Any - ) -> QuotaItem: ... + ) -> VolumeQuotaRule: ... @distributed_trace - @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( + def list_by_volume( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[QuotaItem]: ... - - - class azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @distributed_trace_async - async def get( - self, - location: str, - quota_limit_name: str, - **kwargs: Any - ) -> QuotaItem: ... - - @distributed_trace - def list( - self, - location: str, - **kwargs: Any - ) -> AsyncItemPaged[QuotaItem]: ... - - - class azure.mgmt.netapp.aio.operations.NetAppResourceRegionInfosOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @distributed_trace_async - async def get( - self, - location: str, - **kwargs: Any - ) -> RegionInfoResource: ... - - @distributed_trace - def list( - self, - location: str, - **kwargs: Any - ) -> AsyncItemPaged[RegionInfoResource]: ... + ) -> AsyncItemPaged[VolumeQuotaRule]: ... - class azure.mgmt.netapp.aio.operations.NetAppResourceUsagesOperations: + class azure.mgmt.netapp.aio.operations.VolumesOperations: def __init__( self, @@ -2550,427 +2260,432 @@ namespace azure.mgmt.netapp.aio.operations ) -> None: ... @distributed_trace_async - async def get( - self, - location: str, - usage_type: str, - **kwargs: Any - ) -> UsageResult: ... - - @distributed_trace - def list( + async def begin_authorize_external_replication( self, - location: str, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[UsageResult]: ... - - - class azure.mgmt.netapp.aio.operations.Operations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged[Operation]: ... - - - class azure.mgmt.netapp.aio.operations.PoolsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[SvmPeerCommandResponse]: ... @overload - async def begin_create_or_update( + async def begin_authorize_replication( self, resource_group_name: str, account_name: str, pool_name: str, - body: CapacityPool, + volume_name: str, + body: AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create_or_update( + async def begin_authorize_replication( self, resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + volume_name: str, + body: AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create_or_update( + async def begin_authorize_replication( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def begin_delete( + @overload + async def begin_break_file_locks( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, + body: Optional[BreakFileLocksRequest] = None, + *, + content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_break_file_locks( self, resource_group_name: str, account_name: str, pool_name: str, - body: CapacityPoolPatch, + volume_name: str, + body: Optional[BreakFileLocksRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_break_file_locks( self, resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, - body: IO[bytes], + volume_name: str, + body: Optional[BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[CapacityPool]: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def get( + @overload + async def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, + body: Optional[BreakReplicationRequest] = None, + *, + content_type: str = "application/json", **kwargs: Any - ) -> CapacityPool: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace - def list( + @overload + async def begin_break_replication( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[CapacityPool]: ... - - - class azure.mgmt.netapp.aio.operations.RansomwareReportsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_clear_suspects( + async def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: RansomwareSuspectsClearRequest, + body: Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncLROPoller[Volume]: ... @overload - async def begin_clear_suspects( + async def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: JSON, + body: Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncLROPoller[Volume]: ... @overload - async def begin_clear_suspects( + async def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncLROPoller[Volume]: ... @distributed_trace_async - @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'ransomware_report_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - async def get( + async def begin_delete( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, + *, + force_delete: Optional[bool] = ..., **kwargs: Any - ) -> RansomwareReport: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( + @distributed_trace_async + async def begin_delete_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[RansomwareReport]: ... - - - class azure.mgmt.netapp.aio.operations.SnapshotPoliciesOperations: + ) -> AsyncLROPoller[None]: ... - def __init__( + @distributed_trace_async + async def begin_finalize_external_replication( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def begin_delete( + async def begin_finalize_relocation( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: SnapshotPolicyPatch, + pool_name: str, + volume_name: str, + body: GetGroupIdListForLDAPUserRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SnapshotPolicy]: ... + ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - async def begin_update( + async def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: GetGroupIdListForLDAPUserRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SnapshotPolicy]: ... + ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - async def begin_update( + async def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SnapshotPolicy]: ... + ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - async def create( + async def begin_list_quota_report( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: SnapshotPolicy, + pool_name: str, + volume_name: str, + body: Optional[QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> SnapshotPolicy: ... + ) -> AsyncLROPoller[ListQuotaReportResult]: ... @overload - async def create( + async def begin_list_quota_report( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: Optional[QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> SnapshotPolicy: ... + ) -> AsyncLROPoller[ListQuotaReportResult]: ... @overload - async def create( + async def begin_list_quota_report( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: IO[bytes], + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> SnapshotPolicy: ... + ) -> AsyncLROPoller[ListQuotaReportResult]: ... - @distributed_trace_async - async def get( + @overload + async def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, + body: PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> SnapshotPolicy: ... + ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... - @distributed_trace - def list( + @overload + async def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, + body: PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[SnapshotPolicy]: ... + ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... - @distributed_trace_async - async def list_volumes( + @overload + async def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> SnapshotPolicyVolumeList: ... - - - class azure.mgmt.netapp.aio.operations.SnapshotsOperations: + ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... - def __init__( + @distributed_trace_async + async def begin_perform_replication_transfer( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: Snapshot, + body: PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: JSON, + body: PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def begin_delete( + async def begin_populate_availability_zone( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> AsyncLROPoller[Volume]: ... + + @distributed_trace_async + async def begin_re_initialize_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_restore_files( + async def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: SnapshotRestoreFiles, + body: ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_restore_files( + async def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: JSON, + body: ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_restore_files( + async def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", @@ -2978,140 +2693,122 @@ namespace azure.mgmt.netapp.aio.operations ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_relocate( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: SnapshotPatch, + body: Optional[RelocateVolumeRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_relocate( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: JSON, + body: Optional[RelocateVolumeRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_update( + async def begin_relocate( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, - body: IO[bytes], + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def get( + async def begin_reset_cifs_password( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace - def list( + @distributed_trace_async + async def begin_resync_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[Snapshot]: ... - - - class azure.mgmt.netapp.aio.operations.SubvolumesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, - body: SubvolumeInfo, + body: VolumeRevert, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, - body: JSON, + body: VolumeRevert, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create( + async def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def begin_delete( + async def begin_revert_relocation( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def begin_get_metadata( + async def begin_split_clone_from_parent( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, **kwargs: Any - ) -> AsyncLROPoller[SubvolumeModel]: ... + ) -> AsyncLROPoller[Volume]: ... @overload async def begin_update( @@ -3120,12 +2817,11 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, - body: SubvolumePatchRequest, + body: VolumePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[Volume]: ... @overload async def begin_update( @@ -3134,12 +2830,11 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, - body: JSON, + body: VolumePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[Volume]: ... @overload async def begin_update( @@ -3148,12 +2843,11 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[SubvolumeInfo]: ... + ) -> AsyncLROPoller[Volume]: ... @distributed_trace_async async def get( @@ -3162,1244 +2856,870 @@ namespace azure.mgmt.netapp.aio.operations account_name: str, pool_name: str, volume_name: str, - subvolume_name: str, **kwargs: Any - ) -> SubvolumeInfo: ... + ) -> Volume: ... @distributed_trace - def list_by_volume( + def list( self, resource_group_name: str, account_name: str, pool_name: str, - volume_name: str, **kwargs: Any - ) -> AsyncItemPaged[SubvolumeInfo]: ... - - - class azure.mgmt.netapp.aio.operations.VolumeGroupsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncItemPaged[Volume]: ... @overload - async def begin_create( + def list_replications( self, resource_group_name: str, account_name: str, - volume_group_name: str, - body: VolumeGroupDetails, + pool_name: str, + volume_name: str, + body: Optional[ListReplicationsRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[VolumeGroupDetails]: ... + ) -> AsyncItemPaged[Replication]: ... @overload - async def begin_create( + def list_replications( self, resource_group_name: str, account_name: str, - volume_group_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: Optional[ListReplicationsRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[VolumeGroupDetails]: ... + ) -> AsyncItemPaged[Replication]: ... @overload - async def begin_create( + def list_replications( self, resource_group_name: str, account_name: str, - volume_group_name: str, - body: IO[bytes], + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[VolumeGroupDetails]: ... + ) -> AsyncItemPaged[Replication]: ... @distributed_trace_async - async def begin_delete( + async def replication_status( self, resource_group_name: str, account_name: str, - volume_group_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> ReplicationStatus: ... - @distributed_trace_async - async def get( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - **kwargs: Any - ) -> VolumeGroupDetails: ... - @distributed_trace - def list_by_net_app_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncItemPaged[VolumeGroup]: ... +namespace azure.mgmt.netapp.models + + class azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACCEPTED = "Accepted" + DECLINED = "Declined" - class azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations: + class azure.mgmt.netapp.models.AccountEncryption(_Model): + identity: Optional[EncryptionIdentity] + key_source: Optional[Union[str, KeySource]] + key_vault_properties: Optional[KeyVaultProperties] + @overload def __init__( self, - *args, - **kwargs + *, + identity: Optional[EncryptionIdentity] = ..., + key_source: Optional[Union[str, KeySource]] = ..., + key_vault_properties: Optional[KeyVaultProperties] = ... ) -> None: ... @overload - async def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: VolumeQuotaRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.AccountProperties(_Model): + active_directories: Optional[list[ActiveDirectory]] + disable_showmount: Optional[bool] + encryption: Optional[AccountEncryption] + multi_ad_status: Optional[Union[str, MultiAdStatus]] + nfs_v4_id_domain: Optional[str] + provisioning_state: Optional[str] @overload - async def begin_create( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + active_directories: Optional[list[ActiveDirectory]] = ..., + encryption: Optional[AccountEncryption] = ..., + nfs_v4_id_domain: Optional[str] = ... + ) -> None: ... @overload - async def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: VolumeQuotaRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + class azure.mgmt.netapp.models.ActiveDirectory(_Model): + active_directory_id: Optional[str] + ad_name: Optional[str] + administrators: Optional[list[str]] + aes_encryption: Optional[bool] + allow_local_nfs_users_with_ldap: Optional[bool] + backup_operators: Optional[list[str]] + dns: Optional[str] + domain: Optional[str] + encrypt_dc_connections: Optional[bool] + kdc_ip: Optional[str] + ldap_over_tls: Optional[bool] + ldap_search_scope: Optional[LdapSearchScopeOpt] + ldap_signing: Optional[bool] + organizational_unit: Optional[str] + password: Optional[str] + preferred_servers_for_ldap_client: Optional[str] + security_operators: Optional[list[str]] + server_root_ca_certificate: Optional[str] + site: Optional[str] + smb_server_name: Optional[str] + status: Optional[Union[str, ActiveDirectoryStatus]] + status_details: Optional[str] + username: Optional[str] @overload - async def begin_update( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + active_directory_id: Optional[str] = ..., + ad_name: Optional[str] = ..., + administrators: Optional[list[str]] = ..., + aes_encryption: Optional[bool] = ..., + allow_local_nfs_users_with_ldap: Optional[bool] = ..., + backup_operators: Optional[list[str]] = ..., + dns: Optional[str] = ..., + domain: Optional[str] = ..., + encrypt_dc_connections: Optional[bool] = ..., + kdc_ip: Optional[str] = ..., + ldap_over_tls: Optional[bool] = ..., + ldap_search_scope: Optional[LdapSearchScopeOpt] = ..., + ldap_signing: Optional[bool] = ..., + organizational_unit: Optional[str] = ..., + password: Optional[str] = ..., + preferred_servers_for_ldap_client: Optional[str] = ..., + security_operators: Optional[list[str]] = ..., + server_root_ca_certificate: Optional[str] = ..., + site: Optional[str] = ..., + smb_server_name: Optional[str] = ..., + username: Optional[str] = ... + ) -> None: ... @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[VolumeQuotaRule]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - **kwargs: Any - ) -> VolumeQuotaRule: ... - @distributed_trace - def list_by_volume( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncItemPaged[VolumeQuotaRule]: ... + class azure.mgmt.netapp.models.ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATED = "Created" + DELETED = "Deleted" + ERROR = "Error" + IN_USE = "InUse" + UPDATING = "Updating" - class azure.mgmt.netapp.aio.operations.VolumesOperations: + class azure.mgmt.netapp.models.ActualRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + LEARNING = "Learning" + PAUSED = "Paused" + + + class azure.mgmt.netapp.models.ApplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ORACLE = "ORACLE" + SAP_HANA = "SAP-HANA" + + class azure.mgmt.netapp.models.AuthorizeRequest(_Model): + remote_volume_resource_id: Optional[str] + + @overload def __init__( self, - *args, - **kwargs + *, + remote_volume_resource_id: Optional[str] = ... ) -> None: ... - @distributed_trace_async - async def begin_authorize_external_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[SvmPeerCommandResponse]: ... + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.AvsDataStore(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.netapp.models.AzureKeyVaultDetails(_Model): + certificate_akv_details: Optional[CertificateAkvDetails] + credentials_akv_details: Optional[CredentialsAkvDetails] @overload - async def begin_authorize_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: AuthorizeRequest, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + certificate_akv_details: Optional[CertificateAkvDetails] = ..., + credentials_akv_details: Optional[CredentialsAkvDetails] = ... + ) -> None: ... @overload - async def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.Backup(ProxyResource): + id: str + name: str + properties: BackupProperties + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_authorize_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + properties: BackupProperties + ) -> None: ... @overload - async def begin_break_file_locks( + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[BreakFileLocksRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.netapp.models.BackupPatch(_Model): + properties: Optional[BackupPatchProperties] + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_break_file_locks( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + properties: Optional[BackupPatchProperties] = ... + ) -> None: ... @overload - async def begin_break_file_locks( + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.netapp.models.BackupPatchProperties(_Model): + label: Optional[str] @overload - async def begin_break_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[BreakReplicationRequest] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + label: Optional[str] = ... + ) -> None: ... @overload - async def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BackupPolicy(TrackedResource): + etag: Optional[str] + id: str + location: str + name: str + properties: BackupPolicyProperties + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_break_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + location: str, + properties: BackupPolicyProperties, + tags: Optional[dict[str, str]] = ... + ) -> None: ... @overload - async def begin_create_or_update( + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Volume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.netapp.models.BackupPolicyPatch(_Model): + id: Optional[str] + location: Optional[str] + name: Optional[str] + properties: Optional[BackupPolicyProperties] + tags: Optional[dict[str, str]] + type: Optional[str] + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_create_or_update( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + location: Optional[str] = ..., + properties: Optional[BackupPolicyProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - *, - force_delete: Optional[bool] = ..., - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def begin_delete_replication( + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + key: str, + value: Any + ) -> None: ... - @distributed_trace_async - async def begin_finalize_external_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def begin_finalize_relocation( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + class azure.mgmt.netapp.models.BackupPolicyProperties(_Model): + backup_policy_id: Optional[str] + daily_backups_to_keep: Optional[int] + enabled: Optional[bool] + monthly_backups_to_keep: Optional[int] + provisioning_state: Optional[str] + volume_backups: Optional[list[VolumeBackups]] + volumes_assigned: Optional[int] + weekly_backups_to_keep: Optional[int] @overload - async def begin_list_get_group_id_list_for_ldap_user( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: GetGroupIdListForLDAPUserRequest, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... + daily_backups_to_keep: Optional[int] = ..., + enabled: Optional[bool] = ..., + monthly_backups_to_keep: Optional[int] = ..., + weekly_backups_to_keep: Optional[int] = ... + ) -> None: ... @overload - async def begin_list_get_group_id_list_for_ldap_user( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @overload - async def begin_list_get_group_id_list_for_ldap_user( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[GetGroupIdListForLDAPUserResponse]: ... + + class azure.mgmt.netapp.models.BackupProperties(_Model): + backup_id: Optional[str] + backup_policy_resource_id: Optional[str] + backup_type: Optional[Union[str, BackupType]] + completion_date: Optional[datetime] + creation_date: Optional[datetime] + failure_reason: Optional[str] + is_large_volume: Optional[bool] + label: Optional[str] + provisioning_state: Optional[str] + size: Optional[int] + snapshot_creation_date: Optional[datetime] + snapshot_name: Optional[str] + use_existing_snapshot: Optional[bool] + volume_resource_id: str @overload - async def begin_list_quota_report( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[QuotaReportFilterRequest] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ListQuotaReportResult]: ... + label: Optional[str] = ..., + snapshot_name: Optional[str] = ..., + use_existing_snapshot: Optional[bool] = ..., + volume_resource_id: str + ) -> None: ... @overload - async def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ListQuotaReportResult]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BackupRestoreFiles(_Model): + destination_volume_id: str + file_list: list[str] + restore_file_path: Optional[str] @overload - async def begin_list_quota_report( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ListQuotaReportResult]: ... + destination_volume_id: str, + file_list: list[str], + restore_file_path: Optional[str] = ... + ) -> None: ... @overload - async def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: PeerClusterForVolumeMigrationRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BackupStatus(_Model): + error_message: Optional[str] + healthy: Optional[bool] + last_transfer_size: Optional[int] + last_transfer_type: Optional[str] + mirror_state: Optional[Union[str, MirrorState]] + relationship_status: Optional[Union[str, VolumeBackupRelationshipStatus]] + total_transfer_bytes: Optional[int] + transfer_progress_bytes: Optional[int] + unhealthy_reason: Optional[str] + + + class azure.mgmt.netapp.models.BackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MANUAL = "Manual" + SCHEDULED = "Scheduled" + + + class azure.mgmt.netapp.models.BackupVault(TrackedResource): + id: str + location: str + name: str + properties: Optional[BackupVaultProperties] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_peer_external_cluster( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... + location: str, + properties: Optional[BackupVaultProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... @overload - async def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[ClusterPeerCommandResponse]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def begin_perform_replication_transfer( + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.netapp.models.BackupVaultPatch(_Model): + tags: Optional[dict[str, str]] @overload - async def begin_pool_change( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: PoolChangeRequest, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + tags: Optional[dict[str, str]] = ... + ) -> None: ... @overload - async def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @overload - async def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def begin_populate_availability_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + class azure.mgmt.netapp.models.BackupVaultProperties(_Model): + provisioning_state: Optional[str] - @distributed_trace_async - async def begin_re_initialize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + + class azure.mgmt.netapp.models.BackupsMigrationRequest(_Model): + backup_vault_id: str @overload - async def begin_reestablish_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ReestablishReplicationRequest, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + backup_vault_id: str + ) -> None: ... @overload - async def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BreakFileLocksRequest(_Model): + client_ip: Optional[str] + confirm_running_disruptive_operation: Optional[bool] @overload - async def begin_reestablish_replication( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + client_ip: Optional[str] = ..., + confirm_running_disruptive_operation: Optional[bool] = ... + ) -> None: ... @overload - async def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[RelocateVolumeRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BreakReplicationRequest(_Model): + force_break_replication: Optional[bool] @overload - async def begin_relocate( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + force_break_replication: Optional[bool] = ... + ) -> None: ... @overload - async def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def begin_reset_cifs_password( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def begin_resync_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + class azure.mgmt.netapp.models.BreakthroughMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: VolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + + class azure.mgmt.netapp.models.Bucket(ProxyResource): + id: str + name: str + properties: Optional[BucketProperties] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload - async def begin_revert( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + properties: Optional[BucketProperties] = ... + ) -> None: ... @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def begin_revert_relocation( + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... + key: str, + value: Any + ) -> None: ... - @distributed_trace_async - async def begin_split_clone_from_parent( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + + class azure.mgmt.netapp.models.BucketCredentialsExpiry(_Model): + key_pair_expiry_days: Optional[int] @overload - async def begin_update( + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: VolumePatch, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + key_pair_expiry_days: Optional[int] = ... + ) -> None: ... @overload - async def begin_update( + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.netapp.models.BucketGenerateCredentials(_Model): + access_key: Optional[str] + key_pair_expiry: Optional[datetime] + secret_key: Optional[str] + + + class azure.mgmt.netapp.models.BucketPatch(ProxyResource): + id: str + name: str + properties: Optional[BucketPatchProperties] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... + properties: Optional[BucketPatchProperties] = ... + ) -> None: ... @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[Volume]: ... - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> Volume: ... - - @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> AsyncItemPaged[Volume]: ... - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[ListReplicationsRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncItemPaged[Replication]: ... - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncItemPaged[Replication]: ... - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncItemPaged[Replication]: ... + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - @distributed_trace_async - async def replication_status( + def __setattr__( self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ReplicationStatus: ... - + key: str, + value: Any + ) -> None: ... -namespace azure.mgmt.netapp.models - class azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACCEPTED = "Accepted" - DECLINED = "Declined" + class azure.mgmt.netapp.models.BucketPatchPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + READ_ONLY = "ReadOnly" + READ_WRITE = "ReadWrite" - class azure.mgmt.netapp.models.AccountEncryption(_Model): - identity: Optional[EncryptionIdentity] - key_source: Optional[Union[str, KeySource]] - key_vault_properties: Optional[KeyVaultProperties] + class azure.mgmt.netapp.models.BucketPatchProperties(_Model): + akv_details: Optional[AzureKeyVaultDetails] + file_system_user: Optional[FileSystemUser] + permissions: Optional[Union[str, BucketPatchPermissions]] + provisioning_state: Optional[Union[str, NetAppProvisioningState]] + server: Optional[BucketServerPatchProperties] @overload def __init__( self, *, - identity: Optional[EncryptionIdentity] = ..., - key_source: Optional[Union[str, KeySource]] = ..., - key_vault_properties: Optional[KeyVaultProperties] = ... + akv_details: Optional[AzureKeyVaultDetails] = ..., + file_system_user: Optional[FileSystemUser] = ..., + permissions: Optional[Union[str, BucketPatchPermissions]] = ..., + server: Optional[BucketServerPatchProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.AccountProperties(_Model): - active_directories: Optional[list[ActiveDirectory]] - disable_showmount: Optional[bool] - encryption: Optional[AccountEncryption] - entra_id_config: Optional[EntraIdConfig] - ldap_configuration: Optional[LdapConfiguration] - multi_ad_status: Optional[Union[str, MultiAdStatus]] - nfs_v4_id_domain: Optional[str] - provisioning_state: Optional[str] + class azure.mgmt.netapp.models.BucketPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + READ_ONLY = "ReadOnly" + READ_WRITE = "ReadWrite" + + + class azure.mgmt.netapp.models.BucketProperties(_Model): + akv_details: Optional[AzureKeyVaultDetails] + file_system_user: Optional[FileSystemUser] + path: Optional[str] + permissions: Optional[Union[str, BucketPermissions]] + provisioning_state: Optional[Union[str, NetAppProvisioningState]] + server: Optional[BucketServerProperties] + status: Optional[Union[str, CredentialsStatus]] @overload def __init__( self, *, - active_directories: Optional[list[ActiveDirectory]] = ..., - encryption: Optional[AccountEncryption] = ..., - entra_id_config: Optional[EntraIdConfig] = ..., - ldap_configuration: Optional[LdapConfiguration] = ..., - nfs_v4_id_domain: Optional[str] = ... + akv_details: Optional[AzureKeyVaultDetails] = ..., + file_system_user: Optional[FileSystemUser] = ..., + path: Optional[str] = ..., + permissions: Optional[Union[str, BucketPermissions]] = ..., + server: Optional[BucketServerProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.AccountPropertiesPatch(_Model): - active_directories: Optional[list[ActiveDirectory]] - encryption: Optional[AccountEncryption] - entra_id_config: Optional[EntraIdConfigPatch] - ldap_configuration: Optional[LdapConfigurationPatch] - nfs_v4_id_domain: Optional[str] + class azure.mgmt.netapp.models.BucketServerPatchProperties(_Model): + certificate_object: Optional[str] + fqdn: Optional[str] + on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] @overload def __init__( self, *, - active_directories: Optional[list[ActiveDirectory]] = ..., - encryption: Optional[AccountEncryption] = ..., - entra_id_config: Optional[EntraIdConfigPatch] = ..., - ldap_configuration: Optional[LdapConfigurationPatch] = ..., - nfs_v4_id_domain: Optional[str] = ... + certificate_object: Optional[str] = ..., + fqdn: Optional[str] = ..., + on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ActiveDirectory(_Model): - active_directory_id: Optional[str] - ad_name: Optional[str] - administrators: Optional[list[str]] - aes_encryption: Optional[bool] - allow_local_nfs_users_with_ldap: Optional[bool] - backup_operators: Optional[list[str]] - dns: Optional[str] - domain: Optional[str] - encrypt_dc_connections: Optional[bool] - kdc_ip: Optional[str] - ldap_over_tls: Optional[bool] - ldap_search_scope: Optional[LdapSearchScopeOpt] - ldap_signing: Optional[bool] - organizational_unit: Optional[str] - password: Optional[str] - preferred_servers_for_ldap_client: Optional[str] - security_operators: Optional[list[str]] - server_root_ca_certificate: Optional[str] - site: Optional[str] - smb_server_name: Optional[str] - status: Optional[Union[str, ActiveDirectoryStatus]] - status_details: Optional[str] - username: Optional[str] + class azure.mgmt.netapp.models.BucketServerProperties(_Model): + certificate_common_name: Optional[str] + certificate_expiry_date: Optional[datetime] + certificate_object: Optional[str] + fqdn: Optional[str] + ip_address: Optional[str] + on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] @overload def __init__( self, *, - active_directory_id: Optional[str] = ..., - ad_name: Optional[str] = ..., - administrators: Optional[list[str]] = ..., - aes_encryption: Optional[bool] = ..., - allow_local_nfs_users_with_ldap: Optional[bool] = ..., - backup_operators: Optional[list[str]] = ..., - dns: Optional[str] = ..., - domain: Optional[str] = ..., - encrypt_dc_connections: Optional[bool] = ..., - kdc_ip: Optional[str] = ..., - ldap_over_tls: Optional[bool] = ..., - ldap_search_scope: Optional[LdapSearchScopeOpt] = ..., - ldap_signing: Optional[bool] = ..., - organizational_unit: Optional[str] = ..., - password: Optional[str] = ..., - preferred_servers_for_ldap_client: Optional[str] = ..., - security_operators: Optional[list[str]] = ..., - server_root_ca_certificate: Optional[str] = ..., - site: Optional[str] = ..., - smb_server_name: Optional[str] = ..., - username: Optional[str] = ... + certificate_object: Optional[str] = ..., + fqdn: Optional[str] = ..., + on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ActiveDirectoryConfig(TrackedResource): + class azure.mgmt.netapp.models.Cache(TrackedResource): etag: Optional[str] id: str - identity: Optional[ManagedServiceIdentity] location: str name: str - properties: Optional[ActiveDirectoryConfigProperties] + properties: CacheProperties system_data: SystemData tags: dict[str, str] type: str + zones: Optional[list[str]] @overload def __init__( self, *, - identity: Optional[ManagedServiceIdentity] = ..., location: str, - properties: Optional[ActiveDirectoryConfigProperties] = ..., - tags: Optional[dict[str, str]] = ... + properties: CacheProperties, + tags: Optional[dict[str, str]] = ..., + zones: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ActiveDirectoryConfigProperties(_Model): - active_directory_status: Optional[Union[str, ActiveDirectoryStatus]] - administrators: Optional[list[str]] - backup_operators: Optional[list[str]] - dns: Optional[list[str]] - domain: str - organizational_unit: Optional[str] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - secret_password: SecretPassword - security_operators: Optional[list[str]] - site: str - smb_server_name: Optional[str] - user_name: Optional[str] - - @overload - def __init__( - self, - *, - administrators: Optional[list[str]] = ..., - backup_operators: Optional[list[str]] = ..., - dns: Optional[list[str]] = ..., - domain: str, - organizational_unit: Optional[str] = ..., - secret_password: SecretPassword, - security_operators: Optional[list[str]] = ..., - site: str, - smb_server_name: Optional[str] = ..., - user_name: Optional[str] = ... - ) -> None: ... + class azure.mgmt.netapp.models.CacheFileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.CacheLifeCycleState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLUSTER_PEERING_OFFER_SENT = "ClusterPeeringOfferSent" + CREATING = "Creating" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + VSERVER_PEERING_OFFER_SENT = "VserverPeeringOfferSent" - class azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate(_Model): - identity: Optional[ManagedServiceIdentity] - properties: Optional[ActiveDirectoryConfigUpdateProperties] - tags: Optional[dict[str, str]] - @overload - def __init__( - self, - *, - identity: Optional[ManagedServiceIdentity] = ..., - properties: Optional[ActiveDirectoryConfigUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... + class azure.mgmt.netapp.models.CacheMountTargetProperties(_Model): + ip_address: Optional[str] + mount_target_id: Optional[str] + smb_server_fqdn: Optional[str] - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.ActiveDirectoryConfigUpdateProperties(_Model): - administrators: Optional[list[str]] - backup_operators: Optional[list[str]] - dns: Optional[list[str]] - domain: Optional[str] - organizational_unit: Optional[str] - secret_password: Optional[SecretPassword] - security_operators: Optional[list[str]] - site: Optional[str] - smb_server_name: Optional[str] - user_name: Optional[str] - - @overload - def __init__( - self, - *, - administrators: Optional[list[str]] = ..., - backup_operators: Optional[list[str]] = ..., - dns: Optional[list[str]] = ..., - domain: Optional[str] = ..., - organizational_unit: Optional[str] = ..., - secret_password: Optional[SecretPassword] = ..., - security_operators: Optional[list[str]] = ..., - site: Optional[str] = ..., - smb_server_name: Optional[str] = ..., - user_name: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CREATED = "Created" - DELETED = "Deleted" - ERROR = "Error" - IN_USE = "InUse" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.ActualRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - LEARNING = "Learning" - PAUSED = "Paused" - - - class azure.mgmt.netapp.models.ApplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ORACLE = "ORACLE" - SAP_HANA = "SAP-HANA" - - - class azure.mgmt.netapp.models.AuthorizeRequest(_Model): - remote_volume_resource_id: Optional[str] - - @overload - def __init__( - self, - *, - remote_volume_resource_id: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.AvsDataStore(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.AzureKeyVaultDetails(_Model): - certificate_akv_details: Optional[CertificateAkvDetails] - credentials_akv_details: Optional[CredentialsAkvDetails] + class azure.mgmt.netapp.models.CacheProperties(_Model): + actual_throughput_mibps: Optional[float] + cache_state: Optional[Union[str, CacheLifeCycleState]] + cache_subnet_resource_id: str + cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] + encryption: Optional[Union[str, EncryptionState]] + encryption_key_source: Union[str, EncryptionKeySource] + export_policy: Optional[CachePropertiesExportPolicy] + file_access_logs: Optional[Union[str, CacheFileAccessLogs]] + file_path: str + global_file_locking: Optional[Union[str, GlobalFileLockingState]] + kerberos: Optional[Union[str, KerberosState]] + key_vault_private_endpoint_resource_id: Optional[str] + language: Optional[Union[str, VolumeLanguage]] + ldap: Optional[Union[str, LdapState]] + ldap_server_type: Optional[Union[str, LdapServerType]] + maximum_number_of_files: Optional[int] + mount_targets: Optional[list[CacheMountTargetProperties]] + origin_cluster_information: OriginClusterInformation + peering_subnet_resource_id: str + protocol_types: Optional[list[Union[str, ProtocolTypes]]] + provisioning_state: Optional[Union[str, CacheProvisioningState]] + size: int + smb_settings: Optional[SmbSettings] + throughput_mibps: Optional[float] + write_back: Optional[Union[str, EnableWriteBackState]] @overload def __init__( self, *, - certificate_akv_details: Optional[CertificateAkvDetails] = ..., - credentials_akv_details: Optional[CredentialsAkvDetails] = ... + cache_subnet_resource_id: str, + cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] = ..., + encryption_key_source: Union[str, EncryptionKeySource], + export_policy: Optional[CachePropertiesExportPolicy] = ..., + file_path: str, + global_file_locking: Optional[Union[str, GlobalFileLockingState]] = ..., + kerberos: Optional[Union[str, KerberosState]] = ..., + key_vault_private_endpoint_resource_id: Optional[str] = ..., + ldap: Optional[Union[str, LdapState]] = ..., + ldap_server_type: Optional[Union[str, LdapServerType]] = ..., + origin_cluster_information: OriginClusterInformation, + peering_subnet_resource_id: str, + protocol_types: Optional[list[Union[str, ProtocolTypes]]] = ..., + size: int, + smb_settings: Optional[SmbSettings] = ..., + throughput_mibps: Optional[float] = ..., + write_back: Optional[Union[str, EnableWriteBackState]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.Backup(ProxyResource): - id: str - name: str - properties: BackupProperties - system_data: SystemData - type: str - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.models.CachePropertiesExportPolicy(_Model): + rules: Optional[list[ExportPolicyRule]] @overload def __init__( self, *, - properties: BackupProperties + rules: Optional[list[ExportPolicyRule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... + class azure.mgmt.netapp.models.CacheProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" - class azure.mgmt.netapp.models.BackupPatch(_Model): - properties: Optional[BackupPatchProperties] - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.models.CacheUpdate(_Model): + properties: Optional[CacheUpdateProperties] + tags: Optional[dict[str, str]] @overload def __init__( self, *, - properties: Optional[BackupPatchProperties] = ... + properties: Optional[CacheUpdateProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.netapp.models.BackupPatchProperties(_Model): - label: Optional[str] + class azure.mgmt.netapp.models.CacheUpdateProperties(_Model): + cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] + export_policy: Optional[CachePropertiesExportPolicy] + key_vault_private_endpoint_resource_id: Optional[str] + protocol_types: Optional[list[Union[str, ProtocolTypes]]] + size: Optional[int] + smb_settings: Optional[SmbSettings] + throughput_mibps: Optional[float] + write_back: Optional[Union[str, EnableWriteBackState]] @overload def __init__( self, *, - label: Optional[str] = ... + cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] = ..., + export_policy: Optional[CachePropertiesExportPolicy] = ..., + key_vault_private_endpoint_resource_id: Optional[str] = ..., + protocol_types: Optional[list[Union[str, ProtocolTypes]]] = ..., + size: Optional[int] = ..., + smb_settings: Optional[SmbSettings] = ..., + throughput_mibps: Optional[float] = ..., + write_back: Optional[Union[str, EnableWriteBackState]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BackupPolicy(TrackedResource): + class azure.mgmt.netapp.models.CapacityPool(TrackedResource): etag: Optional[str] id: str location: str name: str - properties: BackupPolicyProperties + properties: PoolProperties system_data: SystemData tags: dict[str, str] type: str @@ -4411,7 +3731,7 @@ namespace azure.mgmt.netapp.models self, *, location: str, - properties: BackupPolicyProperties, + properties: PoolProperties, tags: Optional[dict[str, str]] = ... ) -> None: ... @@ -4425,11 +3745,11 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.BackupPolicyPatch(_Model): + class azure.mgmt.netapp.models.CapacityPoolPatch(_Model): id: Optional[str] location: Optional[str] name: Optional[str] - properties: Optional[BackupPolicyProperties] + properties: Optional[PoolPatchProperties] tags: Optional[dict[str, str]] type: Optional[str] @@ -4440,7 +3760,7 @@ namespace azure.mgmt.netapp.models self, *, location: Optional[str] = ..., - properties: Optional[BackupPolicyProperties] = ..., + properties: Optional[PoolPatchProperties] = ..., tags: Optional[dict[str, str]] = ... ) -> None: ... @@ -4454,573 +3774,447 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.BackupPolicyProperties(_Model): - backup_policy_id: Optional[str] - daily_backups_to_keep: Optional[int] - enabled: Optional[bool] - monthly_backups_to_keep: Optional[int] - provisioning_state: Optional[str] - volume_backups: Optional[list[VolumeBackups]] - volumes_assigned: Optional[int] - weekly_backups_to_keep: Optional[int] + class azure.mgmt.netapp.models.CertificateAkvDetails(_Model): + certificate_key_vault_uri: Optional[str] + certificate_name: Optional[str] @overload def __init__( self, *, - daily_backups_to_keep: Optional[int] = ..., - enabled: Optional[bool] = ..., - monthly_backups_to_keep: Optional[int] = ..., - weekly_backups_to_keep: Optional[int] = ... + certificate_key_vault_uri: Optional[str] = ..., + certificate_name: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BackupProperties(_Model): - backup_id: Optional[str] - backup_policy_resource_id: Optional[str] - backup_type: Optional[Union[str, BackupType]] - completion_date: Optional[datetime] - creation_date: Optional[datetime] - failure_reason: Optional[str] - is_large_volume: Optional[bool] - label: Optional[str] - provisioning_state: Optional[str] - size: Optional[int] - snapshot_creation_date: Optional[datetime] - snapshot_name: Optional[str] - use_existing_snapshot: Optional[bool] - volume_resource_id: str + class azure.mgmt.netapp.models.ChangeKeyVault(_Model): + key_name: str + key_vault_private_endpoints: list[KeyVaultPrivateEndpoint] + key_vault_resource_id: Optional[str] + key_vault_uri: str @overload def __init__( self, *, - label: Optional[str] = ..., - snapshot_name: Optional[str] = ..., - use_existing_snapshot: Optional[bool] = ..., - volume_resource_id: str + key_name: str, + key_vault_private_endpoints: list[KeyVaultPrivateEndpoint], + key_vault_resource_id: Optional[str] = ..., + key_vault_uri: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BackupRestoreFiles(_Model): - destination_volume_id: str - file_list: list[str] - restore_file_path: Optional[str] + class azure.mgmt.netapp.models.CheckAvailabilityResponse(_Model): + is_available: Optional[bool] + message: Optional[str] + reason: Optional[Union[str, InAvailabilityReasonType]] @overload def __init__( self, *, - destination_volume_id: str, - file_list: list[str], - restore_file_path: Optional[str] = ... + is_available: Optional[bool] = ..., + message: Optional[str] = ..., + reason: Optional[Union[str, InAvailabilityReasonType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BackupStatus(_Model): - error_message: Optional[str] - healthy: Optional[bool] - last_transfer_size: Optional[int] - last_transfer_type: Optional[str] - mirror_state: Optional[Union[str, MirrorState]] - relationship_status: Optional[Union[str, VolumeBackupRelationshipStatus]] - total_transfer_bytes: Optional[int] - transfer_progress_bytes: Optional[int] - unhealthy_reason: Optional[str] - - - class azure.mgmt.netapp.models.BackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MANUAL = "Manual" - SCHEDULED = "Scheduled" + class azure.mgmt.netapp.models.CheckNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" - class azure.mgmt.netapp.models.BackupVault(TrackedResource): - id: str - location: str - name: str - properties: Optional[BackupVaultProperties] - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.netapp.models.CheckQuotaNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups" + MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" - def __getattr__(self, name: str) -> Any: ... - @overload - def __init__( - self, - *, - location: str, - properties: Optional[BackupVaultProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... + class azure.mgmt.netapp.models.ChownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + RESTRICTED = "Restricted" + UNRESTRICTED = "Unrestricted" - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... + class azure.mgmt.netapp.models.CifsChangeNotifyState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.netapp.models.BackupVaultPatch(_Model): - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.CifsUser(_Model): + username: Optional[str] @overload def __init__( self, *, - tags: Optional[dict[str, str]] = ... + username: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BackupVaultProperties(_Model): - provisioning_state: Optional[str] - - - class azure.mgmt.netapp.models.BackupsMigrationRequest(_Model): - backup_vault_id: str + class azure.mgmt.netapp.models.ClusterPeerCommandResponse(_Model): + properties: Optional[ClusterPeerCommandResponseProperties] @overload def __init__( self, *, - backup_vault_id: str + properties: Optional[ClusterPeerCommandResponseProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BindAuthenticationLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ANONYMOUS = "Anonymous" - SIMPLE = "Simple" - - - class azure.mgmt.netapp.models.BindPasswordAkvConfig(_Model): - azure_key_vault_uri: str - secret_name: str - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.ClusterPeerCommandResponseProperties(_Model): + cluster_peering_command: Optional[str] + passphrase: Optional[str] @overload def __init__( self, *, - azure_key_vault_uri: str, - secret_name: str, - user_assigned_identity: Optional[str] = ... + cluster_peering_command: Optional[str] = ..., + passphrase: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BindPasswordAkvConfigPatch(_Model): - azure_key_vault_uri: Optional[str] - secret_name: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.CoolAccessRetrievalPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "Default" + NEVER = "Never" + ON_READ = "OnRead" - @overload - def __init__( - self, - *, - azure_key_vault_uri: Optional[str] = ..., - secret_name: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.CoolAccessTieringPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTO = "Auto" + SNAPSHOT_ONLY = "SnapshotOnly" - class azure.mgmt.netapp.models.BreakFileLocksRequest(_Model): - client_ip: Optional[str] - confirm_running_disruptive_operation: Optional[bool] + class azure.mgmt.netapp.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPLICATION = "Application" + KEY = "Key" + MANAGED_IDENTITY = "ManagedIdentity" + USER = "User" + + + class azure.mgmt.netapp.models.CredentialsAkvDetails(_Model): + credentials_key_vault_uri: Optional[str] + secret_name: Optional[str] @overload def __init__( self, *, - client_ip: Optional[str] = ..., - confirm_running_disruptive_operation: Optional[bool] = ... + credentials_key_vault_uri: Optional[str] = ..., + secret_name: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BreakReplicationRequest(_Model): - force_break_replication: Optional[bool] + class azure.mgmt.netapp.models.CredentialsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE = "Active" + CREDENTIALS_EXPIRED = "CredentialsExpired" + NO_CREDENTIALS_SET = "NoCredentialsSet" + + + class azure.mgmt.netapp.models.DailySchedule(_Model): + hour: Optional[int] + minute: Optional[int] + snapshots_to_keep: Optional[int] + used_bytes: Optional[int] @overload def __init__( self, *, - force_break_replication: Optional[bool] = ... + hour: Optional[int] = ..., + minute: Optional[int] = ..., + snapshots_to_keep: Optional[int] = ..., + used_bytes: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BreakthroughMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + class azure.mgmt.netapp.models.DesiredRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" ENABLED = "Enabled" - class azure.mgmt.netapp.models.Bucket(ProxyResource): - id: str - name: str - properties: Optional[BucketProperties] - system_data: SystemData - type: str - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.models.DestinationReplication(_Model): + region: Optional[str] + replication_type: Optional[Union[str, ReplicationType]] + resource_id: Optional[str] + zone: Optional[str] @overload def __init__( self, *, - properties: Optional[BucketProperties] = ... + region: Optional[str] = ..., + replication_type: Optional[Union[str, ReplicationType]] = ..., + resource_id: Optional[str] = ..., + zone: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.netapp.models.BucketCredentialsExpiry(_Model): - key_pair_expiry_days: Optional[int] + class azure.mgmt.netapp.models.Dimension(_Model): + display_name: Optional[str] + name: Optional[str] @overload def __init__( self, *, - key_pair_expiry_days: Optional[int] = ... + display_name: Optional[str] = ..., + name: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BucketGenerateCredentials(_Model): - access_key: Optional[str] - key_pair_expiry: Optional[datetime] - secret_key: Optional[str] + class azure.mgmt.netapp.models.EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.netapp.models.BucketPatch(ProxyResource): - id: str - name: str - properties: Optional[BucketPatchProperties] - system_data: SystemData - type: str + class azure.mgmt.netapp.models.EnableWriteBackState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - def __getattr__(self, name: str) -> Any: ... + + class azure.mgmt.netapp.models.EncryptionIdentity(_Model): + federated_client_id: Optional[str] + principal_id: Optional[str] + user_assigned_identity: Optional[str] @overload def __init__( self, *, - properties: Optional[BucketPatchProperties] = ... + federated_client_id: Optional[str] = ..., + user_assigned_identity: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... + class azure.mgmt.netapp.models.EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MICROSOFT_KEY_VAULT = "Microsoft.KeyVault" + MICROSOFT_NET_APP = "Microsoft.NetApp" - class azure.mgmt.netapp.models.BucketPatchPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): - READ_ONLY = "ReadOnly" - READ_WRITE = "ReadWrite" + class azure.mgmt.netapp.models.EncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.netapp.models.BucketPatchProperties(_Model): - akv_details: Optional[AzureKeyVaultDetails] - file_system_user: Optional[FileSystemUser] - permissions: Optional[Union[str, BucketPatchPermissions]] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - server: Optional[BucketServerPatchProperties] + + class azure.mgmt.netapp.models.EncryptionTransitionRequest(_Model): + private_endpoint_id: str + virtual_network_id: str @overload def __init__( self, *, - akv_details: Optional[AzureKeyVaultDetails] = ..., - file_system_user: Optional[FileSystemUser] = ..., - permissions: Optional[Union[str, BucketPatchPermissions]] = ..., - server: Optional[BucketServerPatchProperties] = ... + private_endpoint_id: str, + virtual_network_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BucketPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta): - READ_ONLY = "ReadOnly" - READ_WRITE = "ReadWrite" + class azure.mgmt.netapp.models.EncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DOUBLE = "Double" + SINGLE = "Single" - class azure.mgmt.netapp.models.BucketProperties(_Model): - akv_details: Optional[AzureKeyVaultDetails] - file_system_user: Optional[FileSystemUser] - path: Optional[str] - permissions: Optional[Union[str, BucketPermissions]] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - server: Optional[BucketServerProperties] - status: Optional[Union[str, CredentialsStatus]] + class azure.mgmt.netapp.models.EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DST = "dst" + SRC = "src" + + + class azure.mgmt.netapp.models.ErrorAdditionalInfo(_Model): + info: Optional[Any] + type: Optional[str] + + + class azure.mgmt.netapp.models.ErrorDetail(_Model): + additional_info: Optional[list[ErrorAdditionalInfo]] + code: Optional[str] + details: Optional[list[ErrorDetail]] + message: Optional[str] + target: Optional[str] + + + class azure.mgmt.netapp.models.ErrorResponse(_Model): + error: Optional[ErrorDetail] @overload def __init__( self, *, - akv_details: Optional[AzureKeyVaultDetails] = ..., - file_system_user: Optional[FileSystemUser] = ..., - path: Optional[str] = ..., - permissions: Optional[Union[str, BucketPermissions]] = ..., - server: Optional[BucketServerProperties] = ... + error: Optional[ErrorDetail] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.BucketServerPatchProperties(_Model): - certificate_object: Optional[str] - fqdn: Optional[str] - on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] - - @overload - def __init__( - self, - *, - certificate_object: Optional[str] = ..., - fqdn: Optional[str] = ..., - on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.Exclude(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETED = "Deleted" + NONE = "None" - class azure.mgmt.netapp.models.BucketServerProperties(_Model): - certificate_common_name: Optional[str] - certificate_expiry_date: Optional[datetime] - certificate_object: Optional[str] - fqdn: Optional[str] - ip_address: Optional[str] - on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] + class azure.mgmt.netapp.models.ExportPolicyRule(_Model): + allowed_clients: Optional[str] + chown_mode: Optional[Union[str, ChownMode]] + cifs: Optional[bool] + has_root_access: Optional[bool] + kerberos5_i_read_only: Optional[bool] + kerberos5_i_read_write: Optional[bool] + kerberos5_p_read_only: Optional[bool] + kerberos5_p_read_write: Optional[bool] + kerberos5_read_only: Optional[bool] + kerberos5_read_write: Optional[bool] + nfsv3: Optional[bool] + nfsv41: Optional[bool] + rule_index: Optional[int] + unix_read_only: Optional[bool] + unix_read_write: Optional[bool] @overload def __init__( self, *, - certificate_object: Optional[str] = ..., - fqdn: Optional[str] = ..., - on_certificate_conflict_action: Optional[Union[str, OnCertificateConflictAction]] = ... + allowed_clients: Optional[str] = ..., + chown_mode: Optional[Union[str, ChownMode]] = ..., + cifs: Optional[bool] = ..., + has_root_access: Optional[bool] = ..., + kerberos5_i_read_only: Optional[bool] = ..., + kerberos5_i_read_write: Optional[bool] = ..., + kerberos5_p_read_only: Optional[bool] = ..., + kerberos5_p_read_write: Optional[bool] = ..., + kerberos5_read_only: Optional[bool] = ..., + kerberos5_read_write: Optional[bool] = ..., + nfsv3: Optional[bool] = ..., + nfsv41: Optional[bool] = ..., + rule_index: Optional[int] = ..., + unix_read_only: Optional[bool] = ..., + unix_read_write: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.Cache(TrackedResource): - etag: Optional[str] - id: str - location: str - name: str - properties: CacheProperties - system_data: SystemData - tags: dict[str, str] - type: str - zones: Optional[list[str]] - - @overload - def __init__( - self, - *, - location: str, - properties: CacheProperties, - tags: Optional[dict[str, str]] = ..., - zones: Optional[list[str]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.ExternalReplicationSetupStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLUSTER_PEER_PENDING = "ClusterPeerPending" + CLUSTER_PEER_REQUIRED = "ClusterPeerRequired" + NO_ACTION_REQUIRED = "NoActionRequired" + REPLICATION_CREATE_REQUIRED = "ReplicationCreateRequired" + V_SERVER_PEER_REQUIRED = "VServerPeerRequired" - class azure.mgmt.netapp.models.CacheFileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): + class azure.mgmt.netapp.models.FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" ENABLED = "Enabled" - class azure.mgmt.netapp.models.CacheLifeCycleState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CLUSTER_PEERING_OFFER_SENT = "ClusterPeeringOfferSent" - CREATING = "Creating" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - VSERVER_PEERING_OFFER_SENT = "VserverPeeringOfferSent" - - - class azure.mgmt.netapp.models.CacheMountTargetProperties(_Model): - ip_address: Optional[str] - mount_target_id: Optional[str] - smb_server_fqdn: Optional[str] - - - class azure.mgmt.netapp.models.CacheProperties(_Model): - actual_throughput_mibps: Optional[float] - cache_state: Optional[Union[str, CacheLifeCycleState]] - cache_subnet_resource_id: str - cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] - encryption: Optional[Union[str, EncryptionState]] - encryption_key_source: Union[str, EncryptionKeySource] - export_policy: Optional[CachePropertiesExportPolicy] - file_access_logs: Optional[Union[str, CacheFileAccessLogs]] - file_path: str - global_file_locking: Optional[Union[str, GlobalFileLockingState]] - kerberos: Optional[Union[str, KerberosState]] - key_vault_private_endpoint_resource_id: Optional[str] - language: Optional[Union[str, VolumeLanguage]] - ldap: Optional[Union[str, LdapState]] - ldap_server_type: Optional[Union[str, LdapServerType]] - maximum_number_of_files: Optional[int] - mount_targets: Optional[list[CacheMountTargetProperties]] - origin_cluster_information: OriginClusterInformation - peering_subnet_resource_id: str - protocol_types: Optional[list[Union[str, ProtocolTypes]]] - provisioning_state: Optional[Union[str, CacheProvisioningState]] - size: int - smb_settings: Optional[SmbSettings] - throughput_mibps: Optional[float] - write_back: Optional[Union[str, EnableWriteBackState]] + class azure.mgmt.netapp.models.FilePathAvailabilityRequest(_Model): + availability_zone: Optional[str] + name: str + subnet_id: str @overload def __init__( self, *, - cache_subnet_resource_id: str, - cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] = ..., - encryption_key_source: Union[str, EncryptionKeySource], - export_policy: Optional[CachePropertiesExportPolicy] = ..., - file_path: str, - global_file_locking: Optional[Union[str, GlobalFileLockingState]] = ..., - kerberos: Optional[Union[str, KerberosState]] = ..., - key_vault_private_endpoint_resource_id: Optional[str] = ..., - ldap: Optional[Union[str, LdapState]] = ..., - ldap_server_type: Optional[Union[str, LdapServerType]] = ..., - origin_cluster_information: OriginClusterInformation, - peering_subnet_resource_id: str, - protocol_types: Optional[list[Union[str, ProtocolTypes]]] = ..., - size: int, - smb_settings: Optional[SmbSettings] = ..., - throughput_mibps: Optional[float] = ..., - write_back: Optional[Union[str, EnableWriteBackState]] = ... + availability_zone: Optional[str] = ..., + name: str, + subnet_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CachePropertiesExportPolicy(_Model): - rules: Optional[list[ExportPolicyRule]] + class azure.mgmt.netapp.models.FileSystemUser(_Model): + cifs_user: Optional[CifsUser] + nfs_user: Optional[NfsUser] @overload def __init__( self, *, - rules: Optional[list[ExportPolicyRule]] = ... + cifs_user: Optional[CifsUser] = ..., + nfs_user: Optional[NfsUser] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CacheProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - CREATING = "Creating" - DELETING = "Deleting" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.CacheUpdate(_Model): - properties: Optional[CacheUpdateProperties] - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest(_Model): + username: str @overload def __init__( self, *, - properties: Optional[CacheUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... + username: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CacheUpdateProperties(_Model): - cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] - export_policy: Optional[CachePropertiesExportPolicy] - key_vault_private_endpoint_resource_id: Optional[str] - protocol_types: Optional[list[Union[str, ProtocolTypes]]] - size: Optional[int] - smb_settings: Optional[SmbSettings] - throughput_mibps: Optional[float] - write_back: Optional[Union[str, EnableWriteBackState]] + class azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse(_Model): + group_ids_for_ldap_user: Optional[list[str]] @overload def __init__( self, *, - cifs_change_notifications: Optional[Union[str, CifsChangeNotifyState]] = ..., - export_policy: Optional[CachePropertiesExportPolicy] = ..., - key_vault_private_endpoint_resource_id: Optional[str] = ..., - protocol_types: Optional[list[Union[str, ProtocolTypes]]] = ..., - size: Optional[int] = ..., - smb_settings: Optional[SmbSettings] = ..., - throughput_mibps: Optional[float] = ..., - write_back: Optional[Union[str, EnableWriteBackState]] = ... + group_ids_for_ldap_user: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CapacityPool(TrackedResource): - etag: Optional[str] - id: str - location: str - name: str - properties: PoolProperties - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.netapp.models.GetKeyVaultStatusResponse(_Model): + properties: Optional[GetKeyVaultStatusResponseProperties] def __getattr__(self, name: str) -> Any: ... @@ -5028,9 +4222,7 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - location: str, - properties: PoolProperties, - tags: Optional[dict[str, str]] = ... + properties: Optional[GetKeyVaultStatusResponseProperties] = ... ) -> None: ... @overload @@ -5043,262 +4235,275 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.CapacityPoolPatch(_Model): - id: Optional[str] - location: Optional[str] - name: Optional[str] - properties: Optional[PoolPatchProperties] - tags: Optional[dict[str, str]] - type: Optional[str] - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.models.GetKeyVaultStatusResponseProperties(_Model): + key_name: Optional[str] + key_vault_private_endpoints: Optional[list[KeyVaultPrivateEndpoint]] + key_vault_resource_id: Optional[str] + key_vault_uri: Optional[str] @overload def __init__( self, *, - location: Optional[str] = ..., - properties: Optional[PoolPatchProperties] = ..., - tags: Optional[dict[str, str]] = ... + key_name: Optional[str] = ..., + key_vault_private_endpoints: Optional[list[KeyVaultPrivateEndpoint]] = ..., + key_vault_resource_id: Optional[str] = ..., + key_vault_uri: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... + + class azure.mgmt.netapp.models.GlobalFileLockingState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.netapp.models.CertificateAkvDetails(_Model): - certificate_key_vault_uri: Optional[str] - certificate_name: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.HourlySchedule(_Model): + minute: Optional[int] + snapshots_to_keep: Optional[int] + used_bytes: Optional[int] @overload def __init__( self, *, - certificate_key_vault_uri: Optional[str] = ..., - certificate_name: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... + minute: Optional[int] = ..., + snapshots_to_keep: Optional[int] = ..., + used_bytes: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ChangeKeyVault(_Model): - key_name: str - key_vault_private_endpoints: list[KeyVaultPrivateEndpoint] - key_vault_resource_id: Optional[str] - key_vault_uri: str + class azure.mgmt.netapp.models.InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALREADY_EXISTS = "AlreadyExists" + INVALID = "Invalid" + + + class azure.mgmt.netapp.models.KerberosState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.netapp.models.KeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MICROSOFT_KEY_VAULT = "Microsoft.KeyVault" + MICROSOFT_NET_APP = "Microsoft.NetApp" + + + class azure.mgmt.netapp.models.KeyVaultPrivateEndpoint(_Model): + private_endpoint_id: Optional[str] + virtual_network_id: Optional[str] @overload def __init__( self, *, - key_name: str, - key_vault_private_endpoints: list[KeyVaultPrivateEndpoint], - key_vault_resource_id: Optional[str] = ..., - key_vault_uri: str + private_endpoint_id: Optional[str] = ..., + virtual_network_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ChangeZoneRequest(_Model): - new_zone: str + class azure.mgmt.netapp.models.KeyVaultProperties(_Model): + key_name: str + key_vault_id: Optional[str] + key_vault_resource_id: Optional[str] + key_vault_uri: str + status: Optional[Union[str, KeyVaultStatus]] @overload def __init__( self, *, - new_zone: str + key_name: str, + key_vault_resource_id: Optional[str] = ..., + key_vault_uri: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CheckAvailabilityResponse(_Model): - is_available: Optional[bool] - message: Optional[str] - reason: Optional[Union[str, InAvailabilityReasonType]] + class azure.mgmt.netapp.models.KeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATED = "Created" + DELETED = "Deleted" + ERROR = "Error" + IN_USE = "InUse" + UPDATING = "Updating" + + + class azure.mgmt.netapp.models.LdapSearchScopeOpt(_Model): + group_dn: Optional[str] + group_membership_filter: Optional[str] + user_dn: Optional[str] @overload def __init__( self, *, - is_available: Optional[bool] = ..., - message: Optional[str] = ..., - reason: Optional[Union[str, InAvailabilityReasonType]] = ... + group_dn: Optional[str] = ..., + group_membership_filter: Optional[str] = ..., + user_dn: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CheckElasticResourceAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALREADY_EXISTS = "AlreadyExists" - INVALID = "Invalid" + class azure.mgmt.netapp.models.LdapServerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE_DIRECTORY = "ActiveDirectory" + OPEN_LDAP = "OpenLDAP" - class azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse(_Model): - is_available: Optional[Union[str, CheckElasticResourceAvailabilityStatus]] - message: Optional[str] - reason: Optional[Union[str, CheckElasticResourceAvailabilityReason]] + class azure.mgmt.netapp.models.LdapState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.netapp.models.ListQuotaReportResponse(_Model): + quota_report_records: Optional[list[QuotaReport]] @overload def __init__( self, *, - is_available: Optional[Union[str, CheckElasticResourceAvailabilityStatus]] = ..., - message: Optional[str] = ..., - reason: Optional[Union[str, CheckElasticResourceAvailabilityReason]] = ... + quota_report_records: Optional[list[QuotaReport]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CheckElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FALSE = "False" - TRUE = "True" - - - class azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest(_Model): - file_path: str + class azure.mgmt.netapp.models.ListQuotaReportResult(_Model): + properties: Optional[ListQuotaReportResponse] @overload def __init__( self, *, - file_path: str + properties: Optional[ListQuotaReportResponse] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CheckNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" - - - class azure.mgmt.netapp.models.CheckQuotaNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups" - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" - - - class azure.mgmt.netapp.models.ChownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - RESTRICTED = "Restricted" - UNRESTRICTED = "Unrestricted" - - - class azure.mgmt.netapp.models.CifsChangeNotifyState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.CifsUser(_Model): - username: Optional[str] + class azure.mgmt.netapp.models.ListReplicationsRequest(_Model): + exclude: Optional[Union[str, Exclude]] @overload def __init__( self, *, - username: Optional[str] = ... + exclude: Optional[Union[str, Exclude]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ClusterPeerCommandResponse(_Model): - properties: Optional[ClusterPeerCommandResponseProperties] + class azure.mgmt.netapp.models.LogSpecification(_Model): + display_name: Optional[str] + name: Optional[str] @overload def __init__( self, *, - properties: Optional[ClusterPeerCommandResponseProperties] = ... + display_name: Optional[str] = ..., + name: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ClusterPeerCommandResponseProperties(_Model): - cluster_peering_command: Optional[str] - passphrase: Optional[str] + class azure.mgmt.netapp.models.ManagedServiceIdentity(_Model): + principal_id: Optional[str] + tenant_id: Optional[str] + type: Union[str, ManagedServiceIdentityType] + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] @overload def __init__( self, *, - cluster_peering_command: Optional[str] = ..., - passphrase: Optional[str] = ... + type: Union[str, ManagedServiceIdentityType], + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CoolAccessRetrievalPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEFAULT = "Default" - NEVER = "Never" - ON_READ = "OnRead" - - - class azure.mgmt.netapp.models.CoolAccessTieringPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AUTO = "Auto" - SNAPSHOT_ONLY = "SnapshotOnly" + class azure.mgmt.netapp.models.ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + USER_ASSIGNED = "UserAssigned" - class azure.mgmt.netapp.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - APPLICATION = "Application" - KEY = "Key" - MANAGED_IDENTITY = "ManagedIdentity" - USER = "User" + class azure.mgmt.netapp.models.MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AVERAGE = "Average" - class azure.mgmt.netapp.models.CredentialsAkvDetails(_Model): - credentials_key_vault_uri: Optional[str] - secret_name: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.MetricSpecification(_Model): + aggregation_type: Optional[str] + category: Optional[str] + dimensions: Optional[list[Dimension]] + display_description: Optional[str] + display_name: Optional[str] + enable_regional_mdm_account: Optional[bool] + fill_gap_with_zero: Optional[bool] + internal_metric_name: Optional[str] + is_internal: Optional[bool] + name: Optional[str] + resource_id_dimension_name_override: Optional[str] + source_mdm_account: Optional[str] + source_mdm_namespace: Optional[str] + supported_aggregation_types: Optional[list[Union[str, MetricAggregationType]]] + supported_time_grain_types: Optional[list[str]] + unit: Optional[str] @overload def __init__( self, *, - credentials_key_vault_uri: Optional[str] = ..., - secret_name: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... + aggregation_type: Optional[str] = ..., + category: Optional[str] = ..., + dimensions: Optional[list[Dimension]] = ..., + display_description: Optional[str] = ..., + display_name: Optional[str] = ..., + enable_regional_mdm_account: Optional[bool] = ..., + fill_gap_with_zero: Optional[bool] = ..., + internal_metric_name: Optional[str] = ..., + is_internal: Optional[bool] = ..., + name: Optional[str] = ..., + resource_id_dimension_name_override: Optional[str] = ..., + source_mdm_account: Optional[str] = ..., + source_mdm_namespace: Optional[str] = ..., + supported_aggregation_types: Optional[list[Union[str, MetricAggregationType]]] = ..., + supported_time_grain_types: Optional[list[str]] = ..., + unit: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.CredentialsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACTIVE = "Active" - CREDENTIALS_EXPIRED = "CredentialsExpired" - NO_CREDENTIALS_SET = "NoCredentialsSet" + class azure.mgmt.netapp.models.MirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BROKEN = "Broken" + MIRRORED = "Mirrored" + UNINITIALIZED = "Uninitialized" - class azure.mgmt.netapp.models.DailySchedule(_Model): + class azure.mgmt.netapp.models.MonthlySchedule(_Model): + days_of_month: Optional[str] hour: Optional[int] minute: Optional[int] snapshots_to_keep: Optional[int] @@ -5308,6 +4513,7 @@ namespace azure.mgmt.netapp.models def __init__( self, *, + days_of_month: Optional[str] = ..., hour: Optional[int] = ..., minute: Optional[int] = ..., snapshots_to_keep: Optional[int] = ..., @@ -5318,386 +4524,335 @@ namespace azure.mgmt.netapp.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FRIDAY = "Friday" - MONDAY = "Monday" - SATURDAY = "Saturday" - SUNDAY = "Sunday" - THURSDAY = "Thursday" - TUESDAY = "Tuesday" - WEDNESDAY = "Wednesday" - - - class azure.mgmt.netapp.models.DesiredRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.DestinationReplication(_Model): - region: Optional[str] - replication_type: Optional[Union[str, ReplicationType]] - resource_id: Optional[str] - zone: Optional[str] + class azure.mgmt.netapp.models.MountTargetProperties(_Model): + file_system_id: str + ip_address: Optional[str] + mount_target_id: Optional[str] + smb_server_fqdn: Optional[str] @overload def __init__( self, *, - region: Optional[str] = ..., - replication_type: Optional[Union[str, ReplicationType]] = ..., - resource_id: Optional[str] = ..., - zone: Optional[str] = ... + file_system_id: str, + smb_server_fqdn: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.Dimension(_Model): - display_name: Optional[str] - name: Optional[str] - - @overload - def __init__( - self, - *, - display_name: Optional[str] = ..., - name: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.MultiAdStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.netapp.models.ElasticAccount(TrackedResource): - e_tag: Optional[str] + class azure.mgmt.netapp.models.NetAppAccount(TrackedResource): + etag: Optional[str] id: str identity: Optional[ManagedServiceIdentity] location: str name: str - properties: Optional[ElasticAccountProperties] + properties: Optional[AccountProperties] system_data: SystemData tags: dict[str, str] type: str + def __getattr__(self, name: str) -> Any: ... + @overload def __init__( self, *, identity: Optional[ManagedServiceIdentity] = ..., location: str, - properties: Optional[ElasticAccountProperties] = ..., + properties: Optional[AccountProperties] = ..., tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ElasticAccountProperties(_Model): - encryption: Optional[ElasticEncryption] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - - @overload - def __init__( - self, - *, - encryption: Optional[ElasticEncryption] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.ElasticAccountUpdate(_Model): + class azure.mgmt.netapp.models.NetAppAccountPatch(_Model): + id: Optional[str] identity: Optional[ManagedServiceIdentity] - properties: Optional[ElasticAccountUpdateProperties] + location: Optional[str] + name: Optional[str] + properties: Optional[AccountProperties] tags: Optional[dict[str, str]] + type: Optional[str] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, identity: Optional[ManagedServiceIdentity] = ..., - properties: Optional[ElasticAccountUpdateProperties] = ..., + location: Optional[str] = ..., + properties: Optional[AccountProperties] = ..., tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.ElasticAccountUpdateProperties(_Model): - encryption: Optional[ElasticEncryption] - - @overload - def __init__( + def __setattr__( self, - *, - encryption: Optional[ElasticEncryption] = ... + key: str, + value: Any ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.mgmt.netapp.models.NetAppProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACCEPTED = "Accepted" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + MOVING = "Moving" + PATCHING = "Patching" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" - class azure.mgmt.netapp.models.ElasticBackup(ProxyResource): - id: str - name: str - properties: Optional[ElasticBackupProperties] - system_data: SystemData - type: str + class azure.mgmt.netapp.models.NetworkFeatures(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BASIC = "Basic" + BASIC_STANDARD = "Basic_Standard" + STANDARD = "Standard" + STANDARD_BASIC = "Standard_Basic" + + + class azure.mgmt.netapp.models.NetworkSiblingSet(_Model): + network_features: Optional[Union[str, NetworkFeatures]] + network_sibling_set_id: Optional[str] + network_sibling_set_state_id: Optional[str] + nic_info_list: Optional[list[NicInfo]] + provisioning_state: Optional[Union[str, NetworkSiblingSetProvisioningState]] + subnet_id: Optional[str] @overload def __init__( self, *, - properties: Optional[ElasticBackupProperties] = ... + network_features: Optional[Union[str, NetworkFeatures]] = ..., + network_sibling_set_id: Optional[str] = ..., + network_sibling_set_state_id: Optional[str] = ..., + nic_info_list: Optional[list[NicInfo]] = ..., + subnet_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupPolicy(TrackedResource): - e_tag: Optional[str] - id: str - location: str - name: str - properties: Optional[ElasticBackupPolicyProperties] - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.netapp.models.NetworkSiblingSetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.netapp.models.NfsUser(_Model): + group_id: Optional[int] + user_id: Optional[int] @overload def __init__( self, *, - location: str, - properties: Optional[ElasticBackupPolicyProperties] = ..., - tags: Optional[dict[str, str]] = ... + group_id: Optional[int] = ..., + user_id: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupPolicyProperties(_Model): - assigned_volumes_count: Optional[int] - daily_backups_to_keep: Optional[int] - monthly_backups_to_keep: Optional[int] - policy_state: Optional[Union[str, ElasticBackupPolicyState]] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - weekly_backups_to_keep: Optional[int] + class azure.mgmt.netapp.models.NicInfo(_Model): + ip_address: Optional[str] + volume_resource_ids: Optional[list[str]] @overload def __init__( self, *, - daily_backups_to_keep: Optional[int] = ..., - monthly_backups_to_keep: Optional[int] = ..., - policy_state: Optional[Union[str, ElasticBackupPolicyState]] = ..., - weekly_backups_to_keep: Optional[int] = ... + volume_resource_ids: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupPolicyState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + class azure.mgmt.netapp.models.OnCertificateConflictAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FAIL = "Fail" + UPDATE = "Update" - class azure.mgmt.netapp.models.ElasticBackupPolicyUpdate(_Model): - properties: Optional[ElasticBackupPolicyUpdateProperties] - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.Operation(_Model): + display: Optional[OperationDisplay] + name: Optional[str] + origin: Optional[str] + properties: Optional[OperationProperties] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - properties: Optional[ElasticBackupPolicyUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... + display: Optional[OperationDisplay] = ..., + name: Optional[str] = ..., + origin: Optional[str] = ..., + properties: Optional[OperationProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupPolicyUpdateProperties(_Model): - daily_backups_to_keep: Optional[int] - monthly_backups_to_keep: Optional[int] - policy_state: Optional[Union[str, ElasticBackupPolicyState]] - weekly_backups_to_keep: Optional[int] + + class azure.mgmt.netapp.models.OperationDisplay(_Model): + description: Optional[str] + operation: Optional[str] + provider: Optional[str] + resource: Optional[str] @overload def __init__( self, *, - daily_backups_to_keep: Optional[int] = ..., - monthly_backups_to_keep: Optional[int] = ..., - policy_state: Optional[Union[str, ElasticBackupPolicyState]] = ..., - weekly_backups_to_keep: Optional[int] = ... + description: Optional[str] = ..., + operation: Optional[str] = ..., + provider: Optional[str] = ..., + resource: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupProperties(_Model): - backup_type: Optional[Union[str, ElasticBackupType]] - completion_date: Optional[datetime] - creation_date: Optional[datetime] - elastic_backup_policy_resource_id: Optional[str] - elastic_snapshot_resource_id: Optional[str] - elastic_volume_resource_id: str - failure_reason: Optional[str] - label: Optional[str] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - size: Optional[int] - snapshot_creation_date: Optional[datetime] - snapshot_usage: Optional[Union[str, SnapshotUsage]] - volume_size: Optional[Union[str, VolumeSize]] + class azure.mgmt.netapp.models.OperationProperties(_Model): + service_specification: Optional[ServiceSpecification] @overload def __init__( self, *, - elastic_snapshot_resource_id: Optional[str] = ..., - elastic_volume_resource_id: str, - label: Optional[str] = ..., - snapshot_usage: Optional[Union[str, SnapshotUsage]] = ... + service_specification: Optional[ServiceSpecification] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MANUAL = "Manual" - SCHEDULED = "Scheduled" - - - class azure.mgmt.netapp.models.ElasticBackupVault(TrackedResource): - e_tag: Optional[str] - id: str - location: str - name: str - properties: Optional[ElasticBackupVaultProperties] - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.netapp.models.OriginClusterInformation(_Model): + peer_addresses: list[str] + peer_cluster_name: str + peer_volume_name: str + peer_vserver_name: str @overload def __init__( self, *, - location: str, - properties: Optional[ElasticBackupVaultProperties] = ..., - tags: Optional[dict[str, str]] = ... + peer_addresses: list[str], + peer_cluster_name: str, + peer_volume_name: str, + peer_vserver_name: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticBackupVaultProperties(_Model): - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - - - class azure.mgmt.netapp.models.ElasticBackupVaultUpdate(_Model): - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest(_Model): + peer_ip_addresses: list[str] @overload def __init__( self, *, - tags: Optional[dict[str, str]] = ... + peer_ip_addresses: list[str] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticCapacityPool(TrackedResource): - e_tag: Optional[str] - id: str - location: str - name: str - properties: Optional[ElasticCapacityPoolProperties] - system_data: SystemData - tags: dict[str, str] - type: str - zones: Optional[list[str]] + class azure.mgmt.netapp.models.PeeringPassphrases(_Model): + cluster_peering_command: str + cluster_peering_passphrase: str + critical_warning: Optional[str] + vserver_peering_command: str @overload def __init__( self, *, - location: str, - properties: Optional[ElasticCapacityPoolProperties] = ..., - tags: Optional[dict[str, str]] = ..., - zones: Optional[list[str]] = ... + cluster_peering_command: str, + cluster_peering_passphrase: str, + vserver_peering_command: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticCapacityPoolProperties(_Model): - active_directory_config_resource_id: Optional[str] - availability_status: Optional[Union[str, ElasticResourceAvailabilityStatus]] - current_zone: Optional[str] - encryption: Optional[ElasticEncryptionConfiguration] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - service_level: Union[str, ElasticServiceLevel] - size: int - subnet_resource_id: str - total_throughput_mibps: Optional[float] + class azure.mgmt.netapp.models.PlacementKeyValuePairs(_Model): + key: str + value: str @overload def __init__( self, *, - active_directory_config_resource_id: Optional[str] = ..., - encryption: Optional[ElasticEncryptionConfiguration] = ..., - service_level: Union[str, ElasticServiceLevel], - size: int, - subnet_resource_id: str + key: str, + value: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticCapacityPoolUpdate(_Model): - properties: Optional[ElasticCapacityPoolUpdateProperties] - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.PoolChangeRequest(_Model): + new_pool_resource_id: str @overload def __init__( self, *, - properties: Optional[ElasticCapacityPoolUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... + new_pool_resource_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticCapacityPoolUpdateProperties(_Model): - active_directory_config_resource_id: Optional[str] - encryption: Optional[ElasticEncryptionConfiguration] + class azure.mgmt.netapp.models.PoolPatchProperties(_Model): + cool_access: Optional[bool] + custom_throughput_mibps: Optional[int] + qos_type: Optional[Union[str, QosType]] size: Optional[int] @overload def __init__( self, *, - active_directory_config_resource_id: Optional[str] = ..., - encryption: Optional[ElasticEncryptionConfiguration] = ..., + cool_access: Optional[bool] = ..., + custom_throughput_mibps: Optional[int] = ..., + qos_type: Optional[Union[str, QosType]] = ..., size: Optional[int] = ... ) -> None: ... @@ -5705,857 +4860,818 @@ namespace azure.mgmt.netapp.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticEncryption(_Model): - identity: Optional[ElasticEncryptionIdentity] - key_source: Optional[Union[str, KeySource]] - key_vault_properties: Optional[ElasticKeyVaultProperties] + class azure.mgmt.netapp.models.PoolProperties(_Model): + cool_access: Optional[bool] + custom_throughput_mibps: Optional[int] + encryption_type: Optional[Union[str, EncryptionType]] + pool_id: Optional[str] + provisioning_state: Optional[str] + qos_type: Optional[Union[str, QosType]] + service_level: Union[str, ServiceLevel] + size: int + total_throughput_mibps: Optional[float] + utilized_throughput_mibps: Optional[float] @overload def __init__( self, *, - identity: Optional[ElasticEncryptionIdentity] = ..., - key_source: Optional[Union[str, KeySource]] = ..., - key_vault_properties: Optional[ElasticKeyVaultProperties] = ... + cool_access: Optional[bool] = ..., + custom_throughput_mibps: Optional[int] = ..., + encryption_type: Optional[Union[str, EncryptionType]] = ..., + qos_type: Optional[Union[str, QosType]] = ..., + service_level: Union[str, ServiceLevel], + size: int ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticEncryptionConfiguration(_Model): - elastic_pool_encryption_key_source: Union[str, ElasticPoolEncryptionKeySource] - key_vault_private_endpoint_resource_id: str + class azure.mgmt.netapp.models.ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NF_SV3 = "NFSv3" + NF_SV4 = "NFSv4" + SMB = "SMB" + + + class azure.mgmt.netapp.models.ProxyResource(Resource): + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.netapp.models.QosType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTO = "Auto" + MANUAL = "Manual" + + + class azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest(_Model): + network_sibling_set_id: str + subnet_id: str @overload def __init__( self, *, - elastic_pool_encryption_key_source: Union[str, ElasticPoolEncryptionKeySource], - key_vault_private_endpoint_resource_id: str + network_sibling_set_id: str, + subnet_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticEncryptionIdentity(_Model): - federated_client_id: Optional[str] - principal_id: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.QuotaAvailabilityRequest(_Model): + name: str + resource_group: str + type: Union[str, CheckQuotaNameResourceTypes] @overload def __init__( self, *, - federated_client_id: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... + name: str, + resource_group: str, + type: Union[str, CheckQuotaNameResourceTypes] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticExportPolicy(_Model): - rules: Optional[list[ElasticExportPolicyRule]] + class azure.mgmt.netapp.models.QuotaItem(ProxyResource): + id: str + name: str + properties: Optional[QuotaItemProperties] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - rules: Optional[list[ElasticExportPolicyRule]] = ... + properties: Optional[QuotaItemProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.ElasticExportPolicyRule(_Model): - allowed_clients: Optional[list[str]] - nfsv3: Optional[Union[str, ElasticNfsv3Access]] - nfsv4: Optional[Union[str, ElasticNfsv4Access]] - root_access: Optional[Union[str, ElasticRootAccess]] - rule_index: Optional[int] - unix_access_rule: Optional[Union[str, ElasticUnixAccessRule]] - - @overload - def __init__( + def __setattr__( self, - *, - allowed_clients: Optional[list[str]] = ..., - nfsv3: Optional[Union[str, ElasticNfsv3Access]] = ..., - nfsv4: Optional[Union[str, ElasticNfsv4Access]] = ..., - root_access: Optional[Union[str, ElasticRootAccess]] = ..., - rule_index: Optional[int] = ..., - unix_access_rule: Optional[Union[str, ElasticUnixAccessRule]] = ... + key: str, + value: Any ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.QuotaItemProperties(_Model): + current: Optional[int] + default: Optional[int] + usage: Optional[int] - class azure.mgmt.netapp.models.ElasticKeyVaultProperties(_Model): - key_name: Optional[str] - key_vault_resource_id: Optional[str] - key_vault_uri: Optional[str] - status: Optional[Union[str, ElasticKeyVaultStatus]] + + class azure.mgmt.netapp.models.QuotaReport(_Model): + is_derived_quota: Optional[bool] + percentage_used: Optional[float] + quota_limit_total_in_ki_bs: Optional[int] + quota_limit_used_in_ki_bs: Optional[int] + quota_target: Optional[str] + quota_type: Optional[Union[str, QuotaType]] @overload def __init__( self, *, - key_name: Optional[str] = ..., - key_vault_resource_id: Optional[str] = ..., - key_vault_uri: Optional[str] = ... + is_derived_quota: Optional[bool] = ..., + percentage_used: Optional[float] = ..., + quota_limit_total_in_ki_bs: Optional[int] = ..., + quota_limit_used_in_ki_bs: Optional[int] = ..., + quota_target: Optional[str] = ..., + quota_type: Optional[Union[str, QuotaType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticKeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CREATED = "Created" - DELETED = "Deleted" - ERROR = "Error" - IN_USE = "InUse" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.ElasticMountTargetProperties(_Model): - ip_address: Optional[str] - smb_server_fqdn: Optional[str] - - - class azure.mgmt.netapp.models.ElasticNfsv3Access(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.ElasticNfsv4Access(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.ElasticPoolEncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): - KEY_VAULT = "KeyVault" - NET_APP = "NetApp" - - - class azure.mgmt.netapp.models.ElasticProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NF_SV3 = "NFSv3" - NF_SV4 = "NFSv4" - SMB = "SMB" - - - class azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - OFFLINE = "Offline" - ONLINE = "Online" - - - class azure.mgmt.netapp.models.ElasticRootAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.ElasticServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ZONE_REDUNDANT = "ZoneRedundant" - - - class azure.mgmt.netapp.models.ElasticSmbEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.ElasticSmbPatchProperties(_Model): - smb_encryption: Optional[Union[str, ElasticSmbEncryption]] + class azure.mgmt.netapp.models.QuotaReportFilterRequest(_Model): + quota_target: Optional[str] + quota_type: Optional[Union[str, QuotaType]] + usage_threshold_percentage: Optional[int] @overload def __init__( self, *, - smb_encryption: Optional[Union[str, ElasticSmbEncryption]] = ... + quota_target: Optional[str] = ..., + quota_type: Optional[Union[str, QuotaType]] = ..., + usage_threshold_percentage: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSmbProperties(_Model): - smb_encryption: Optional[Union[str, ElasticSmbEncryption]] + class azure.mgmt.netapp.models.QuotaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT_GROUP_QUOTA = "DefaultGroupQuota" + DEFAULT_USER_QUOTA = "DefaultUserQuota" + INDIVIDUAL_GROUP_QUOTA = "IndividualGroupQuota" + INDIVIDUAL_USER_QUOTA = "IndividualUserQuota" + + + class azure.mgmt.netapp.models.RansomwareProtectionPatchSettings(_Model): + desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] @overload def __init__( self, *, - smb_encryption: Optional[Union[str, ElasticSmbEncryption]] = ... + desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshot(ProxyResource): - id: str - name: str - properties: Optional[ElasticSnapshotProperties] - system_data: SystemData - type: str + class azure.mgmt.netapp.models.RansomwareProtectionSettings(_Model): + actual_ransomware_protection_state: Optional[Union[str, ActualRansomwareProtectionState]] + desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] @overload def __init__( self, *, - properties: Optional[ElasticSnapshotProperties] = ... + desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicy(TrackedResource): - e_tag: Optional[str] + class azure.mgmt.netapp.models.RansomwareReport(ProxyResource): id: str - location: str name: str - properties: Optional[ElasticSnapshotPolicyProperties] + properties: Optional[RansomwareReportProperties] system_data: SystemData - tags: dict[str, str] type: str @overload def __init__( self, *, - location: str, - properties: Optional[ElasticSnapshotPolicyProperties] = ..., - tags: Optional[dict[str, str]] = ... + properties: Optional[RansomwareReportProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule(_Model): - hour: Optional[int] - minute: Optional[int] - snapshots_to_keep: Optional[int] + class azure.mgmt.netapp.models.RansomwareReportProperties(_Model): + cleared_count: Optional[int] + event_time: Optional[datetime] + provisioning_state: Optional[str] + reported_count: Optional[int] + severity: Optional[Union[str, RansomwareReportSeverity]] + state: Optional[Union[str, RansomwareReportState]] + suspects: Optional[list[RansomwareSuspects]] - @overload - def __init__( - self, - *, - hour: Optional[int] = ..., - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.RansomwareReportSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + HIGH = "High" + LOW = "Low" + MODERATE = "Moderate" + NONE = "None" - class azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule(_Model): - minute: Optional[int] - snapshots_to_keep: Optional[int] + class azure.mgmt.netapp.models.RansomwareReportState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE = "Active" + RESOLVED = "Resolved" - @overload - def __init__( - self, - *, - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.RansomwareSuspectResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FALSE_POSITIVE = "FalsePositive" + POTENTIAL_THREAT = "PotentialThreat" - class azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule(_Model): - days_of_month: Optional[list[int]] - hour: Optional[int] - minute: Optional[int] - snapshots_to_keep: Optional[int] + class azure.mgmt.netapp.models.RansomwareSuspects(_Model): + extension: Optional[str] + file_count: Optional[int] + resolution: Optional[Union[str, RansomwareSuspectResolution]] + suspect_files: Optional[list[SuspectFile]] + + + class azure.mgmt.netapp.models.RansomwareSuspectsClearRequest(_Model): + extensions: list[str] + resolution: Union[str, RansomwareSuspectResolution] @overload def __init__( self, *, - days_of_month: Optional[list[int]] = ..., - hour: Optional[int] = ..., - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ... + extensions: list[str], + resolution: Union[str, RansomwareSuspectResolution] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicyProperties(_Model): - daily_schedule: Optional[ElasticSnapshotPolicyDailySchedule] - hourly_schedule: Optional[ElasticSnapshotPolicyHourlySchedule] - monthly_schedule: Optional[ElasticSnapshotPolicyMonthlySchedule] - policy_status: Optional[Union[str, PolicyStatus]] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - weekly_schedule: Optional[ElasticSnapshotPolicyWeeklySchedule] + class azure.mgmt.netapp.models.ReestablishReplicationRequest(_Model): + source_volume_id: Optional[str] @overload def __init__( self, *, - daily_schedule: Optional[ElasticSnapshotPolicyDailySchedule] = ..., - hourly_schedule: Optional[ElasticSnapshotPolicyHourlySchedule] = ..., - monthly_schedule: Optional[ElasticSnapshotPolicyMonthlySchedule] = ..., - policy_status: Optional[Union[str, PolicyStatus]] = ..., - weekly_schedule: Optional[ElasticSnapshotPolicyWeeklySchedule] = ... + source_volume_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate(_Model): - properties: Optional[ElasticSnapshotPolicyUpdateProperties] - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.RegionInfo(_Model): + availability_zone_mappings: Optional[list[RegionInfoAvailabilityZoneMappingsItem]] + storage_to_network_proximity: Optional[Union[str, RegionStorageToNetworkProximity]] @overload def __init__( self, *, - properties: Optional[ElasticSnapshotPolicyUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... + availability_zone_mappings: Optional[list[RegionInfoAvailabilityZoneMappingsItem]] = ..., + storage_to_network_proximity: Optional[Union[str, RegionStorageToNetworkProximity]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdateProperties(_Model): - daily_schedule: Optional[ElasticSnapshotPolicyDailySchedule] - hourly_schedule: Optional[ElasticSnapshotPolicyHourlySchedule] - monthly_schedule: Optional[ElasticSnapshotPolicyMonthlySchedule] - policy_status: Optional[Union[str, PolicyStatus]] - weekly_schedule: Optional[ElasticSnapshotPolicyWeeklySchedule] + class azure.mgmt.netapp.models.RegionInfoAvailabilityZoneMappingsItem(_Model): + availability_zone: Optional[str] + is_available: Optional[bool] @overload def __init__( self, *, - daily_schedule: Optional[ElasticSnapshotPolicyDailySchedule] = ..., - hourly_schedule: Optional[ElasticSnapshotPolicyHourlySchedule] = ..., - monthly_schedule: Optional[ElasticSnapshotPolicyMonthlySchedule] = ..., - policy_status: Optional[Union[str, PolicyStatus]] = ..., - weekly_schedule: Optional[ElasticSnapshotPolicyWeeklySchedule] = ... + availability_zone: Optional[str] = ..., + is_available: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule(_Model): - days: Optional[list[Union[str, DayOfWeek]]] - hour: Optional[int] - minute: Optional[int] - snapshots_to_keep: Optional[int] + class azure.mgmt.netapp.models.RegionInfoResource(ProxyResource): + id: str + name: str + properties: Optional[RegionInfo] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - days: Optional[list[Union[str, DayOfWeek]]] = ..., - hour: Optional[int] = ..., - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ... + properties: Optional[RegionInfo] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.ElasticSnapshotProperties(_Model): - provisioning_state: Optional[Union[str, NetAppProvisioningState]] + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ElasticUnixAccessRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NO_ACCESS = "NoAccess" - READ_ONLY = "ReadOnly" - READ_WRITE = "ReadWrite" + class azure.mgmt.netapp.models.RegionStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACROSS_T2 = "AcrossT2" + DEFAULT = "Default" + T1 = "T1" + T1_AND_ACROSS_T2 = "T1AndAcrossT2" + T1_AND_T2 = "T1AndT2" + T1_AND_T2_AND_ACROSS_T2 = "T1AndT2AndAcrossT2" + T2 = "T2" + T2_AND_ACROSS_T2 = "T2AndAcrossT2" - class azure.mgmt.netapp.models.ElasticVolume(TrackedResource): - e_tag: Optional[str] - id: str - location: str - name: str - properties: Optional[ElasticVolumeProperties] - system_data: SystemData - tags: dict[str, str] - type: str - zones: Optional[list[str]] + class azure.mgmt.netapp.models.RelocateVolumeRequest(_Model): + creation_token: Optional[str] @overload def __init__( self, *, - location: str, - properties: Optional[ElasticVolumeProperties] = ..., - tags: Optional[dict[str, str]] = ..., - zones: Optional[list[str]] = ... + creation_token: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumeBackupProperties(_Model): - elastic_backup_policy_resource_id: Optional[str] - elastic_backup_vault_resource_id: Optional[str] - policy_enforcement: Optional[Union[str, ElasticVolumePolicyEnforcement]] + class azure.mgmt.netapp.models.RemotePath(_Model): + external_host_name: str + server_name: str + volume_name: str @overload def __init__( self, *, - elastic_backup_policy_resource_id: Optional[str] = ..., - elastic_backup_vault_resource_id: Optional[str] = ..., - policy_enforcement: Optional[Union[str, ElasticVolumePolicyEnforcement]] = ... + external_host_name: str, + server_name: str, + volume_name: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumeDataProtectionPatchProperties(_Model): - backup: Optional[ElasticVolumeBackupProperties] - snapshot: Optional[ElasticVolumeSnapshotProperties] - - @overload - def __init__( - self, - *, - backup: Optional[ElasticVolumeBackupProperties] = ..., - snapshot: Optional[ElasticVolumeSnapshotProperties] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.ElasticVolumeDataProtectionProperties(_Model): - backup: Optional[ElasticVolumeBackupProperties] - snapshot: Optional[ElasticVolumeSnapshotProperties] + class azure.mgmt.netapp.models.Replication(_Model): + endpoint_type: Optional[Union[str, EndpointType]] + mirror_state: Optional[Union[str, ReplicationMirrorState]] + remote_volume_region: Optional[str] + remote_volume_resource_id: Optional[str] + replication_creation_time: Optional[datetime] + replication_deletion_time: Optional[datetime] + replication_id: Optional[str] + replication_schedule: Optional[Union[str, ReplicationSchedule]] @overload def __init__( self, *, - backup: Optional[ElasticVolumeBackupProperties] = ..., - snapshot: Optional[ElasticVolumeSnapshotProperties] = ... + endpoint_type: Optional[Union[str, EndpointType]] = ..., + remote_volume_region: Optional[str] = ..., + remote_volume_resource_id: Optional[str] = ..., + replication_schedule: Optional[Union[str, ReplicationSchedule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumePolicyEnforcement(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ENFORCED = "Enforced" - NOT_ENFORCED = "NotEnforced" + class azure.mgmt.netapp.models.ReplicationMirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BROKEN = "Broken" + MIRRORED = "Mirrored" + UNINITIALIZED = "Uninitialized" - class azure.mgmt.netapp.models.ElasticVolumeProperties(_Model): - availability_status: Optional[Union[str, ElasticResourceAvailabilityStatus]] - backup_resource_id: Optional[str] - data_protection: Optional[ElasticVolumeDataProtectionProperties] - export_policy: Optional[ElasticExportPolicy] - file_path: str - mount_targets: Optional[list[ElasticMountTargetProperties]] - protocol_types: list[Union[str, ElasticProtocolType]] - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - restoration_state: Optional[Union[str, ElasticVolumeRestorationState]] - size: int - smb_properties: Optional[ElasticSmbProperties] - snapshot_directory_visibility: Optional[Union[str, SnapshotDirectoryVisibility]] - snapshot_resource_id: Optional[str] + class azure.mgmt.netapp.models.ReplicationObject(_Model): + destination_replications: Optional[list[DestinationReplication]] + endpoint_type: Optional[Union[str, EndpointType]] + external_replication_setup_info: Optional[str] + external_replication_setup_status: Optional[Union[str, ExternalReplicationSetupStatus]] + mirror_state: Optional[Union[str, MirrorState]] + relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] + remote_path: Optional[RemotePath] + remote_volume_region: Optional[str] + remote_volume_resource_id: Optional[str] + replication_id: Optional[str] + replication_schedule: Optional[Union[str, ReplicationSchedule]] @overload def __init__( self, *, - backup_resource_id: Optional[str] = ..., - data_protection: Optional[ElasticVolumeDataProtectionProperties] = ..., - export_policy: Optional[ElasticExportPolicy] = ..., - file_path: str, - protocol_types: list[Union[str, ElasticProtocolType]], - size: int, - smb_properties: Optional[ElasticSmbProperties] = ..., - snapshot_directory_visibility: Optional[Union[str, SnapshotDirectoryVisibility]] = ..., - snapshot_resource_id: Optional[str] = ... + remote_path: Optional[RemotePath] = ..., + remote_volume_region: Optional[str] = ..., + remote_volume_resource_id: Optional[str] = ..., + replication_schedule: Optional[Union[str, ReplicationSchedule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumeRestorationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FAILED = "Failed" - RESTORED = "Restored" - RESTORING = "Restoring" + class azure.mgmt.netapp.models.ReplicationSchedule(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DAILY = "daily" + ENUM_10_MINUTELY = "_10minutely" + HOURLY = "hourly" - class azure.mgmt.netapp.models.ElasticVolumeRevert(_Model): - snapshot_resource_id: Optional[str] + class azure.mgmt.netapp.models.ReplicationStatus(_Model): + error_message: Optional[str] + healthy: Optional[bool] + mirror_state: Optional[Union[str, MirrorState]] + relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] + total_progress: Optional[str] @overload def __init__( self, *, - snapshot_resource_id: Optional[str] = ... + error_message: Optional[str] = ..., + healthy: Optional[bool] = ..., + mirror_state: Optional[Union[str, MirrorState]] = ..., + relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] = ..., + total_progress: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties(_Model): - snapshot_policy_resource_id: Optional[str] + class azure.mgmt.netapp.models.ReplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CROSS_REGION_REPLICATION = "CrossRegionReplication" + CROSS_ZONE_REPLICATION = "CrossZoneReplication" + + + class azure.mgmt.netapp.models.Resource(_Model): + id: Optional[str] + name: Optional[str] + system_data: Optional[SystemData] + type: Optional[str] + + + class azure.mgmt.netapp.models.ResourceNameAvailabilityRequest(_Model): + name: str + resource_group: str + type: Union[str, CheckNameResourceTypes] @overload def __init__( self, *, - snapshot_policy_resource_id: Optional[str] = ... + name: str, + resource_group: str, + type: Union[str, CheckNameResourceTypes] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ElasticVolumeUpdate(_Model): - properties: Optional[ElasticVolumeUpdateProperties] - tags: Optional[dict[str, str]] + class azure.mgmt.netapp.models.RestoreStatus(_Model): + error_message: Optional[str] + healthy: Optional[bool] + mirror_state: Optional[Union[str, MirrorState]] + relationship_status: Optional[Union[str, VolumeRestoreRelationshipStatus]] + total_transfer_bytes: Optional[int] + unhealthy_reason: Optional[str] - @overload - def __init__( - self, - *, - properties: Optional[ElasticVolumeUpdateProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NTFS = "ntfs" + UNIX = "unix" - class azure.mgmt.netapp.models.ElasticVolumeUpdateProperties(_Model): - data_protection: Optional[ElasticVolumeDataProtectionPatchProperties] - export_policy: Optional[ElasticExportPolicy] - size: Optional[int] - smb_properties: Optional[ElasticSmbPatchProperties] - snapshot_directory_visibility: Optional[Union[str, SnapshotDirectoryVisibility]] + class azure.mgmt.netapp.models.ServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FLEXIBLE = "Flexible" + PREMIUM = "Premium" + STANDARD = "Standard" + STANDARD_ZRS = "StandardZRS" + ULTRA = "Ultra" + + + class azure.mgmt.netapp.models.ServiceSpecification(_Model): + log_specifications: Optional[list[LogSpecification]] + metric_specifications: Optional[list[MetricSpecification]] @overload def __init__( self, *, - data_protection: Optional[ElasticVolumeDataProtectionPatchProperties] = ..., - export_policy: Optional[ElasticExportPolicy] = ..., - size: Optional[int] = ..., - smb_properties: Optional[ElasticSmbPatchProperties] = ..., - snapshot_directory_visibility: Optional[Union[str, SnapshotDirectoryVisibility]] = ... + log_specifications: Optional[list[LogSpecification]] = ..., + metric_specifications: Optional[list[MetricSpecification]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + class azure.mgmt.netapp.models.SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" ENABLED = "Enabled" - class azure.mgmt.netapp.models.EnableWriteBackState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + class azure.mgmt.netapp.models.SmbEncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" ENABLED = "Enabled" - class azure.mgmt.netapp.models.EncryptionIdentity(_Model): - federated_client_id: Optional[str] - principal_id: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.netapp.models.SmbSettings(_Model): + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] + smb_encryption: Optional[Union[str, SmbEncryptionState]] + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] @overload def __init__( self, *, - federated_client_id: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., + smb_encryption: Optional[Union[str, SmbEncryptionState]] = ..., + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MICROSOFT_KEY_VAULT = "Microsoft.KeyVault" - MICROSOFT_NET_APP = "Microsoft.NetApp" - - - class azure.mgmt.netapp.models.EncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - + class azure.mgmt.netapp.models.Snapshot(ProxyResource): + id: str + location: str + name: str + properties: Optional[SnapshotProperties] + system_data: SystemData + type: str - class azure.mgmt.netapp.models.EncryptionTransitionRequest(_Model): - private_endpoint_id: str - virtual_network_id: str + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - private_endpoint_id: str, - virtual_network_id: str + location: str, + properties: Optional[SnapshotProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.EncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DOUBLE = "Double" - SINGLE = "Single" + class azure.mgmt.netapp.models.SnapshotPatch(_Model): - class azure.mgmt.netapp.models.EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DST = "dst" - SRC = "src" + class azure.mgmt.netapp.models.SnapshotPolicy(TrackedResource): + etag: Optional[str] + id: str + location: str + name: str + properties: SnapshotPolicyProperties + system_data: SystemData + tags: dict[str, str] + type: str - class azure.mgmt.netapp.models.EntraIdAkvConfig(_Model): - azure_key_vault_uri: str - certificate_name: str - user_assigned_identity: Optional[str] + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - azure_key_vault_uri: str, - certificate_name: str, - user_assigned_identity: Optional[str] = ... + location: str, + properties: SnapshotPolicyProperties, + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + - class azure.mgmt.netapp.models.EntraIdAkvConfigPatch(_Model): - azure_key_vault_uri: Optional[str] - certificate_name: Optional[str] - user_assigned_identity: Optional[str] + class azure.mgmt.netapp.models.SnapshotPolicyPatch(_Model): + id: Optional[str] + location: Optional[str] + name: Optional[str] + properties: Optional[SnapshotPolicyProperties] + tags: Optional[dict[str, str]] + type: Optional[str] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - azure_key_vault_uri: Optional[str] = ..., - certificate_name: Optional[str] = ..., - user_assigned_identity: Optional[str] = ... + location: Optional[str] = ..., + properties: Optional[SnapshotPolicyProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.EntraIdConfig(_Model): - application_id: str - domain: str - entra_id_akv_config: Optional[EntraIdAkvConfig] - server_name_prefix: str + + class azure.mgmt.netapp.models.SnapshotPolicyProperties(_Model): + daily_schedule: Optional[DailySchedule] + enabled: Optional[bool] + hourly_schedule: Optional[HourlySchedule] + monthly_schedule: Optional[MonthlySchedule] + provisioning_state: Optional[str] + weekly_schedule: Optional[WeeklySchedule] @overload def __init__( self, *, - application_id: str, - domain: str, - entra_id_akv_config: Optional[EntraIdAkvConfig] = ..., - server_name_prefix: str + daily_schedule: Optional[DailySchedule] = ..., + enabled: Optional[bool] = ..., + hourly_schedule: Optional[HourlySchedule] = ..., + monthly_schedule: Optional[MonthlySchedule] = ..., + weekly_schedule: Optional[WeeklySchedule] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.EntraIdConfigPatch(_Model): - application_id: Optional[str] - domain: Optional[str] - entra_id_akv_config: Optional[EntraIdAkvConfigPatch] - server_name_prefix: Optional[str] + class azure.mgmt.netapp.models.SnapshotPolicyVolumeList(_Model): + next_link: Optional[str] + value: list[Volume] @overload def __init__( self, *, - application_id: Optional[str] = ..., - domain: Optional[str] = ..., - entra_id_akv_config: Optional[EntraIdAkvConfigPatch] = ..., - server_name_prefix: Optional[str] = ... + next_link: Optional[str] = ..., + value: list[Volume] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ErrorAdditionalInfo(_Model): - info: Optional[Any] - type: Optional[str] - - - class azure.mgmt.netapp.models.ErrorDetail(_Model): - additional_info: Optional[list[ErrorAdditionalInfo]] - code: Optional[str] - details: Optional[list[ErrorDetail]] - message: Optional[str] - target: Optional[str] + class azure.mgmt.netapp.models.SnapshotProperties(_Model): + created: Optional[datetime] + provisioning_state: Optional[str] + snapshot_id: Optional[str] - class azure.mgmt.netapp.models.ErrorResponse(_Model): - error: Optional[ErrorDetail] + class azure.mgmt.netapp.models.SnapshotRestoreFiles(_Model): + destination_path: Optional[str] + file_paths: list[str] @overload def __init__( self, *, - error: Optional[ErrorDetail] = ... + destination_path: Optional[str] = ..., + file_paths: list[str] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.Exclude(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DELETED = "Deleted" - NONE = "None" - + class azure.mgmt.netapp.models.SubvolumeInfo(ProxyResource): + id: str + name: str + properties: Optional[SubvolumeProperties] + system_data: SystemData + type: str - class azure.mgmt.netapp.models.ExportPolicyRule(_Model): - allowed_clients: Optional[str] - chown_mode: Optional[Union[str, ChownMode]] - cifs: Optional[bool] - has_root_access: Optional[bool] - kerberos5_i_read_only: Optional[bool] - kerberos5_i_read_write: Optional[bool] - kerberos5_p_read_only: Optional[bool] - kerberos5_p_read_write: Optional[bool] - kerberos5_read_only: Optional[bool] - kerberos5_read_write: Optional[bool] - nfsv3: Optional[bool] - nfsv41: Optional[bool] - rule_index: Optional[int] - unix_read_only: Optional[bool] - unix_read_write: Optional[bool] + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - allowed_clients: Optional[str] = ..., - chown_mode: Optional[Union[str, ChownMode]] = ..., - cifs: Optional[bool] = ..., - has_root_access: Optional[bool] = ..., - kerberos5_i_read_only: Optional[bool] = ..., - kerberos5_i_read_write: Optional[bool] = ..., - kerberos5_p_read_only: Optional[bool] = ..., - kerberos5_p_read_write: Optional[bool] = ..., - kerberos5_read_only: Optional[bool] = ..., - kerberos5_read_write: Optional[bool] = ..., - nfsv3: Optional[bool] = ..., - nfsv41: Optional[bool] = ..., - rule_index: Optional[int] = ..., - unix_read_only: Optional[bool] = ..., - unix_read_write: Optional[bool] = ... + properties: Optional[SubvolumeProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ExternalReplicationSetupStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CLUSTER_PEER_PENDING = "ClusterPeerPending" - CLUSTER_PEER_REQUIRED = "ClusterPeerRequired" - NO_ACTION_REQUIRED = "NoActionRequired" - REPLICATION_CREATE_REQUIRED = "ReplicationCreateRequired" - V_SERVER_PEER_REQUIRED = "VServerPeerRequired" - - - class azure.mgmt.netapp.models.FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + class azure.mgmt.netapp.models.SubvolumeModel(_Model): + id: Optional[str] + name: Optional[str] + properties: Optional[SubvolumeModelProperties] + type: Optional[str] - class azure.mgmt.netapp.models.FilePathAvailabilityRequest(_Model): - availability_zone: Optional[str] - name: str - subnet_id: str + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - availability_zone: Optional[str] = ..., - name: str, - subnet_id: str + properties: Optional[SubvolumeModelProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.FileSystemUser(_Model): - cifs_user: Optional[CifsUser] - nfs_user: Optional[NfsUser] - - @overload - def __init__( + def __setattr__( self, - *, - cifs_user: Optional[CifsUser] = ..., - nfs_user: Optional[NfsUser] = ... + key: str, + value: Any ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest(_Model): - username: str + class azure.mgmt.netapp.models.SubvolumeModelProperties(_Model): + accessed_time_stamp: Optional[datetime] + bytes_used: Optional[int] + changed_time_stamp: Optional[datetime] + creation_time_stamp: Optional[datetime] + modified_time_stamp: Optional[datetime] + parent_path: Optional[str] + path: Optional[str] + permissions: Optional[str] + provisioning_state: Optional[str] + size: Optional[int] @overload def __init__( self, *, - username: str + accessed_time_stamp: Optional[datetime] = ..., + bytes_used: Optional[int] = ..., + changed_time_stamp: Optional[datetime] = ..., + creation_time_stamp: Optional[datetime] = ..., + modified_time_stamp: Optional[datetime] = ..., + parent_path: Optional[str] = ..., + path: Optional[str] = ..., + permissions: Optional[str] = ..., + provisioning_state: Optional[str] = ..., + size: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse(_Model): - group_ids_for_ldap_user: Optional[list[str]] + class azure.mgmt.netapp.models.SubvolumePatchParams(_Model): + path: Optional[str] + size: Optional[int] @overload def __init__( self, *, - group_ids_for_ldap_user: Optional[list[str]] = ... + path: Optional[str] = ..., + size: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.GetKeyVaultStatusResponse(_Model): - properties: Optional[GetKeyVaultStatusResponseProperties] + class azure.mgmt.netapp.models.SubvolumePatchRequest(_Model): + properties: Optional[SubvolumePatchParams] def __getattr__(self, name: str) -> Any: ... @@ -6563,7 +5679,7 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - properties: Optional[GetKeyVaultStatusResponseProperties] = ... + properties: Optional[SubvolumePatchParams] = ... ) -> None: ... @overload @@ -6576,416 +5692,366 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.GetKeyVaultStatusResponseProperties(_Model): - key_name: Optional[str] - key_vault_private_endpoints: Optional[list[KeyVaultPrivateEndpoint]] - key_vault_resource_id: Optional[str] - key_vault_uri: Optional[str] + class azure.mgmt.netapp.models.SubvolumeProperties(_Model): + parent_path: Optional[str] + path: Optional[str] + provisioning_state: Optional[str] + size: Optional[int] @overload def __init__( self, *, - key_name: Optional[str] = ..., - key_vault_private_endpoints: Optional[list[KeyVaultPrivateEndpoint]] = ..., - key_vault_resource_id: Optional[str] = ..., - key_vault_uri: Optional[str] = ... + parent_path: Optional[str] = ..., + path: Optional[str] = ..., + size: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.GlobalFileLockingState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + class azure.mgmt.netapp.models.SuspectFile(_Model): + file_timestamp: Optional[datetime] + suspect_file_name: Optional[str] - class azure.mgmt.netapp.models.HourlySchedule(_Model): - minute: Optional[int] - snapshots_to_keep: Optional[int] - used_bytes: Optional[int] + class azure.mgmt.netapp.models.SvmPeerCommandResponse(_Model): + properties: Optional[SvmPeerCommandResponseProperties] @overload def __init__( self, *, - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ..., - used_bytes: Optional[int] = ... + properties: Optional[SvmPeerCommandResponseProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALREADY_EXISTS = "AlreadyExists" - INVALID = "Invalid" - - - class azure.mgmt.netapp.models.KerberosState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.KeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MICROSOFT_KEY_VAULT = "Microsoft.KeyVault" - MICROSOFT_NET_APP = "Microsoft.NetApp" - - - class azure.mgmt.netapp.models.KeyVaultPrivateEndpoint(_Model): - private_endpoint_id: Optional[str] - virtual_network_id: Optional[str] + class azure.mgmt.netapp.models.SvmPeerCommandResponseProperties(_Model): + svm_peering_command: Optional[str] @overload def __init__( self, *, - private_endpoint_id: Optional[str] = ..., - virtual_network_id: Optional[str] = ... + svm_peering_command: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.KeyVaultProperties(_Model): - key_name: str - key_vault_id: Optional[str] - key_vault_resource_id: Optional[str] - key_vault_uri: str - status: Optional[Union[str, KeyVaultStatus]] + class azure.mgmt.netapp.models.SystemData(_Model): + created_at: Optional[datetime] + created_by: Optional[str] + created_by_type: Optional[Union[str, CreatedByType]] + last_modified_at: Optional[datetime] + last_modified_by: Optional[str] + last_modified_by_type: Optional[Union[str, CreatedByType]] @overload def __init__( self, *, - key_name: str, - key_vault_resource_id: Optional[str] = ..., - key_vault_uri: str + created_at: Optional[datetime] = ..., + created_by: Optional[str] = ..., + created_by_type: Optional[Union[str, CreatedByType]] = ..., + last_modified_at: Optional[datetime] = ..., + last_modified_by: Optional[str] = ..., + last_modified_by_type: Optional[Union[str, CreatedByType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.KeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CREATED = "Created" - DELETED = "Deleted" - ERROR = "Error" - IN_USE = "InUse" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.LargeVolumeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EXTRA_LARGE_VOLUME7_DOT2_PI_B = "PremExtraLargeVolume7Dot2PiB" - LARGE_VOLUME = "LargeVolume" - - - class azure.mgmt.netapp.models.LdapConfiguration(_Model): - bind_authentication_level: Optional[Union[str, BindAuthenticationLevel]] - bind_dn: Optional[str] - bind_password_akv_config: Optional[BindPasswordAkvConfig] - certificate_cn_host: Optional[str] - domain: Optional[str] - ldap_over_tls: Optional[bool] - ldap_servers: Optional[list[str]] - server_ca_certificate: Optional[str] + class azure.mgmt.netapp.models.TrackedResource(Resource): + id: str + location: str + name: str + system_data: SystemData + tags: Optional[dict[str, str]] + type: str @overload def __init__( self, *, - bind_authentication_level: Optional[Union[str, BindAuthenticationLevel]] = ..., - bind_dn: Optional[str] = ..., - bind_password_akv_config: Optional[BindPasswordAkvConfig] = ..., - certificate_cn_host: Optional[str] = ..., - domain: Optional[str] = ..., - ldap_over_tls: Optional[bool] = ..., - ldap_servers: Optional[list[str]] = ..., - server_ca_certificate: Optional[str] = ... + location: str, + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.LdapConfigurationPatch(_Model): - bind_authentication_level: Optional[Union[str, BindAuthenticationLevel]] - bind_dn: Optional[str] - bind_password_akv_config: Optional[BindPasswordAkvConfigPatch] - certificate_cn_host: Optional[str] - domain: Optional[str] - ldap_over_tls: Optional[bool] - ldap_servers: Optional[list[str]] - server_ca_certificate: Optional[str] + class azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest(_Model): + network_features: Union[str, NetworkFeatures] + network_sibling_set_id: str + network_sibling_set_state_id: str + subnet_id: str @overload def __init__( self, *, - bind_authentication_level: Optional[Union[str, BindAuthenticationLevel]] = ..., - bind_dn: Optional[str] = ..., - bind_password_akv_config: Optional[BindPasswordAkvConfigPatch] = ..., - certificate_cn_host: Optional[str] = ..., - domain: Optional[str] = ..., - ldap_over_tls: Optional[bool] = ..., - ldap_servers: Optional[list[str]] = ..., - server_ca_certificate: Optional[str] = ... + network_features: Union[str, NetworkFeatures], + network_sibling_set_id: str, + network_sibling_set_state_id: str, + subnet_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.LdapSearchScopeOpt(_Model): - group_dn: Optional[str] - group_membership_filter: Optional[str] - user_dn: Optional[str] + class azure.mgmt.netapp.models.UsageName(_Model): + localized_value: Optional[str] + value: Optional[str] @overload def __init__( self, *, - group_dn: Optional[str] = ..., - group_membership_filter: Optional[str] = ..., - user_dn: Optional[str] = ... + localized_value: Optional[str] = ..., + value: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.LdapServerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACTIVE_DIRECTORY = "ActiveDirectory" - OPEN_LDAP = "OpenLDAP" - + class azure.mgmt.netapp.models.UsageProperties(_Model): + current_value: Optional[int] + limit: Optional[int] + unit: Optional[str] - class azure.mgmt.netapp.models.LdapState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + class azure.mgmt.netapp.models.UsageResult(_Model): + id: Optional[str] + name: Optional[UsageName] + properties: Optional[UsageProperties] - class azure.mgmt.netapp.models.ListQuotaReportResponse(_Model): - quota_report_records: Optional[list[QuotaReport]] + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - quota_report_records: Optional[list[QuotaReport]] = ... + properties: Optional[UsageProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.netapp.models.UserAssignedIdentity(_Model): + client_id: Optional[str] + principal_id: Optional[str] - class azure.mgmt.netapp.models.ListQuotaReportResult(_Model): - properties: Optional[ListQuotaReportResponse] + + class azure.mgmt.netapp.models.Volume(TrackedResource): + etag: Optional[str] + id: str + location: str + name: str + properties: VolumeProperties + system_data: SystemData + tags: dict[str, str] + type: str + zones: Optional[list[str]] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - properties: Optional[ListQuotaReportResponse] = ... + location: str, + properties: VolumeProperties, + tags: Optional[dict[str, str]] = ..., + zones: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ListReplicationsRequest(_Model): - exclude: Optional[Union[str, Exclude]] + + class azure.mgmt.netapp.models.VolumeBackupProperties(_Model): + backup_policy_id: Optional[str] + backup_vault_id: Optional[str] + policy_enforced: Optional[bool] @overload def __init__( self, *, - exclude: Optional[Union[str, Exclude]] = ... + backup_policy_id: Optional[str] = ..., + backup_vault_id: Optional[str] = ..., + policy_enforced: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.LogSpecification(_Model): - display_name: Optional[str] - name: Optional[str] + class azure.mgmt.netapp.models.VolumeBackupRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FAILED = "Failed" + IDLE = "Idle" + TRANSFERRING = "Transferring" + UNKNOWN = "Unknown" + + + class azure.mgmt.netapp.models.VolumeBackups(_Model): + backups_count: Optional[int] + policy_enabled: Optional[bool] + volume_name: Optional[str] + volume_resource_id: Optional[str] @overload def __init__( self, *, - display_name: Optional[str] = ..., - name: Optional[str] = ... + backups_count: Optional[int] = ..., + policy_enabled: Optional[bool] = ..., + volume_name: Optional[str] = ..., + volume_resource_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ManagedServiceIdentity(_Model): - principal_id: Optional[str] - tenant_id: Optional[str] - type: Union[str, ManagedServiceIdentityType] - user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] + class azure.mgmt.netapp.models.VolumeGroup(_Model): + id: Optional[str] + location: Optional[str] + name: Optional[str] + properties: Optional[VolumeGroupListProperties] + type: Optional[str] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - type: Union[str, ManagedServiceIdentityType], - user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] = ... + location: Optional[str] = ..., + properties: Optional[VolumeGroupListProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NONE = "None" - SYSTEM_ASSIGNED = "SystemAssigned" - SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" - USER_ASSIGNED = "UserAssigned" - - - class azure.mgmt.netapp.models.MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AVERAGE = "Average" + class azure.mgmt.netapp.models.VolumeGroupDetails(ProxyResource): + id: str + location: Optional[str] + name: str + properties: Optional[VolumeGroupProperties] + system_data: SystemData + type: str - class azure.mgmt.netapp.models.MetricSpecification(_Model): - aggregation_type: Optional[str] - category: Optional[str] - dimensions: Optional[list[Dimension]] - display_description: Optional[str] - display_name: Optional[str] - enable_regional_mdm_account: Optional[bool] - fill_gap_with_zero: Optional[bool] - internal_metric_name: Optional[str] - is_internal: Optional[bool] - name: Optional[str] - resource_id_dimension_name_override: Optional[str] - source_mdm_account: Optional[str] - source_mdm_namespace: Optional[str] - supported_aggregation_types: Optional[list[Union[str, MetricAggregationType]]] - supported_time_grain_types: Optional[list[str]] - unit: Optional[str] + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - aggregation_type: Optional[str] = ..., - category: Optional[str] = ..., - dimensions: Optional[list[Dimension]] = ..., - display_description: Optional[str] = ..., - display_name: Optional[str] = ..., - enable_regional_mdm_account: Optional[bool] = ..., - fill_gap_with_zero: Optional[bool] = ..., - internal_metric_name: Optional[str] = ..., - is_internal: Optional[bool] = ..., - name: Optional[str] = ..., - resource_id_dimension_name_override: Optional[str] = ..., - source_mdm_account: Optional[str] = ..., - source_mdm_namespace: Optional[str] = ..., - supported_aggregation_types: Optional[list[Union[str, MetricAggregationType]]] = ..., - supported_time_grain_types: Optional[list[str]] = ..., - unit: Optional[str] = ... + location: Optional[str] = ..., + properties: Optional[VolumeGroupProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.MirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BROKEN = "Broken" - MIRRORED = "Mirrored" - UNINITIALIZED = "Uninitialized" + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.netapp.models.MonthlySchedule(_Model): - days_of_month: Optional[str] - hour: Optional[int] - minute: Optional[int] - snapshots_to_keep: Optional[int] - used_bytes: Optional[int] + class azure.mgmt.netapp.models.VolumeGroupListProperties(_Model): + group_meta_data: Optional[VolumeGroupMetaData] + provisioning_state: Optional[str] @overload def __init__( self, *, - days_of_month: Optional[str] = ..., - hour: Optional[int] = ..., - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ..., - used_bytes: Optional[int] = ... + group_meta_data: Optional[VolumeGroupMetaData] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.MountTargetProperties(_Model): - file_system_id: str - ip_address: Optional[str] - mount_target_id: Optional[str] - smb_server_fqdn: Optional[str] + class azure.mgmt.netapp.models.VolumeGroupMetaData(_Model): + application_identifier: Optional[str] + application_type: Optional[Union[str, ApplicationType]] + global_placement_rules: Optional[list[PlacementKeyValuePairs]] + group_description: Optional[str] + volumes_count: Optional[int] @overload def __init__( self, *, - file_system_id: str, - smb_server_fqdn: Optional[str] = ... + application_identifier: Optional[str] = ..., + application_type: Optional[Union[str, ApplicationType]] = ..., + global_placement_rules: Optional[list[PlacementKeyValuePairs]] = ..., + group_description: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.MultiAdStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.NetAppAccount(TrackedResource): - etag: Optional[str] - id: str - identity: Optional[ManagedServiceIdentity] - location: str - name: str - properties: Optional[AccountProperties] - system_data: SystemData - tags: dict[str, str] - type: str - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.models.VolumeGroupProperties(_Model): + group_meta_data: Optional[VolumeGroupMetaData] + provisioning_state: Optional[str] + volumes: Optional[list[VolumeGroupVolumeProperties]] @overload def __init__( self, *, - identity: Optional[ManagedServiceIdentity] = ..., - location: str, - properties: Optional[AccountProperties] = ..., - tags: Optional[dict[str, str]] = ... + group_meta_data: Optional[VolumeGroupMetaData] = ..., + volumes: Optional[list[VolumeGroupVolumeProperties]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.netapp.models.NetAppAccountPatch(_Model): - identity: Optional[ManagedServiceIdentity] - properties: Optional[AccountPropertiesPatch] + class azure.mgmt.netapp.models.VolumeGroupVolumeProperties(_Model): + id: Optional[str] + name: Optional[str] + properties: VolumeProperties tags: Optional[dict[str, str]] + type: Optional[str] + zones: Optional[list[str]] def __getattr__(self, name: str) -> Any: ... @@ -6993,9 +6059,10 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - identity: Optional[ManagedServiceIdentity] = ..., - properties: Optional[AccountPropertiesPatch] = ..., - tags: Optional[dict[str, str]] = ... + name: Optional[str] = ..., + properties: VolumeProperties, + tags: Optional[dict[str, str]] = ..., + zones: Optional[list[str]] = ... ) -> None: ... @overload @@ -7008,95 +6075,85 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.NetAppProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACCEPTED = "Accepted" - CREATING = "Creating" - DELETING = "Deleting" - FAILED = "Failed" - MOVING = "Moving" - PATCHING = "Patching" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.NetworkFeatures(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BASIC = "Basic" - BASIC_STANDARD = "Basic_Standard" - STANDARD = "Standard" - STANDARD_BASIC = "Standard_Basic" - - - class azure.mgmt.netapp.models.NetworkSiblingSet(_Model): - network_features: Optional[Union[str, NetworkFeatures]] - network_sibling_set_id: Optional[str] - network_sibling_set_state_id: Optional[str] - nic_info_list: Optional[list[NicInfo]] - provisioning_state: Optional[Union[str, NetworkSiblingSetProvisioningState]] - subnet_id: Optional[str] - - @overload - def __init__( - self, - *, - network_features: Optional[Union[str, NetworkFeatures]] = ..., - network_sibling_set_id: Optional[str] = ..., - network_sibling_set_state_id: Optional[str] = ..., - nic_info_list: Optional[list[NicInfo]] = ..., - subnet_id: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.NetworkSiblingSetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - - - class azure.mgmt.netapp.models.NfsUser(_Model): - group_id: Optional[int] - user_id: Optional[int] - - @overload - def __init__( - self, - *, - group_id: Optional[int] = ..., - user_id: Optional[int] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.NicInfo(_Model): - ip_address: Optional[str] - volume_resource_ids: Optional[list[str]] - - @overload - def __init__( - self, - *, - volume_resource_ids: Optional[list[str]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.OnCertificateConflictAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FAIL = "Fail" - UPDATE = "Update" + class azure.mgmt.netapp.models.VolumeLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AR = "ar" + AR_UTF8 = "ar.utf-8" + C = "c" + CS = "cs" + CS_UTF8 = "cs.utf-8" + C_UTF8 = "c.utf-8" + DA = "da" + DA_UTF8 = "da.utf-8" + DE = "de" + DE_UTF8 = "de.utf-8" + EN = "en" + EN_US = "en-us" + EN_US_UTF8 = "en-us.utf-8" + EN_UTF8 = "en.utf-8" + ES = "es" + ES_UTF8 = "es.utf-8" + FI = "fi" + FI_UTF8 = "fi.utf-8" + FR = "fr" + FR_UTF8 = "fr.utf-8" + HE = "he" + HE_UTF8 = "he.utf-8" + HR = "hr" + HR_UTF8 = "hr.utf-8" + HU = "hu" + HU_UTF8 = "hu.utf-8" + IT = "it" + IT_UTF8 = "it.utf-8" + JA = "ja" + JA_JP932 = "ja-jp.932" + JA_JP932_UTF8 = "ja-jp.932.utf-8" + JA_JP_PCK = "ja-jp.pck" + JA_JP_PCK_UTF8 = "ja-jp.pck.utf-8" + JA_JP_PCK_V2 = "ja-jp.pck-v2" + JA_JP_PCK_V2_UTF8 = "ja-jp.pck-v2.utf-8" + JA_UTF8 = "ja.utf-8" + JA_V1 = "ja-v1" + JA_V1_UTF8 = "ja-v1.utf-8" + KO = "ko" + KO_UTF8 = "ko.utf-8" + NL = "nl" + NL_UTF8 = "nl.utf-8" + NO = "no" + NO_UTF8 = "no.utf-8" + PL = "pl" + PL_UTF8 = "pl.utf-8" + PT = "pt" + PT_UTF8 = "pt.utf-8" + RO = "ro" + RO_UTF8 = "ro.utf-8" + RU = "ru" + RU_UTF8 = "ru.utf-8" + SK = "sk" + SK_UTF8 = "sk.utf-8" + SL = "sl" + SL_UTF8 = "sl.utf-8" + SV = "sv" + SV_UTF8 = "sv.utf-8" + TR = "tr" + TR_UTF8 = "tr.utf-8" + UTF8_MB4 = "utf8mb4" + ZH = "zh" + ZH_GBK = "zh.gbk" + ZH_GBK_UTF8 = "zh.gbk.utf-8" + ZH_TW = "zh-tw" + ZH_TW_BIG5 = "zh-tw.big5" + ZH_TW_BIG5_UTF8 = "zh-tw.big5.utf-8" + ZH_TW_UTF8 = "zh-tw.utf-8" + ZH_UTF8 = "zh.utf-8" - class azure.mgmt.netapp.models.Operation(_Model): - display: Optional[OperationDisplay] + class azure.mgmt.netapp.models.VolumePatch(_Model): + id: Optional[str] + location: Optional[str] name: Optional[str] - origin: Optional[str] - properties: Optional[OperationProperties] + properties: Optional[VolumePatchProperties] + tags: Optional[dict[str, str]] + type: Optional[str] def __getattr__(self, name: str) -> Any: ... @@ -7104,10 +6161,9 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - display: Optional[OperationDisplay] = ..., - name: Optional[str] = ..., - origin: Optional[str] = ..., - properties: Optional[OperationProperties] = ... + location: Optional[str] = ..., + properties: Optional[VolumePatchProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload @@ -7120,234 +6176,266 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.OperationDisplay(_Model): - description: Optional[str] - operation: Optional[str] - provider: Optional[str] - resource: Optional[str] - - @overload - def __init__( - self, - *, - description: Optional[str] = ..., - operation: Optional[str] = ..., - provider: Optional[str] = ..., - resource: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.OperationProperties(_Model): - service_specification: Optional[ServiceSpecification] + class azure.mgmt.netapp.models.VolumePatchProperties(_Model): + cool_access: Optional[bool] + cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] + cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] + coolness_period: Optional[int] + data_protection: Optional[VolumePatchPropertiesDataProtection] + default_group_quota_in_ki_bs: Optional[int] + default_user_quota_in_ki_bs: Optional[int] + export_policy: Optional[VolumePatchPropertiesExportPolicy] + is_default_quota_enabled: Optional[bool] + protocol_types: Optional[list[str]] + service_level: Optional[Union[str, ServiceLevel]] + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] + snapshot_directory_visible: Optional[bool] + throughput_mibps: Optional[float] + unix_permissions: Optional[str] + usage_threshold: Optional[int] @overload def __init__( self, *, - service_specification: Optional[ServiceSpecification] = ... + cool_access: Optional[bool] = ..., + cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] = ..., + cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] = ..., + coolness_period: Optional[int] = ..., + data_protection: Optional[VolumePatchPropertiesDataProtection] = ..., + default_group_quota_in_ki_bs: Optional[int] = ..., + default_user_quota_in_ki_bs: Optional[int] = ..., + export_policy: Optional[VolumePatchPropertiesExportPolicy] = ..., + is_default_quota_enabled: Optional[bool] = ..., + protocol_types: Optional[list[str]] = ..., + service_level: Optional[Union[str, ServiceLevel]] = ..., + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ..., + snapshot_directory_visible: Optional[bool] = ..., + throughput_mibps: Optional[float] = ..., + unix_permissions: Optional[str] = ..., + usage_threshold: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.OriginClusterInformation(_Model): - peer_addresses: list[str] - peer_cluster_name: str - peer_volume_name: str - peer_vserver_name: str + class azure.mgmt.netapp.models.VolumePatchPropertiesDataProtection(_Model): + backup: Optional[VolumeBackupProperties] + ransomware_protection: Optional[RansomwareProtectionPatchSettings] + snapshot: Optional[VolumeSnapshotProperties] @overload def __init__( self, *, - peer_addresses: list[str], - peer_cluster_name: str, - peer_volume_name: str, - peer_vserver_name: str + backup: Optional[VolumeBackupProperties] = ..., + ransomware_protection: Optional[RansomwareProtectionPatchSettings] = ..., + snapshot: Optional[VolumeSnapshotProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest(_Model): - peer_ip_addresses: list[str] + class azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy(_Model): + rules: Optional[list[ExportPolicyRule]] @overload def __init__( self, *, - peer_ip_addresses: list[str] + rules: Optional[list[ExportPolicyRule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.PeeringPassphrases(_Model): - cluster_peering_command: str - cluster_peering_passphrase: str - critical_warning: Optional[str] - vserver_peering_command: str - - @overload - def __init__( - self, - *, - cluster_peering_command: str, - cluster_peering_passphrase: str, - vserver_peering_command: str - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.PlacementKeyValuePairs(_Model): - key: str - value: str - - @overload - def __init__( - self, - *, - key: str, - value: str - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.PolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.PoolChangeRequest(_Model): - new_pool_resource_id: str + class azure.mgmt.netapp.models.VolumeProperties(_Model): + accept_grow_capacity_pool_for_short_term_clone_split: Optional[Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit]] + actual_throughput_mibps: Optional[float] + avs_data_store: Optional[Union[str, AvsDataStore]] + backup_id: Optional[str] + baremetal_tenant_id: Optional[str] + breakthrough_mode: Optional[Union[str, BreakthroughMode]] + breakthrough_mode_old: Optional[Union[str, BreakthroughMode]] + capacity_pool_resource_id: Optional[str] + clone_progress: Optional[int] + cool_access: Optional[bool] + cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] + cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] + coolness_period: Optional[int] + creation_token: str + data_protection: Optional[VolumePropertiesDataProtection] + data_store_resource_id: Optional[list[str]] + default_group_quota_in_ki_bs: Optional[int] + default_user_quota_in_ki_bs: Optional[int] + delete_base_snapshot: Optional[bool] + effective_network_features: Optional[Union[str, NetworkFeatures]] + enable_subvolumes: Optional[Union[str, EnableSubvolumes]] + encrypted: Optional[bool] + encryption_key_source: Optional[Union[str, EncryptionKeySource]] + export_policy: Optional[VolumePropertiesExportPolicy] + file_access_logs: Optional[Union[str, FileAccessLogs]] + file_system_id: Optional[str] + inherited_size_in_bytes: Optional[int] + is_default_quota_enabled: Optional[bool] + is_large_volume: Optional[bool] + is_restoring: Optional[bool] + kerberos_enabled: Optional[bool] + key_vault_private_endpoint_resource_id: Optional[str] + ldap_enabled: Optional[bool] + maximum_number_of_files: Optional[int] + mount_targets: Optional[list[MountTargetProperties]] + network_features: Optional[Union[str, NetworkFeatures]] + network_sibling_set_id: Optional[str] + originating_resource_id: Optional[str] + placement_rules: Optional[list[PlacementKeyValuePairs]] + protocol_types: Optional[list[str]] + provisioned_availability_zone: Optional[str] + provisioning_state: Optional[str] + proximity_placement_group: Optional[str] + security_style: Optional[Union[str, SecurityStyle]] + service_level: Optional[Union[str, ServiceLevel]] + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] + smb_continuously_available: Optional[bool] + smb_encryption: Optional[bool] + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] + snapshot_directory_visible: Optional[bool] + snapshot_id: Optional[str] + storage_to_network_proximity: Optional[Union[str, VolumeStorageToNetworkProximity]] + subnet_id: str + t2_network: Optional[str] + throughput_mibps: Optional[float] + unix_permissions: Optional[str] + usage_threshold: int + volume_group_name: Optional[str] + volume_spec_name: Optional[str] + volume_type: Optional[str] @overload def __init__( self, *, - new_pool_resource_id: str + accept_grow_capacity_pool_for_short_term_clone_split: Optional[Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit]] = ..., + avs_data_store: Optional[Union[str, AvsDataStore]] = ..., + backup_id: Optional[str] = ..., + breakthrough_mode: Optional[Union[str, BreakthroughMode]] = ..., + breakthrough_mode_old: Optional[Union[str, BreakthroughMode]] = ..., + capacity_pool_resource_id: Optional[str] = ..., + cool_access: Optional[bool] = ..., + cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] = ..., + cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] = ..., + coolness_period: Optional[int] = ..., + creation_token: str, + data_protection: Optional[VolumePropertiesDataProtection] = ..., + default_group_quota_in_ki_bs: Optional[int] = ..., + default_user_quota_in_ki_bs: Optional[int] = ..., + delete_base_snapshot: Optional[bool] = ..., + enable_subvolumes: Optional[Union[str, EnableSubvolumes]] = ..., + encryption_key_source: Optional[Union[str, EncryptionKeySource]] = ..., + export_policy: Optional[VolumePropertiesExportPolicy] = ..., + is_default_quota_enabled: Optional[bool] = ..., + is_large_volume: Optional[bool] = ..., + kerberos_enabled: Optional[bool] = ..., + key_vault_private_endpoint_resource_id: Optional[str] = ..., + ldap_enabled: Optional[bool] = ..., + network_features: Optional[Union[str, NetworkFeatures]] = ..., + placement_rules: Optional[list[PlacementKeyValuePairs]] = ..., + protocol_types: Optional[list[str]] = ..., + proximity_placement_group: Optional[str] = ..., + security_style: Optional[Union[str, SecurityStyle]] = ..., + service_level: Optional[Union[str, ServiceLevel]] = ..., + smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., + smb_continuously_available: Optional[bool] = ..., + smb_encryption: Optional[bool] = ..., + smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ..., + snapshot_directory_visible: Optional[bool] = ..., + snapshot_id: Optional[str] = ..., + subnet_id: str, + throughput_mibps: Optional[float] = ..., + unix_permissions: Optional[str] = ..., + usage_threshold: int, + volume_spec_name: Optional[str] = ..., + volume_type: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.PoolPatchProperties(_Model): - cool_access: Optional[bool] - custom_throughput_mibps: Optional[int] - qos_type: Optional[Union[str, QosType]] - size: Optional[int] + class azure.mgmt.netapp.models.VolumePropertiesDataProtection(_Model): + backup: Optional[VolumeBackupProperties] + ransomware_protection: Optional[RansomwareProtectionSettings] + replication: Optional[ReplicationObject] + snapshot: Optional[VolumeSnapshotProperties] + volume_relocation: Optional[VolumeRelocationProperties] @overload def __init__( self, *, - cool_access: Optional[bool] = ..., - custom_throughput_mibps: Optional[int] = ..., - qos_type: Optional[Union[str, QosType]] = ..., - size: Optional[int] = ... + backup: Optional[VolumeBackupProperties] = ..., + ransomware_protection: Optional[RansomwareProtectionSettings] = ..., + replication: Optional[ReplicationObject] = ..., + snapshot: Optional[VolumeSnapshotProperties] = ..., + volume_relocation: Optional[VolumeRelocationProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.PoolProperties(_Model): - cool_access: Optional[bool] - custom_throughput_mibps: Optional[int] - encryption_type: Optional[Union[str, EncryptionType]] - pool_id: Optional[str] - provisioning_state: Optional[str] - qos_type: Optional[Union[str, QosType]] - service_level: Union[str, ServiceLevel] - size: int - total_throughput_mibps: Optional[float] - utilized_throughput_mibps: Optional[float] + class azure.mgmt.netapp.models.VolumePropertiesExportPolicy(_Model): + rules: Optional[list[ExportPolicyRule]] @overload def __init__( self, *, - cool_access: Optional[bool] = ..., - custom_throughput_mibps: Optional[int] = ..., - encryption_type: Optional[Union[str, EncryptionType]] = ..., - qos_type: Optional[Union[str, QosType]] = ..., - service_level: Union[str, ServiceLevel], - size: int + rules: Optional[list[ExportPolicyRule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NF_SV3 = "NFSv3" - NF_SV4 = "NFSv4" - SMB = "SMB" - - - class azure.mgmt.netapp.models.ProxyResource(Resource): + class azure.mgmt.netapp.models.VolumeQuotaRule(TrackedResource): id: str + location: str name: str + properties: Optional[VolumeQuotaRulesProperties] system_data: SystemData + tags: dict[str, str] type: str - - class azure.mgmt.netapp.models.QosType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AUTO = "Auto" - MANUAL = "Manual" - - - class azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest(_Model): - network_sibling_set_id: str - subnet_id: str + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - network_sibling_set_id: str, - subnet_id: str + location: str, + properties: Optional[VolumeQuotaRulesProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.QuotaAvailabilityRequest(_Model): - name: str - resource_group: str - type: Union[str, CheckQuotaNameResourceTypes] - - @overload - def __init__( + def __setattr__( self, - *, - name: str, - resource_group: str, - type: Union[str, CheckQuotaNameResourceTypes] + key: str, + value: Any ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.netapp.models.QuotaItem(ProxyResource): - id: str - name: str - properties: Optional[QuotaItemProperties] - system_data: SystemData - type: str + class azure.mgmt.netapp.models.VolumeQuotaRulePatch(_Model): + properties: Optional[VolumeQuotaRulesProperties] + tags: Optional[dict[str, str]] def __getattr__(self, name: str) -> Any: ... @@ -7355,7 +6443,8 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - properties: Optional[QuotaItemProperties] = ... + properties: Optional[VolumeQuotaRulesProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload @@ -7368,17 +6457,9 @@ namespace azure.mgmt.netapp.models ) -> None: ... - class azure.mgmt.netapp.models.QuotaItemProperties(_Model): - current: Optional[int] - default: Optional[int] - usage: Optional[int] - - - class azure.mgmt.netapp.models.QuotaReport(_Model): - is_derived_quota: Optional[bool] - percentage_used: Optional[float] - quota_limit_total_in_ki_bs: Optional[int] - quota_limit_used_in_ki_bs: Optional[int] + class azure.mgmt.netapp.models.VolumeQuotaRulesProperties(_Model): + provisioning_state: Optional[Union[str, NetAppProvisioningState]] + quota_size_in_ki_bs: Optional[int] quota_target: Optional[str] quota_type: Optional[Union[str, QuotaType]] @@ -7386,10 +6467,7 @@ namespace azure.mgmt.netapp.models def __init__( self, *, - is_derived_quota: Optional[bool] = ..., - percentage_used: Optional[float] = ..., - quota_limit_total_in_ki_bs: Optional[int] = ..., - quota_limit_used_in_ki_bs: Optional[int] = ..., + quota_size_in_ki_bs: Optional[int] = ..., quota_target: Optional[str] = ..., quota_type: Optional[Union[str, QuotaType]] = ... ) -> None: ... @@ -7398,1639 +6476,1447 @@ namespace azure.mgmt.netapp.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.QuotaReportFilterRequest(_Model): - quota_target: Optional[str] - quota_type: Optional[Union[str, QuotaType]] - usage_threshold_percentage: Optional[int] + class azure.mgmt.netapp.models.VolumeRelocationProperties(_Model): + ready_to_be_finalized: Optional[bool] + relocation_requested: Optional[bool] @overload def __init__( self, *, - quota_target: Optional[str] = ..., - quota_type: Optional[Union[str, QuotaType]] = ..., - usage_threshold_percentage: Optional[int] = ... + relocation_requested: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.QuotaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEFAULT_GROUP_QUOTA = "DefaultGroupQuota" - DEFAULT_USER_QUOTA = "DefaultUserQuota" - INDIVIDUAL_GROUP_QUOTA = "IndividualGroupQuota" - INDIVIDUAL_USER_QUOTA = "IndividualUserQuota" - - - class azure.mgmt.netapp.models.RansomwareProtectionPatchSettings(_Model): - desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] + class azure.mgmt.netapp.models.VolumeReplicationRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + IDLE = "Idle" + TRANSFERRING = "Transferring" - @overload - def __init__( - self, - *, - desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.netapp.models.VolumeRestoreRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FAILED = "Failed" + IDLE = "Idle" + TRANSFERRING = "Transferring" + UNKNOWN = "Unknown" - class azure.mgmt.netapp.models.RansomwareProtectionSettings(_Model): - actual_ransomware_protection_state: Optional[Union[str, ActualRansomwareProtectionState]] - desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] + class azure.mgmt.netapp.models.VolumeRevert(_Model): + snapshot_id: Optional[str] @overload def __init__( self, *, - desired_ransomware_protection_state: Optional[Union[str, DesiredRansomwareProtectionState]] = ... + snapshot_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.RansomwareReport(ProxyResource): - id: str - name: str - properties: Optional[RansomwareReportProperties] - system_data: SystemData - type: str + class azure.mgmt.netapp.models.VolumeSnapshotProperties(_Model): + snapshot_policy_id: Optional[str] @overload def __init__( self, *, - properties: Optional[RansomwareReportProperties] = ... + snapshot_policy_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.RansomwareReportProperties(_Model): - cleared_count: Optional[int] - event_time: Optional[datetime] - provisioning_state: Optional[str] - reported_count: Optional[int] - severity: Optional[Union[str, RansomwareReportSeverity]] - state: Optional[Union[str, RansomwareReportState]] - suspects: Optional[list[RansomwareSuspects]] - - - class azure.mgmt.netapp.models.RansomwareReportSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - HIGH = "High" - LOW = "Low" - MODERATE = "Moderate" - NONE = "None" - - - class azure.mgmt.netapp.models.RansomwareReportState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACTIVE = "Active" - RESOLVED = "Resolved" - - - class azure.mgmt.netapp.models.RansomwareSuspectResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FALSE_POSITIVE = "FalsePositive" - POTENTIAL_THREAT = "PotentialThreat" - - - class azure.mgmt.netapp.models.RansomwareSuspects(_Model): - extension: Optional[str] - file_count: Optional[int] - resolution: Optional[Union[str, RansomwareSuspectResolution]] - suspect_files: Optional[list[SuspectFile]] + class azure.mgmt.netapp.models.VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACROSS_T2 = "AcrossT2" + DEFAULT = "Default" + T1 = "T1" + T2 = "T2" - class azure.mgmt.netapp.models.RansomwareSuspectsClearRequest(_Model): - extensions: list[str] - resolution: Union[str, RansomwareSuspectResolution] + class azure.mgmt.netapp.models.WeeklySchedule(_Model): + day: Optional[str] + hour: Optional[int] + minute: Optional[int] + snapshots_to_keep: Optional[int] + used_bytes: Optional[int] @overload def __init__( self, *, - extensions: list[str], - resolution: Union[str, RansomwareSuspectResolution] + day: Optional[str] = ..., + hour: Optional[int] = ..., + minute: Optional[int] = ..., + snapshots_to_keep: Optional[int] = ..., + used_bytes: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.netapp.models.ReestablishReplicationRequest(_Model): - source_volume_id: Optional[str] +namespace azure.mgmt.netapp.operations + + class azure.mgmt.netapp.operations.AccountsOperations: - @overload def __init__( self, - *, - source_volume_id: Optional[str] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.RegionInfo(_Model): - availability_zone_mappings: Optional[list[RegionInfoAvailabilityZoneMappingsItem]] - storage_to_network_proximity: Optional[Union[str, RegionStorageToNetworkProximity]] - - @overload - def __init__( + def begin_change_key_vault( self, + resource_group_name: str, + account_name: str, + body: Optional[ChangeKeyVault] = None, *, - availability_zone_mappings: Optional[list[RegionInfoAvailabilityZoneMappingsItem]] = ..., - storage_to_network_proximity: Optional[Union[str, RegionStorageToNetworkProximity]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.RegionInfoAvailabilityZoneMappingsItem(_Model): - availability_zone: Optional[str] - is_available: Optional[bool] + def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[ChangeKeyVault] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_change_key_vault( self, + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, *, - availability_zone: Optional[str] = ..., - is_available: Optional[bool] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.RegionInfoResource(ProxyResource): - id: str - name: str - properties: Optional[RegionInfo] - system_data: SystemData - type: str - - def __getattr__(self, name: str) -> Any: ... + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + body: NetAppAccount, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + account_name: str, + body: NetAppAccount, *, - properties: Optional[RegionInfo] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_create_or_update( self, - key: str, - value: Any - ) -> None: ... - + resource_group_name: str, + account_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... - class azure.mgmt.netapp.models.RegionStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACROSS_T2 = "AcrossT2" - DEFAULT = "Default" - T1 = "T1" - T1_AND_ACROSS_T2 = "T1AndAcrossT2" - T1_AND_T2 = "T1AndT2" - T1_AND_T2_AND_ACROSS_T2 = "T1AndT2AndAcrossT2" - T2 = "T2" - T2_AND_ACROSS_T2 = "T2AndAcrossT2" + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + @distributed_trace + def begin_get_change_key_vault_information( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> LROPoller[GetKeyVaultStatusResponse]: ... - class azure.mgmt.netapp.models.RelocateVolumeRequest(_Model): - creation_token: Optional[str] + @distributed_trace + def begin_renew_credentials( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_transition_to_cmk( self, + resource_group_name: str, + account_name: str, + body: Optional[EncryptionTransitionRequest] = None, *, - creation_token: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.RemotePath(_Model): - external_host_name: str - server_name: str - volume_name: str + def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[EncryptionTransitionRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_transition_to_cmk( self, - *, - external_host_name: str, - server_name: str, - volume_name: str - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.Replication(_Model): - endpoint_type: Optional[Union[str, EndpointType]] - mirror_state: Optional[Union[str, ReplicationMirrorState]] - remote_volume_region: Optional[str] - remote_volume_resource_id: Optional[str] - replication_creation_time: Optional[datetime] - replication_deletion_time: Optional[datetime] - replication_id: Optional[str] - replication_schedule: Optional[Union[str, ReplicationSchedule]] + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + body: NetAppAccountPatch, *, - endpoint_type: Optional[Union[str, EndpointType]] = ..., - remote_volume_region: Optional[str] = ..., - remote_volume_resource_id: Optional[str] = ..., - replication_schedule: Optional[Union[str, ReplicationSchedule]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.ReplicationMirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BROKEN = "Broken" - MIRRORED = "Mirrored" - UNINITIALIZED = "Uninitialized" - - - class azure.mgmt.netapp.models.ReplicationObject(_Model): - destination_replications: Optional[list[DestinationReplication]] - endpoint_type: Optional[Union[str, EndpointType]] - external_replication_setup_info: Optional[str] - external_replication_setup_status: Optional[Union[str, ExternalReplicationSetupStatus]] - mirror_state: Optional[Union[str, MirrorState]] - relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] - remote_path: Optional[RemotePath] - remote_volume_region: Optional[str] - remote_volume_resource_id: Optional[str] - replication_id: Optional[str] - replication_schedule: Optional[Union[str, ReplicationSchedule]] + def begin_update( + self, + resource_group_name: str, + account_name: str, + body: NetAppAccountPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + body: IO[bytes], *, - remote_path: Optional[RemotePath] = ..., - remote_volume_region: Optional[str] = ..., - remote_volume_resource_id: Optional[str] = ..., - replication_schedule: Optional[Union[str, ReplicationSchedule]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetAppAccount]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> NetAppAccount: ... + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> ItemPaged[NetAppAccount]: ... - class azure.mgmt.netapp.models.ReplicationSchedule(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DAILY = "daily" - ENUM_10_MINUTELY = "_10minutely" - HOURLY = "hourly" + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged[NetAppAccount]: ... - class azure.mgmt.netapp.models.ReplicationStatus(_Model): - error_message: Optional[str] - healthy: Optional[bool] - mirror_state: Optional[Union[str, MirrorState]] - relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] - total_progress: Optional[str] + class azure.mgmt.netapp.operations.BackupPoliciesOperations: - @overload def __init__( self, - *, - error_message: Optional[str] = ..., - healthy: Optional[bool] = ..., - mirror_state: Optional[Union[str, MirrorState]] = ..., - relationship_status: Optional[Union[str, VolumeReplicationRelationshipStatus]] = ..., - total_progress: Optional[str] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.ReplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CROSS_REGION_REPLICATION = "CrossRegionReplication" - CROSS_ZONE_REPLICATION = "CrossZoneReplication" - - - class azure.mgmt.netapp.models.Resource(_Model): - id: Optional[str] - name: Optional[str] - system_data: Optional[SystemData] - type: Optional[str] - - - class azure.mgmt.netapp.models.ResourceNameAvailabilityRequest(_Model): - name: str - resource_group: str - type: Union[str, CheckNameResourceTypes] + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: BackupPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... @overload - def __init__( + def begin_create( self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: BackupPolicy, *, - name: str, - resource_group: str, - type: Union[str, CheckNameResourceTypes] - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.RestoreStatus(_Model): - error_message: Optional[str] - healthy: Optional[bool] - mirror_state: Optional[Union[str, MirrorState]] - relationship_status: Optional[Union[str, VolumeRestoreRelationshipStatus]] - total_transfer_bytes: Optional[int] - unhealthy_reason: Optional[str] - + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... - class azure.mgmt.netapp.models.SecretPassword(_Model): - identity: Optional[SecretPasswordIdentity] - key_vault_properties: Optional[SecretPasswordKeyVaultProperties] + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: BackupPolicyPatch, *, - identity: Optional[SecretPasswordIdentity] = ..., - key_vault_properties: Optional[SecretPasswordKeyVaultProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SecretPasswordIdentity(_Model): - principal_id: Optional[str] - user_assigned_identity: Optional[str] + def begin_update( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: BackupPolicyPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: IO[bytes], *, - user_assigned_identity: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupPolicy]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + **kwargs: Any + ) -> BackupPolicy: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> ItemPaged[BackupPolicy]: ... - class azure.mgmt.netapp.models.SecretPasswordKeyVaultProperties(_Model): - key_vault_uri: str - secret_name: str + class azure.mgmt.netapp.operations.BackupVaultsOperations: - @overload def __init__( self, - *, - key_vault_uri: str, - secret_name: str + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NTFS = "ntfs" - UNIX = "unix" - - - class azure.mgmt.netapp.models.ServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FLEXIBLE = "Flexible" - PREMIUM = "Premium" - STANDARD = "Standard" - STANDARD_ZRS = "StandardZRS" - ULTRA = "Ultra" - - - class azure.mgmt.netapp.models.ServiceSpecification(_Model): - log_specifications: Optional[list[LogSpecification]] - metric_specifications: Optional[list[MetricSpecification]] + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: BackupVault, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: BackupVault, *, - log_specifications: Optional[list[LogSpecification]] = ..., - metric_specifications: Optional[list[MetricSpecification]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.SmbEncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.netapp.models.SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... - class azure.mgmt.netapp.models.SmbSettings(_Model): - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] - smb_encryption: Optional[Union[str, SmbEncryptionState]] - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: BackupVaultPatch, *, - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., - smb_encryption: Optional[Union[str, SmbEncryptionState]] = ..., - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.Snapshot(ProxyResource): - id: str - location: str - name: str - properties: Optional[SnapshotProperties] - system_data: SystemData - type: str - - def __getattr__(self, name: str) -> Any: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: BackupVaultPatch, *, - location: str, - properties: Optional[SnapshotProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_update( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.SnapshotDirectoryVisibility(str, Enum, metaclass=CaseInsensitiveEnumMeta): - HIDDEN = "Hidden" - VISIBLE = "Visible" - + resource_group_name: str, + account_name: str, + backup_vault_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[BackupVault]: ... - class azure.mgmt.netapp.models.SnapshotPatch(_Model): + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + **kwargs: Any + ) -> BackupVault: ... + @distributed_trace + def list_by_net_app_account( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> ItemPaged[BackupVault]: ... - class azure.mgmt.netapp.models.SnapshotPolicy(TrackedResource): - etag: Optional[str] - id: str - location: str - name: str - properties: SnapshotPolicyProperties - system_data: SystemData - tags: dict[str, str] - type: str - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.operations.BackupsOperations: - @overload def __init__( self, - *, - location: str, - properties: SnapshotPolicyProperties, - tags: Optional[dict[str, str]] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_create( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.SnapshotPolicyPatch(_Model): - id: Optional[str] - location: Optional[str] - name: Optional[str] - properties: Optional[SnapshotPolicyProperties] - tags: Optional[dict[str, str]] - type: Optional[str] - - def __getattr__(self, name: str) -> Any: ... + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: Backup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... @overload - def __init__( + def begin_create( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: Backup, *, - location: Optional[str] = ..., - properties: Optional[SnapshotPolicyProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_create( self, - key: str, - value: Any - ) -> None: ... - + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... - class azure.mgmt.netapp.models.SnapshotPolicyProperties(_Model): - daily_schedule: Optional[DailySchedule] - enabled: Optional[bool] - hourly_schedule: Optional[HourlySchedule] - monthly_schedule: Optional[MonthlySchedule] - provisioning_state: Optional[str] - weekly_schedule: Optional[WeeklySchedule] + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: Optional[BackupPatch] = None, *, - daily_schedule: Optional[DailySchedule] = ..., - enabled: Optional[bool] = ..., - hourly_schedule: Optional[HourlySchedule] = ..., - monthly_schedule: Optional[MonthlySchedule] = ..., - weekly_schedule: Optional[WeeklySchedule] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SnapshotPolicyVolumeList(_Model): - next_link: Optional[str] - value: list[Volume] - - @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: Optional[BackupPatch] = None, *, - next_link: Optional[str] = ..., - value: list[Volume] - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SnapshotProperties(_Model): - created: Optional[datetime] - provisioning_state: Optional[str] - snapshot_id: Optional[str] - - - class azure.mgmt.netapp.models.SnapshotRestoreFiles(_Model): - destination_path: Optional[str] - file_paths: list[str] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: Optional[IO[bytes]] = None, *, - destination_path: Optional[str] = ..., - file_paths: list[str] - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Backup]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + **kwargs: Any + ) -> Backup: ... + @distributed_trace + def get_latest_status( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> BackupStatus: ... - class azure.mgmt.netapp.models.SnapshotUsage(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CREATE_NEW_SNAPSHOT = "CreateNewSnapshot" - USE_EXISTING_SNAPSHOT = "UseExistingSnapshot" + @distributed_trace + def get_volume_latest_restore_status( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> RestoreStatus: ... + @distributed_trace + def list_by_vault( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + *, + filter: Optional[str] = ..., + **kwargs: Any + ) -> ItemPaged[Backup]: ... - class azure.mgmt.netapp.models.SubvolumeInfo(ProxyResource): - id: str - name: str - properties: Optional[SubvolumeProperties] - system_data: SystemData - type: str - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.operations.BackupsUnderAccountOperations: - @overload def __init__( self, - *, - properties: Optional[SubvolumeProperties] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_migrate_backups( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.SubvolumeModel(_Model): - id: Optional[str] - name: Optional[str] - properties: Optional[SubvolumeModelProperties] - type: Optional[str] - - def __getattr__(self, name: str) -> Any: ... + resource_group_name: str, + account_name: str, + body: BackupsMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_migrate_backups( self, + resource_group_name: str, + account_name: str, + body: BackupsMigrationRequest, *, - properties: Optional[SubvolumeModelProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_migrate_backups( self, - key: str, - value: Any - ) -> None: ... + resource_group_name: str, + account_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.netapp.models.SubvolumeModelProperties(_Model): - accessed_time_stamp: Optional[datetime] - bytes_used: Optional[int] - changed_time_stamp: Optional[datetime] - creation_time_stamp: Optional[datetime] - modified_time_stamp: Optional[datetime] - parent_path: Optional[str] - path: Optional[str] - permissions: Optional[str] - provisioning_state: Optional[str] - size: Optional[int] + class azure.mgmt.netapp.operations.BackupsUnderBackupVaultOperations: - @overload def __init__( self, - *, - accessed_time_stamp: Optional[datetime] = ..., - bytes_used: Optional[int] = ..., - changed_time_stamp: Optional[datetime] = ..., - creation_time_stamp: Optional[datetime] = ..., - modified_time_stamp: Optional[datetime] = ..., - parent_path: Optional[str] = ..., - path: Optional[str] = ..., - permissions: Optional[str] = ..., - provisioning_state: Optional[str] = ..., - size: Optional[int] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SubvolumePatchParams(_Model): - path: Optional[str] - size: Optional[int] + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: BackupRestoreFiles, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_restore_files( self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: BackupRestoreFiles, *, - path: Optional[str] = ..., - size: Optional[int] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.netapp.models.SubvolumePatchRequest(_Model): - properties: Optional[SubvolumePatchParams] - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.operations.BackupsUnderVolumeOperations: - @overload def __init__( self, - *, - properties: Optional[SubvolumePatchParams] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_migrate_backups( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.SubvolumeProperties(_Model): - parent_path: Optional[str] - path: Optional[str] - provisioning_state: Optional[str] - size: Optional[int] + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: BackupsMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_migrate_backups( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: BackupsMigrationRequest, *, - parent_path: Optional[str] = ..., - path: Optional[str] = ..., - size: Optional[int] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SuspectFile(_Model): - file_timestamp: Optional[datetime] - suspect_file_name: Optional[str] + def begin_migrate_backups( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.netapp.models.SvmPeerCommandResponse(_Model): - properties: Optional[SvmPeerCommandResponseProperties] + class azure.mgmt.netapp.operations.BucketsOperations: - @overload def __init__( self, - *, - properties: Optional[SvmPeerCommandResponseProperties] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.SvmPeerCommandResponseProperties(_Model): - svm_peering_command: Optional[str] + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: Bucket, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: Bucket, *, - svm_peering_command: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... - class azure.mgmt.netapp.models.SystemData(_Model): - created_at: Optional[datetime] - created_by: Optional[str] - created_by_type: Optional[Union[str, CreatedByType]] - last_modified_at: Optional[datetime] - last_modified_by: Optional[str] - last_modified_by_type: Optional[Union[str, CreatedByType]] + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def begin_delete( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_generate_akv_credentials( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketCredentialsExpiry, *, - created_at: Optional[datetime] = ..., - created_by: Optional[str] = ..., - created_by_type: Optional[Union[str, CreatedByType]] = ..., - last_modified_at: Optional[datetime] = ..., - last_modified_by: Optional[str] = ..., - last_modified_by_type: Optional[Union[str, CreatedByType]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.TrackedResource(Resource): - id: str - location: str - name: str - system_data: SystemData - tags: Optional[dict[str, str]] - type: str + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_generate_akv_credentials( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketCredentialsExpiry, *, - location: str, - tags: Optional[dict[str, str]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_generate_akv_credentials( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest(_Model): - network_features: Union[str, NetworkFeatures] - network_sibling_set_id: str - network_sibling_set_state_id: str - subnet_id: str + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def begin_refresh_certificate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketPatch, *, - network_features: Union[str, NetworkFeatures], - network_sibling_set_id: str, - network_sibling_set_state_id: str, - subnet_id: str - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.UsageName(_Model): - localized_value: Optional[str] - value: Optional[str] + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: IO[bytes], *, - localized_value: Optional[str] = ..., - value: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Bucket]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.UsageProperties(_Model): - current_value: Optional[int] - limit: Optional[int] - unit: Optional[str] - - - class azure.mgmt.netapp.models.UsageResult(_Model): - id: Optional[str] - name: Optional[UsageName] - properties: Optional[UsageProperties] - - def __getattr__(self, name: str) -> Any: ... + def generate_credentials( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketCredentialsExpiry, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> BucketGenerateCredentials: ... @overload - def __init__( + def generate_credentials( self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: BucketCredentialsExpiry, *, - properties: Optional[UsageProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> BucketGenerateCredentials: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def generate_credentials( self, - key: str, - value: Any - ) -> None: ... - + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> BucketGenerateCredentials: ... - class azure.mgmt.netapp.models.UserAssignedIdentity(_Model): - client_id: Optional[str] - principal_id: Optional[str] + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def get( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any + ) -> Bucket: ... + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> ItemPaged[Bucket]: ... - class azure.mgmt.netapp.models.Volume(TrackedResource): - etag: Optional[str] - id: str - location: str - name: str - properties: VolumeProperties - system_data: SystemData - tags: dict[str, str] - type: str - zones: Optional[list[str]] - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.operations.CachesOperations: - @overload def __init__( self, - *, - location: str, - properties: VolumeProperties, - tags: Optional[dict[str, str]] = ..., - zones: Optional[list[str]] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_create_or_update( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumeBackupProperties(_Model): - backup_policy_id: Optional[str] - backup_vault_id: Optional[str] - policy_enforced: Optional[bool] + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: Cache, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: Cache, *, - backup_policy_id: Optional[str] = ..., - backup_vault_id: Optional[str] = ..., - policy_enforced: Optional[bool] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeBackupRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FAILED = "Failed" - IDLE = "Idle" - TRANSFERRING = "Transferring" - UNKNOWN = "Unknown" - - - class azure.mgmt.netapp.models.VolumeBackups(_Model): - backups_count: Optional[int] - policy_enabled: Optional[bool] - volume_name: Optional[str] - volume_resource_id: Optional[str] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: IO[bytes], *, - backups_count: Optional[int] = ..., - policy_enabled: Optional[bool] = ..., - volume_name: Optional[str] = ..., - volume_resource_id: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroup(_Model): - id: Optional[str] - location: Optional[str] - name: Optional[str] - properties: Optional[VolumeGroupListProperties] - type: Optional[str] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... - def __getattr__(self, name: str) -> Any: ... + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def begin_delete( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_pool_change( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: PoolChangeRequest, *, - location: Optional[str] = ..., - properties: Optional[VolumeGroupListProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_pool_change( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroupDetails(ProxyResource): - id: str - location: Optional[str] - name: str - properties: Optional[VolumeGroupProperties] - system_data: SystemData - type: str - - def __getattr__(self, name: str) -> Any: ... + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: PoolChangeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__( + def begin_pool_change( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: IO[bytes], *, - location: Optional[str] = ..., - properties: Optional[VolumeGroupProperties] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... - def __setattr__( + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def begin_reset_smb_password( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroupListProperties(_Model): - group_meta_data: Optional[VolumeGroupMetaData] - provisioning_state: Optional[str] + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: CacheUpdate, *, - group_meta_data: Optional[VolumeGroupMetaData] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroupMetaData(_Model): - application_identifier: Optional[str] - application_type: Optional[Union[str, ApplicationType]] - global_placement_rules: Optional[list[PlacementKeyValuePairs]] - group_description: Optional[str] - volumes_count: Optional[int] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: CacheUpdate, *, - application_identifier: Optional[str] = ..., - application_type: Optional[Union[str, ApplicationType]] = ..., - global_placement_rules: Optional[list[PlacementKeyValuePairs]] = ..., - group_description: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroupProperties(_Model): - group_meta_data: Optional[VolumeGroupMetaData] - provisioning_state: Optional[str] - volumes: Optional[list[VolumeGroupVolumeProperties]] - - @overload - def __init__( + def begin_update( self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + body: IO[bytes], *, - group_meta_data: Optional[VolumeGroupMetaData] = ..., - volumes: Optional[list[VolumeGroupVolumeProperties]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeGroupVolumeProperties(_Model): - id: Optional[str] - name: Optional[str] - properties: VolumeProperties - tags: Optional[dict[str, str]] - type: Optional[str] - zones: Optional[list[str]] - - def __getattr__(self, name: str) -> Any: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[Cache]: ... - @overload - def __init__( + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def get( self, - *, - name: Optional[str] = ..., - properties: VolumeProperties, - tags: Optional[dict[str, str]] = ..., - zones: Optional[list[str]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + **kwargs: Any + ) -> Cache: ... - def __setattr__( + @distributed_trace + @api_version_validation(method_added_on='2026-01-01', params_added_on={'2026-01-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumeLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AR = "ar" - AR_UTF8 = "ar.utf-8" - C = "c" - CS = "cs" - CS_UTF8 = "cs.utf-8" - C_UTF8 = "c.utf-8" - DA = "da" - DA_UTF8 = "da.utf-8" - DE = "de" - DE_UTF8 = "de.utf-8" - EN = "en" - EN_US = "en-us" - EN_US_UTF8 = "en-us.utf-8" - EN_UTF8 = "en.utf-8" - ES = "es" - ES_UTF8 = "es.utf-8" - FI = "fi" - FI_UTF8 = "fi.utf-8" - FR = "fr" - FR_UTF8 = "fr.utf-8" - HE = "he" - HE_UTF8 = "he.utf-8" - HR = "hr" - HR_UTF8 = "hr.utf-8" - HU = "hu" - HU_UTF8 = "hu.utf-8" - IT = "it" - IT_UTF8 = "it.utf-8" - JA = "ja" - JA_JP932 = "ja-jp.932" - JA_JP932_UTF8 = "ja-jp.932.utf-8" - JA_JP_PCK = "ja-jp.pck" - JA_JP_PCK_UTF8 = "ja-jp.pck.utf-8" - JA_JP_PCK_V2 = "ja-jp.pck-v2" - JA_JP_PCK_V2_UTF8 = "ja-jp.pck-v2.utf-8" - JA_UTF8 = "ja.utf-8" - JA_V1 = "ja-v1" - JA_V1_UTF8 = "ja-v1.utf-8" - KO = "ko" - KO_UTF8 = "ko.utf-8" - NL = "nl" - NL_UTF8 = "nl.utf-8" - NO = "no" - NO_UTF8 = "no.utf-8" - PL = "pl" - PL_UTF8 = "pl.utf-8" - PT = "pt" - PT_UTF8 = "pt.utf-8" - RO = "ro" - RO_UTF8 = "ro.utf-8" - RU = "ru" - RU_UTF8 = "ru.utf-8" - SK = "sk" - SK_UTF8 = "sk.utf-8" - SL = "sl" - SL_UTF8 = "sl.utf-8" - SV = "sv" - SV_UTF8 = "sv.utf-8" - TR = "tr" - TR_UTF8 = "tr.utf-8" - UTF8_MB4 = "utf8mb4" - ZH = "zh" - ZH_GBK = "zh.gbk" - ZH_GBK_UTF8 = "zh.gbk.utf-8" - ZH_TW = "zh-tw" - ZH_TW_BIG5 = "zh-tw.big5" - ZH_TW_BIG5_UTF8 = "zh-tw.big5.utf-8" - ZH_TW_UTF8 = "zh-tw.utf-8" - ZH_UTF8 = "zh.utf-8" + resource_group_name: str, + account_name: str, + pool_name: str, + **kwargs: Any + ) -> ItemPaged[Cache]: ... + @distributed_trace + @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list_peering_passphrases( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + cache_name: str, + **kwargs: Any + ) -> PeeringPassphrases: ... - class azure.mgmt.netapp.models.VolumePatch(_Model): - id: Optional[str] - location: Optional[str] - name: Optional[str] - properties: Optional[VolumePatchProperties] - tags: Optional[dict[str, str]] - type: Optional[str] - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.netapp.operations.NetAppResourceOperations: - @overload def __init__( self, - *, - location: Optional[str] = ..., - properties: Optional[VolumePatchProperties] = ..., - tags: Optional[dict[str, str]] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def begin_update_network_sibling_set( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumePatchProperties(_Model): - cool_access: Optional[bool] - cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] - cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] - coolness_period: Optional[int] - data_protection: Optional[VolumePatchPropertiesDataProtection] - default_group_quota_in_ki_bs: Optional[int] - default_user_quota_in_ki_bs: Optional[int] - export_policy: Optional[VolumePatchPropertiesExportPolicy] - is_default_quota_enabled: Optional[bool] - protocol_types: Optional[list[str]] - service_level: Optional[Union[str, ServiceLevel]] - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] - snapshot_directory_visible: Optional[bool] - throughput_mibps: Optional[float] - unix_permissions: Optional[str] - usage_threshold: Optional[int] + location: str, + body: UpdateNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetworkSiblingSet]: ... @overload - def __init__( + def begin_update_network_sibling_set( self, + location: str, + body: UpdateNetworkSiblingSetRequest, *, - cool_access: Optional[bool] = ..., - cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] = ..., - cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] = ..., - coolness_period: Optional[int] = ..., - data_protection: Optional[VolumePatchPropertiesDataProtection] = ..., - default_group_quota_in_ki_bs: Optional[int] = ..., - default_user_quota_in_ki_bs: Optional[int] = ..., - export_policy: Optional[VolumePatchPropertiesExportPolicy] = ..., - is_default_quota_enabled: Optional[bool] = ..., - protocol_types: Optional[list[str]] = ..., - service_level: Optional[Union[str, ServiceLevel]] = ..., - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ..., - snapshot_directory_visible: Optional[bool] = ..., - throughput_mibps: Optional[float] = ..., - unix_permissions: Optional[str] = ..., - usage_threshold: Optional[int] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumePatchPropertiesDataProtection(_Model): - backup: Optional[VolumeBackupProperties] - ransomware_protection: Optional[RansomwareProtectionPatchSettings] - snapshot: Optional[VolumeSnapshotProperties] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetworkSiblingSet]: ... @overload - def __init__( + def begin_update_network_sibling_set( self, + location: str, + body: IO[bytes], *, - backup: Optional[VolumeBackupProperties] = ..., - ransomware_protection: Optional[RansomwareProtectionPatchSettings] = ..., - snapshot: Optional[VolumeSnapshotProperties] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy(_Model): - rules: Optional[list[ExportPolicyRule]] + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[NetworkSiblingSet]: ... @overload - def __init__( + def check_file_path_availability( self, + location: str, + body: FilePathAvailabilityRequest, *, - rules: Optional[list[ExportPolicyRule]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeProperties(_Model): - accept_grow_capacity_pool_for_short_term_clone_split: Optional[Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit]] - actual_throughput_mibps: Optional[float] - avs_data_store: Optional[Union[str, AvsDataStore]] - backup_id: Optional[str] - baremetal_tenant_id: Optional[str] - breakthrough_mode: Optional[Union[str, BreakthroughMode]] - capacity_pool_resource_id: Optional[str] - clone_progress: Optional[int] - cool_access: Optional[bool] - cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] - cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] - coolness_period: Optional[int] - creation_token: str - data_protection: Optional[VolumePropertiesDataProtection] - data_store_resource_id: Optional[list[str]] - default_group_quota_in_ki_bs: Optional[int] - default_user_quota_in_ki_bs: Optional[int] - delete_base_snapshot: Optional[bool] - effective_network_features: Optional[Union[str, NetworkFeatures]] - enable_subvolumes: Optional[Union[str, EnableSubvolumes]] - encrypted: Optional[bool] - encryption_key_source: Optional[Union[str, EncryptionKeySource]] - export_policy: Optional[VolumePropertiesExportPolicy] - file_access_logs: Optional[Union[str, FileAccessLogs]] - file_system_id: Optional[str] - inherited_size_in_bytes: Optional[int] - is_default_quota_enabled: Optional[bool] - is_large_volume: Optional[bool] - is_restoring: Optional[bool] - kerberos_enabled: Optional[bool] - key_vault_private_endpoint_resource_id: Optional[str] - language: Optional[Union[str, VolumeLanguage]] - large_volume_type: Optional[Union[str, LargeVolumeType]] - ldap_enabled: Optional[bool] - ldap_server_type: Optional[Union[str, LdapServerType]] - maximum_number_of_files: Optional[int] - mount_targets: Optional[list[MountTargetProperties]] - network_features: Optional[Union[str, NetworkFeatures]] - network_sibling_set_id: Optional[str] - originating_resource_id: Optional[str] - placement_rules: Optional[list[PlacementKeyValuePairs]] - protocol_types: Optional[list[str]] - provisioned_availability_zone: Optional[str] - provisioning_state: Optional[str] - proximity_placement_group: Optional[str] - security_style: Optional[Union[str, SecurityStyle]] - service_level: Optional[Union[str, ServiceLevel]] - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] - smb_continuously_available: Optional[bool] - smb_encryption: Optional[bool] - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] - snapshot_directory_visible: Optional[bool] - snapshot_id: Optional[str] - storage_to_network_proximity: Optional[Union[str, VolumeStorageToNetworkProximity]] - subnet_id: str - t2_network: Optional[str] - throughput_mibps: Optional[float] - unix_permissions: Optional[str] - usage_threshold: int - volume_group_name: Optional[str] - volume_spec_name: Optional[str] - volume_type: Optional[str] + def check_file_path_availability( + self, + location: str, + body: FilePathAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__( + def check_file_path_availability( self, + location: str, + body: IO[bytes], *, - accept_grow_capacity_pool_for_short_term_clone_split: Optional[Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit]] = ..., - avs_data_store: Optional[Union[str, AvsDataStore]] = ..., - backup_id: Optional[str] = ..., - breakthrough_mode: Optional[Union[str, BreakthroughMode]] = ..., - capacity_pool_resource_id: Optional[str] = ..., - cool_access: Optional[bool] = ..., - cool_access_retrieval_policy: Optional[Union[str, CoolAccessRetrievalPolicy]] = ..., - cool_access_tiering_policy: Optional[Union[str, CoolAccessTieringPolicy]] = ..., - coolness_period: Optional[int] = ..., - creation_token: str, - data_protection: Optional[VolumePropertiesDataProtection] = ..., - default_group_quota_in_ki_bs: Optional[int] = ..., - default_user_quota_in_ki_bs: Optional[int] = ..., - delete_base_snapshot: Optional[bool] = ..., - enable_subvolumes: Optional[Union[str, EnableSubvolumes]] = ..., - encryption_key_source: Optional[Union[str, EncryptionKeySource]] = ..., - export_policy: Optional[VolumePropertiesExportPolicy] = ..., - is_default_quota_enabled: Optional[bool] = ..., - is_large_volume: Optional[bool] = ..., - kerberos_enabled: Optional[bool] = ..., - key_vault_private_endpoint_resource_id: Optional[str] = ..., - language: Optional[Union[str, VolumeLanguage]] = ..., - large_volume_type: Optional[Union[str, LargeVolumeType]] = ..., - ldap_enabled: Optional[bool] = ..., - ldap_server_type: Optional[Union[str, LdapServerType]] = ..., - network_features: Optional[Union[str, NetworkFeatures]] = ..., - placement_rules: Optional[list[PlacementKeyValuePairs]] = ..., - protocol_types: Optional[list[str]] = ..., - proximity_placement_group: Optional[str] = ..., - security_style: Optional[Union[str, SecurityStyle]] = ..., - service_level: Optional[Union[str, ServiceLevel]] = ..., - smb_access_based_enumeration: Optional[Union[str, SmbAccessBasedEnumeration]] = ..., - smb_continuously_available: Optional[bool] = ..., - smb_encryption: Optional[bool] = ..., - smb_non_browsable: Optional[Union[str, SmbNonBrowsable]] = ..., - snapshot_directory_visible: Optional[bool] = ..., - snapshot_id: Optional[str] = ..., - subnet_id: str, - throughput_mibps: Optional[float] = ..., - unix_permissions: Optional[str] = ..., - usage_threshold: int, - volume_spec_name: Optional[str] = ..., - volume_type: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumePropertiesDataProtection(_Model): - backup: Optional[VolumeBackupProperties] - ransomware_protection: Optional[RansomwareProtectionSettings] - replication: Optional[ReplicationObject] - snapshot: Optional[VolumeSnapshotProperties] - volume_relocation: Optional[VolumeRelocationProperties] + def check_name_availability( + self, + location: str, + body: ResourceNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__( + def check_name_availability( self, + location: str, + body: ResourceNameAvailabilityRequest, *, - backup: Optional[VolumeBackupProperties] = ..., - ransomware_protection: Optional[RansomwareProtectionSettings] = ..., - replication: Optional[ReplicationObject] = ..., - snapshot: Optional[VolumeSnapshotProperties] = ..., - volume_relocation: Optional[VolumeRelocationProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumePropertiesExportPolicy(_Model): - rules: Optional[list[ExportPolicyRule]] + def check_name_availability( + self, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__( + def check_quota_availability( self, + location: str, + body: QuotaAvailabilityRequest, *, - rules: Optional[list[ExportPolicyRule]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeQuotaRule(TrackedResource): - id: str - location: str - name: str - properties: Optional[VolumeQuotaRulesProperties] - system_data: SystemData - tags: dict[str, str] - type: str - - def __getattr__(self, name: str) -> Any: ... + def check_quota_availability( + self, + location: str, + body: QuotaAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__( + def check_quota_availability( self, - *, location: str, - properties: Optional[VolumeQuotaRulesProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckAvailabilityResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def query_network_sibling_set( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.netapp.models.VolumeQuotaRulePatch(_Model): - properties: Optional[VolumeQuotaRulesProperties] - tags: Optional[dict[str, str]] - - def __getattr__(self, name: str) -> Any: ... + location: str, + body: QueryNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NetworkSiblingSet: ... @overload - def __init__( + def query_network_sibling_set( self, + location: str, + body: QueryNetworkSiblingSetRequest, *, - properties: Optional[VolumeQuotaRulesProperties] = ..., - tags: Optional[dict[str, str]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> NetworkSiblingSet: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def query_network_sibling_set( + self, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NetworkSiblingSet: ... - def __setattr__( + @distributed_trace + def query_region_info( self, - key: str, - value: Any - ) -> None: ... + location: str, + **kwargs: Any + ) -> RegionInfo: ... - class azure.mgmt.netapp.models.VolumeQuotaRulesProperties(_Model): - provisioning_state: Optional[Union[str, NetAppProvisioningState]] - quota_size_in_ki_bs: Optional[int] - quota_target: Optional[str] - quota_type: Optional[Union[str, QuotaType]] + class azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsAccountOperations: - @overload def __init__( self, - *, - quota_size_in_ki_bs: Optional[int] = ..., - quota_target: Optional[str] = ..., - quota_type: Optional[Union[str, QuotaType]] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'quota_limit_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def get( + self, + resource_group_name: str, + account_name: str, + quota_limit_name: str, + **kwargs: Any + ) -> QuotaItem: ... + @distributed_trace + @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> ItemPaged[QuotaItem]: ... - class azure.mgmt.netapp.models.VolumeRelocationProperties(_Model): - ready_to_be_finalized: Optional[bool] - relocation_requested: Optional[bool] - @overload + class azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations: + def __init__( self, - *, - relocation_requested: Optional[bool] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.netapp.models.VolumeReplicationRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - IDLE = "Idle" - TRANSFERRING = "Transferring" - + @distributed_trace + def get( + self, + location: str, + quota_limit_name: str, + **kwargs: Any + ) -> QuotaItem: ... - class azure.mgmt.netapp.models.VolumeRestoreRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FAILED = "Failed" - IDLE = "Idle" - TRANSFERRING = "Transferring" - UNKNOWN = "Unknown" + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[QuotaItem]: ... - class azure.mgmt.netapp.models.VolumeRevert(_Model): - snapshot_id: Optional[str] + class azure.mgmt.netapp.operations.NetAppResourceRegionInfosOperations: - @overload def __init__( self, - *, - snapshot_id: Optional[str] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + @distributed_trace + def get( + self, + location: str, + **kwargs: Any + ) -> RegionInfoResource: ... - class azure.mgmt.netapp.models.VolumeSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): - LARGE = "Large" - REGULAR = "Regular" + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[RegionInfoResource]: ... - class azure.mgmt.netapp.models.VolumeSnapshotProperties(_Model): - snapshot_policy_id: Optional[str] + class azure.mgmt.netapp.operations.NetAppResourceUsagesOperations: - @overload def __init__( self, - *, - snapshot_policy_id: Optional[str] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + @distributed_trace + def get( + self, + location: str, + usage_type: str, + **kwargs: Any + ) -> UsageResult: ... - class azure.mgmt.netapp.models.VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ACROSS_T2 = "AcrossT2" - DEFAULT = "Default" - T1 = "T1" - T2 = "T2" + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[UsageResult]: ... - class azure.mgmt.netapp.models.WeeklySchedule(_Model): - day: Optional[str] - hour: Optional[int] - minute: Optional[int] - snapshots_to_keep: Optional[int] - used_bytes: Optional[int] + class azure.mgmt.netapp.operations.Operations: - @overload def __init__( self, - *, - day: Optional[str] = ..., - hour: Optional[int] = ..., - minute: Optional[int] = ..., - snapshots_to_keep: Optional[int] = ..., - used_bytes: Optional[int] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged[Operation]: ... -namespace azure.mgmt.netapp.operations - class azure.mgmt.netapp.operations.AccountsOperations: + class azure.mgmt.netapp.operations.PoolsOperations: def __init__( self, @@ -9039,190 +7925,179 @@ namespace azure.mgmt.netapp.operations ) -> None: ... @overload - def begin_change_key_vault( + def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: Optional[ChangeKeyVault] = None, + pool_name: str, + body: CapacityPool, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... + ) -> LROPoller[CapacityPool]: ... @overload - def begin_change_key_vault( + def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + pool_name: str, + body: CapacityPool, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... + ) -> LROPoller[CapacityPool]: ... @overload - def begin_change_key_vault( + def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: Optional[IO[bytes]] = None, + pool_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[CapacityPool]: ... + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - body: NetAppAccount, + pool_name: str, + body: CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... + ) -> LROPoller[CapacityPool]: ... @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - body: JSON, + pool_name: str, + body: CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... + ) -> LROPoller[CapacityPool]: ... @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, + pool_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... + ) -> LROPoller[CapacityPool]: ... @distributed_trace - def begin_delete( + def get( self, resource_group_name: str, account_name: str, + pool_name: str, **kwargs: Any - ) -> LROPoller[None]: ... + ) -> CapacityPool: ... @distributed_trace - def begin_get_change_key_vault_information( + def list( self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> LROPoller[GetKeyVaultStatusResponse]: ... + ) -> ItemPaged[CapacityPool]: ... - @distributed_trace - @api_version_validation(method_added_on='2026-04-15-preview', params_added_on={'2026-04-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name']}, api_versions_list=['2026-04-15-preview']) - def begin_refresh_ldap_bind_password( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @distributed_trace - def begin_renew_credentials( + class azure.mgmt.netapp.operations.RansomwareReportsOperations: + + def __init__( self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + *args, + **kwargs + ) -> None: ... @overload - def begin_transition_to_cmk( + def begin_clear_suspects( self, resource_group_name: str, account_name: str, - body: Optional[EncryptionTransitionRequest] = None, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: RansomwareSuspectsClearRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_transition_to_cmk( + def begin_clear_suspects( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: RansomwareSuspectsClearRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_transition_to_cmk( + def begin_clear_suspects( self, resource_group_name: str, account_name: str, - body: Optional[IO[bytes]] = None, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... - @overload - def begin_update( + @distributed_trace + @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'ransomware_report_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def get( self, resource_group_name: str, account_name: str, - body: NetAppAccountPatch, - *, - content_type: str = "application/json", + pool_name: str, + volume_name: str, + ransomware_report_name: str, **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... + ) -> RansomwareReport: ... - @overload - def begin_update( + @distributed_trace + @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview', '2026-05-01']) + def list( self, resource_group_name: str, account_name: str, - body: JSON, - *, - content_type: str = "application/json", + pool_name: str, + volume_name: str, **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... + ) -> ItemPaged[RansomwareReport]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[NetAppAccount]: ... - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> NetAppAccount: ... - @distributed_trace - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> ItemPaged[NetAppAccount]: ... - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged[NetAppAccount]: ... - - - class azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations: + class azure.mgmt.netapp.operations.SnapshotPoliciesOperations: def __init__( self, @@ -9230,104 +8105,115 @@ namespace azure.mgmt.netapp.operations **kwargs ) -> None: ... - @overload - def begin_create_or_update( + @distributed_trace + def begin_delete( self, resource_group_name: str, - active_directory_config_name: str, - body: ActiveDirectoryConfig, - *, - content_type: str = "application/json", + account_name: str, + snapshot_policy_name: str, **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> LROPoller[None]: ... @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, - active_directory_config_name: str, - body: JSON, + account_name: str, + snapshot_policy_name: str, + body: SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> LROPoller[SnapshotPolicy]: ... @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], + account_name: str, + snapshot_policy_name: str, + body: SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> LROPoller[SnapshotPolicy]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'active_directory_config_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( + @overload + def begin_update( self, resource_group_name: str, - active_directory_config_name: str, + account_name: str, + snapshot_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... + ) -> LROPoller[SnapshotPolicy]: ... @overload - def begin_update( + def create( self, resource_group_name: str, - active_directory_config_name: str, - body: ActiveDirectoryConfigUpdate, + account_name: str, + snapshot_policy_name: str, + body: SnapshotPolicy, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> SnapshotPolicy: ... @overload - def begin_update( + def create( self, resource_group_name: str, - active_directory_config_name: str, - body: JSON, + account_name: str, + snapshot_policy_name: str, + body: SnapshotPolicy, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> SnapshotPolicy: ... @overload - def begin_update( + def create( self, resource_group_name: str, - active_directory_config_name: str, + account_name: str, + snapshot_policy_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ActiveDirectoryConfig]: ... + ) -> SnapshotPolicy: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'active_directory_config_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) def get( self, resource_group_name: str, - active_directory_config_name: str, + account_name: str, + snapshot_policy_name: str, **kwargs: Any - ) -> ActiveDirectoryConfig: ... + ) -> SnapshotPolicy: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_resource_group( + def list( self, resource_group_name: str, + account_name: str, **kwargs: Any - ) -> ItemPaged[ActiveDirectoryConfig]: ... + ) -> ItemPaged[SnapshotPolicy]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_subscription(self, **kwargs: Any) -> ItemPaged[ActiveDirectoryConfig]: ... + def list_volumes( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + **kwargs: Any + ) -> SnapshotPolicyVolumeList: ... - class azure.mgmt.netapp.operations.BackupPoliciesOperations: + class azure.mgmt.netapp.operations.SnapshotsOperations: def __init__( self, @@ -9340,43 +8226,93 @@ namespace azure.mgmt.netapp.operations self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: BackupPolicy, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Snapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @overload def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Snapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @overload def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @distributed_trace def begin_delete( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotRestoreFiles, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotRestoreFiles, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @@ -9385,56 +8321,66 @@ namespace azure.mgmt.netapp.operations self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: BackupPolicyPatch, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupPolicy]: ... + ) -> LROPoller[Snapshot]: ... @distributed_trace def get( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, **kwargs: Any - ) -> BackupPolicy: ... + ) -> Snapshot: ... @distributed_trace def list( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> ItemPaged[BackupPolicy]: ... + ) -> ItemPaged[Snapshot]: ... - class azure.mgmt.netapp.operations.BackupVaultsOperations: + class azure.mgmt.netapp.operations.SubvolumesOperations: def __init__( self, @@ -9443,105 +8389,134 @@ namespace azure.mgmt.netapp.operations ) -> None: ... @overload - def begin_create_or_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: BackupVault, + pool_name: str, + volume_name: str, + subvolume_name: str, + body: SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @overload - def begin_create_or_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, + pool_name: str, + volume_name: str, + subvolume_name: str, + body: SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @overload - def begin_create_or_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @distributed_trace def begin_delete( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, **kwargs: Any ) -> LROPoller[None]: ... + @distributed_trace + def begin_get_metadata( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, + **kwargs: Any + ) -> LROPoller[SubvolumeModel]: ... + @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: BackupVaultPatch, + pool_name: str, + volume_name: str, + subvolume_name: str, + body: SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, + pool_name: str, + volume_name: str, + subvolume_name: str, + body: SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[BackupVault]: ... + ) -> LROPoller[SubvolumeInfo]: ... @distributed_trace def get( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, **kwargs: Any - ) -> BackupVault: ... + ) -> SubvolumeInfo: ... @distributed_trace - def list_by_net_app_account( + def list_by_volume( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> ItemPaged[BackupVault]: ... + ) -> ItemPaged[SubvolumeInfo]: ... - class azure.mgmt.netapp.operations.BackupsOperations: + class azure.mgmt.netapp.operations.VolumeGroupsOperations: def __init__( self, @@ -9554,132 +8529,190 @@ namespace azure.mgmt.netapp.operations self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Backup, + volume_group_name: str, + body: VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeGroupDetails]: ... @overload def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + volume_group_name: str, + body: VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeGroupDetails]: ... @overload def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + volume_group_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeGroupDetails]: ... @distributed_trace def begin_delete( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + volume_group_name: str, **kwargs: Any ) -> LROPoller[None]: ... + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + **kwargs: Any + ) -> VolumeGroupDetails: ... + + @distributed_trace + def list_by_net_app_account( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> ItemPaged[VolumeGroup]: ... + + + class azure.mgmt.netapp.operations.VolumeQuotaRulesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[BackupPatch] = None, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeQuotaRule]: ... @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[JSON] = None, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeQuotaRule]: ... @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[IO[bytes]] = None, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Backup]: ... + ) -> LROPoller[VolumeQuotaRule]: ... @distributed_trace - def get( + def begin_delete( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, **kwargs: Any - ) -> Backup: ... + ) -> LROPoller[None]: ... - @distributed_trace - def get_latest_status( + @overload + def begin_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRulePatch, + *, + content_type: str = "application/json", **kwargs: Any - ) -> BackupStatus: ... + ) -> LROPoller[VolumeQuotaRule]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: VolumeQuotaRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[VolumeQuotaRule]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[VolumeQuotaRule]: ... @distributed_trace - def get_volume_latest_restore_status( + def get( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + volume_quota_rule_name: str, **kwargs: Any - ) -> RestoreStatus: ... + ) -> VolumeQuotaRule: ... @distributed_trace - def list_by_vault( + def list_by_volume( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - *, - filter: Optional[str] = ..., + pool_name: str, + volume_name: str, **kwargs: Any - ) -> ItemPaged[Backup]: ... + ) -> ItemPaged[VolumeQuotaRule]: ... - class azure.mgmt.netapp.operations.BackupsUnderAccountOperations: + class azure.mgmt.netapp.operations.VolumesOperations: def __init__( self, @@ -9687,144 +8720,133 @@ namespace azure.mgmt.netapp.operations **kwargs ) -> None: ... + @distributed_trace + def begin_authorize_external_replication( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs: Any + ) -> LROPoller[SvmPeerCommandResponse]: ... + @overload - def begin_migrate_backups( + def begin_authorize_replication( self, resource_group_name: str, account_name: str, - body: BackupsMigrationRequest, + pool_name: str, + volume_name: str, + body: AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_migrate_backups( + def begin_authorize_replication( self, resource_group_name: str, account_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_migrate_backups( + def begin_authorize_replication( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... - - class azure.mgmt.netapp.operations.BackupsUnderBackupVaultOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_restore_files( + def begin_break_file_locks( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: BackupRestoreFiles, + pool_name: str, + volume_name: str, + body: Optional[BreakFileLocksRequest] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_restore_files( + def begin_break_file_locks( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: Optional[BreakFileLocksRequest] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_restore_files( + def begin_break_file_locks( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... - - class azure.mgmt.netapp.operations.BackupsUnderVolumeOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_migrate_backups( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: BackupsMigrationRequest, + body: Optional[BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_migrate_backups( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: Optional[BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_migrate_backups( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: IO[bytes], + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... - - class azure.mgmt.netapp.operations.BucketsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload def begin_create_or_update( self, @@ -9832,12 +8854,11 @@ namespace azure.mgmt.netapp.operations account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Bucket, + body: Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[Volume]: ... @overload def begin_create_or_update( @@ -9846,12 +8867,11 @@ namespace azure.mgmt.netapp.operations account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[Volume]: ... @overload def begin_create_or_update( @@ -9860,242 +8880,178 @@ namespace azure.mgmt.netapp.operations account_name: str, pool_name: str, volume_name: str, - bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[Volume]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) def begin_delete( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_generate_akv_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: BucketCredentialsExpiry, *, - content_type: str = "application/json", + force_delete: Optional[bool] = ..., **kwargs: Any ) -> LROPoller[None]: ... - @overload - def begin_generate_akv_credentials( + @distributed_trace + def begin_delete_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, - *, - content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... - @overload - def begin_generate_akv_credentials( + @distributed_trace + def begin_finalize_external_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def begin_refresh_certificate( + def begin_finalize_relocation( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: BucketPatch, + body: GetGroupIdListForLDAPUserRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - def begin_update( + def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: GetGroupIdListForLDAPUserRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - def begin_update( + def begin_list_get_group_id_list_for_ldap_user( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Bucket]: ... + ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... @overload - def generate_credentials( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: BucketCredentialsExpiry, + body: Optional[QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> BucketGenerateCredentials: ... + ) -> LROPoller[ListQuotaReportResult]: ... @overload - def generate_credentials( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: Optional[QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> BucketGenerateCredentials: ... + ) -> LROPoller[ListQuotaReportResult]: ... @overload - def generate_credentials( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: IO[bytes], + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> BucketGenerateCredentials: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'bucket_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - **kwargs: Any - ) -> Bucket: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[Bucket]: ... - - - class azure.mgmt.netapp.operations.CachesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> LROPoller[ListQuotaReportResult]: ... @overload - def begin_create_or_update( + def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: Cache, + volume_name: str, + body: PeerClusterForVolumeMigrationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[ClusterPeerCommandResponse]: ... @overload - def begin_create_or_update( + def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: JSON, + volume_name: str, + body: PeerClusterForVolumeMigrationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[ClusterPeerCommandResponse]: ... @overload - def begin_create_or_update( + def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[ClusterPeerCommandResponse]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def begin_delete( + def begin_perform_replication_transfer( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, **kwargs: Any ) -> LROPoller[None]: ... @@ -10105,12 +9061,12 @@ namespace azure.mgmt.netapp.operations resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, body: PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[None]: ... @overload def begin_pool_change( @@ -10118,12 +9074,12 @@ namespace azure.mgmt.netapp.operations resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: JSON, + volume_name: str, + body: PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[None]: ... @overload def begin_pool_change( @@ -10131,2824 +9087,1717 @@ namespace azure.mgmt.netapp.operations resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def begin_reset_smb_password( + def begin_populate_availability_zone( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[Volume]: ... - @overload - def begin_update( + @distributed_trace + def begin_re_initialize_replication( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: CacheUpdate, - *, - content_type: str = "application/json", + volume_name: str, **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: JSON, + volume_name: str, + body: ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... + ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: IO[bytes], + volume_name: str, + body: ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[Cache]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - **kwargs: Any - ) -> Cache: ... + ) -> LROPoller[None]: ... - @distributed_trace - @api_version_validation(method_added_on='2026-01-01', params_added_on={'2026-01-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( + @overload + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> ItemPaged[Cache]: ... + ) -> LROPoller[None]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'cache_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list_peering_passphrases( + @overload + def begin_relocate( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, + body: Optional[RelocateVolumeRequest] = None, + *, + content_type: str = "application/json", **kwargs: Any - ) -> PeeringPassphrases: ... - - - class azure.mgmt.netapp.operations.ElasticAccountsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> LROPoller[None]: ... @overload - def begin_create_or_update( + def begin_relocate( self, resource_group_name: str, account_name: str, - body: ElasticAccount, + pool_name: str, + volume_name: str, + body: Optional[RelocateVolumeRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... @overload - def begin_create_or_update( + def begin_relocate( self, resource_group_name: str, account_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... - @overload - def begin_create_or_update( + @distributed_trace + def begin_reset_cifs_password( self, resource_group_name: str, account_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", + pool_name: str, + volume_name: str, **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( + def begin_resync_replication( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_revert( self, resource_group_name: str, account_name: str, - body: ElasticAccountUpdate, + pool_name: str, + volume_name: str, + body: VolumeRevert, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_revert( self, resource_group_name: str, account_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: VolumeRevert, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... @overload - def begin_update( + def begin_revert( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticAccount]: ... + ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( + def begin_revert_relocation( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> ElasticAccount: ... + ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticAccount]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_subscription(self, **kwargs: Any) -> ItemPaged[ElasticAccount]: ... - - - class azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: ElasticBackupPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_policy_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( + def begin_split_clone_from_parent( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> LROPoller[None]: ... + ) -> LROPoller[Volume]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: ElasticBackupPolicyUpdate, + pool_name: str, + volume_name: str, + body: VolumePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... + ) -> LROPoller[Volume]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: VolumePatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... + ) -> LROPoller[Volume]: ... @overload def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupPolicy]: ... + ) -> LROPoller[Volume]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) def get( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> ElasticBackupPolicy: ... + ) -> Volume: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( + def list( self, resource_group_name: str, account_name: str, + pool_name: str, **kwargs: Any - ) -> ItemPaged[ElasticBackupPolicy]: ... - - - class azure.mgmt.netapp.operations.ElasticBackupVaultsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> ItemPaged[Volume]: ... @overload - def begin_create_or_update( + def list_replications( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: ElasticBackupVault, + pool_name: str, + volume_name: str, + body: Optional[ListReplicationsRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... + ) -> ItemPaged[Replication]: ... @overload - def begin_create_or_update( + def list_replications( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, + pool_name: str, + volume_name: str, + body: Optional[ListReplicationsRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... + ) -> ItemPaged[Replication]: ... @overload - def begin_create_or_update( + def list_replications( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: IO[bytes], + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... + ) -> ItemPaged[Replication]: ... @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( + def replication_status( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, **kwargs: Any - ) -> LROPoller[None]: ... + ) -> ReplicationStatus: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: ElasticBackupVaultUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... +namespace azure.mgmt.netapp.types + + class azure.mgmt.netapp.types.AccountEncryption(TypedDict, total=False): + key "identity": ForwardRef('EncryptionIdentity', module='types') + key "keySource": Union[str, KeySource] + key "keyVaultProperties": ForwardRef('KeyVaultProperties', module='types') + identity: EncryptionIdentity + key_source: Union[str, KeySource] + key_vault_properties: KeyVaultProperties + + + class azure.mgmt.netapp.types.AccountProperties(TypedDict, total=False): + key "disableShowmount": Optional[bool] + key "encryption": ForwardRef('AccountEncryption', module='types') + key "multiAdStatus": Union[str, MultiAdStatus] + key "nfsV4IDDomain": Optional[str] + key "provisioningState": str + activeDirectories: list[ActiveDirectory] + active_directories: list[ActiveDirectory] + disable_showmount: bool + encryption: AccountEncryption + multi_ad_status: Union[str, MultiAdStatus] + nfs_v4_id_domain: str + provisioning_state: str + + + class azure.mgmt.netapp.types.ActiveDirectory(TypedDict, total=False): + key "activeDirectoryId": Optional[str] + key "adName": str + key "aesEncryption": bool + key "allowLocalNfsUsersWithLdap": bool + key "dns": str + key "domain": str + key "encryptDCConnections": bool + key "kdcIP": str + key "ldapOverTLS": bool + key "ldapSearchScope": ForwardRef('LdapSearchScopeOpt', module='types') + key "ldapSigning": bool + key "organizationalUnit": str + key "password": str + key "preferredServersForLdapClient": str + key "serverRootCACertificate": str + key "site": str + key "smbServerName": str + key "status": Union[str, ActiveDirectoryStatus] + key "statusDetails": str + key "username": str + active_directory_id: str + ad_name: str + administrators: list[str] + aes_encryption: bool + allow_local_nfs_users_with_ldap: bool + backupOperators: list[str] + backup_operators: list[str] + dns: str + domain: str + encrypt_dc_connections: bool + kdc_ip: str + ldap_over_tls: bool + ldap_search_scope: LdapSearchScopeOpt + ldap_signing: bool + organizational_unit: str + password: str + preferred_servers_for_ldap_client: str + securityOperators: list[str] + security_operators: list[str] + server_root_ca_certificate: str + site: str + smb_server_name: str + status: Union[str, ActiveDirectoryStatus] + status_details: str + username: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackupVault]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - **kwargs: Any - ) -> ElasticBackupVault: ... + class azure.mgmt.netapp.types.AuthorizeRequest(TypedDict, total=False): + key "remoteVolumeResourceId": str + remote_volume_resource_id: str - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticBackupVault]: ... + class azure.mgmt.netapp.types.AzureKeyVaultDetails(TypedDict, total=False): + key "certificateAkvDetails": ForwardRef('CertificateAkvDetails', module='types') + key "credentialsAkvDetails": ForwardRef('CredentialsAkvDetails', module='types') + certificate_akv_details: CertificateAkvDetails + credentials_akv_details: CredentialsAkvDetails - class azure.mgmt.netapp.operations.ElasticBackupsOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.Backup(ProxyResource): + key "id": str + key "name": str + key "properties": Required[BackupProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: BackupProperties + system_data: SystemData + type: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: ElasticBackup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... + class azure.mgmt.netapp.types.BackupPatch(TypedDict, total=False): + key "properties": ForwardRef('BackupPatchProperties', module='types') + properties: BackupPatchProperties - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'backup_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.BackupPatchProperties(TypedDict, total=False): + key "label": str + label: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: ElasticBackup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... + class azure.mgmt.netapp.types.BackupPolicy(TrackedResource): + key "etag": str + key "id": str + key "location": Required[str] + key "name": str + key "properties": Required[BackupPolicyProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: BackupPolicyProperties + system_data: SystemData + tags: dict[str, str] + type: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticBackup]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'backup_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - **kwargs: Any - ) -> ElasticBackup: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'backup_vault_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_vault( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticBackup]: ... + class azure.mgmt.netapp.types.BackupPolicyPatch(TypedDict, total=False): + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('BackupPolicyProperties', module='types') + key "type": str + id: str + location: str + name: str + properties: BackupPolicyProperties + tags: dict[str, str] + type: str - class azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.BackupPolicyProperties(TypedDict, total=False): + key "backupPolicyId": str + key "dailyBackupsToKeep": int + key "enabled": bool + key "monthlyBackupsToKeep": int + key "provisioningState": str + key "volumesAssigned": int + key "weeklyBackupsToKeep": int + backup_policy_id: str + daily_backups_to_keep: int + enabled: bool + monthly_backups_to_keep: int + provisioning_state: str + volumeBackups: list[VolumeBackups] + volume_backups: list[VolumeBackups] + volumes_assigned: int + weekly_backups_to_keep: int + + + class azure.mgmt.netapp.types.BackupProperties(TypedDict, total=False): + key "backupId": str + key "backupPolicyResourceId": str + key "backupType": Union[str, BackupType] + key "completionDate": Optional[str] + key "creationDate": str + key "failureReason": str + key "isLargeVolume": bool + key "label": str + key "provisioningState": str + key "size": int + key "snapshotCreationDate": Optional[str] + key "snapshotName": str + key "useExistingSnapshot": bool + key "volumeResourceId": Required[str] + backup_id: str + backup_policy_resource_id: str + backup_type: Union[str, BackupType] + completion_date: str + creation_date: str + failure_reason: str + is_large_volume: bool + label: str + provisioning_state: str + size: int + snapshot_creation_date: str + snapshot_name: str + use_existing_snapshot: bool + volume_resource_id: str - @overload - def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: ChangeZoneRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... - @overload - def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.BackupRestoreFiles(TypedDict, total=False): + key "destinationVolumeId": Required[str] + key "fileList": Required[list[str]] + key "restoreFilePath": str + destination_volume_id: str + file_list: list[str] + restore_file_path: str - @overload - def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: ElasticCapacityPool, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.BackupVault(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('BackupVaultProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: BackupVaultProperties + system_data: SystemData + tags: dict[str, str] + type: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.BackupVaultPatch(TypedDict, total=False): + tags: dict[str, str] - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: ElasticCapacityPoolUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.BackupVaultProperties(TypedDict, total=False): + key "provisioningState": str + provisioning_state: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.BackupsMigrationRequest(TypedDict, total=False): + key "backupVaultId": Required[str] + backup_vault_id: str - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: CheckElasticVolumeFilePathAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... + class azure.mgmt.netapp.types.BreakFileLocksRequest(TypedDict, total=False): + key "clientIp": str + key "confirmRunningDisruptiveOperation": bool + client_ip: str + confirm_running_disruptive_operation: bool - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckElasticResourceAvailabilityResponse: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> ElasticCapacityPool: ... + class azure.mgmt.netapp.types.BreakReplicationRequest(TypedDict, total=False): + key "forceBreakReplication": bool + force_break_replication: bool - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticCapacityPool]: ... + class azure.mgmt.netapp.types.Bucket(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('BucketProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: BucketProperties + system_data: SystemData + type: str - class azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.BucketCredentialsExpiry(TypedDict, total=False): + key "keyPairExpiryDays": int + key_pair_expiry_days: int - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: ElasticSnapshotPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... + class azure.mgmt.netapp.types.BucketPatch(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('BucketPatchProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: BucketPatchProperties + system_data: SystemData + type: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.BucketPatchProperties(TypedDict, total=False): + key "akvDetails": ForwardRef('AzureKeyVaultDetails', module='types') + key "fileSystemUser": ForwardRef('FileSystemUser', module='types') + key "permissions": Union[str, BucketPatchPermissions] + key "provisioningState": Union[str, NetAppProvisioningState] + key "server": ForwardRef('BucketServerPatchProperties', module='types') + akv_details: AzureKeyVaultDetails + file_system_user: FileSystemUser + permissions: Union[str, BucketPatchPermissions] + provisioning_state: Union[str, NetAppProvisioningState] + server: BucketServerPatchProperties + + + class azure.mgmt.netapp.types.BucketProperties(TypedDict, total=False): + key "akvDetails": ForwardRef('AzureKeyVaultDetails', module='types') + key "fileSystemUser": ForwardRef('FileSystemUser', module='types') + key "path": str + key "permissions": Union[str, BucketPermissions] + key "provisioningState": Union[str, NetAppProvisioningState] + key "server": ForwardRef('BucketServerProperties', module='types') + key "status": Union[str, CredentialsStatus] + akv_details: AzureKeyVaultDetails + file_system_user: FileSystemUser + path: str + permissions: Union[str, BucketPermissions] + provisioning_state: Union[str, NetAppProvisioningState] + server: BucketServerProperties + status: Union[str, CredentialsStatus] + + + class azure.mgmt.netapp.types.BucketServerPatchProperties(TypedDict, total=False): + key "certificateObject": str + key "fqdn": str + key "onCertificateConflictAction": Union[str, OnCertificateConflictAction] + certificate_object: str + fqdn: str + on_certificate_conflict_action: Union[str, OnCertificateConflictAction] + + + class azure.mgmt.netapp.types.BucketServerProperties(TypedDict, total=False): + key "certificateCommonName": str + key "certificateExpiryDate": str + key "certificateObject": str + key "fqdn": str + key "ipAddress": str + key "onCertificateConflictAction": Union[str, OnCertificateConflictAction] + certificate_common_name: str + certificate_expiry_date: str + certificate_object: str + fqdn: str + ip_address: str + on_certificate_conflict_action: Union[str, OnCertificateConflictAction] + + + class azure.mgmt.netapp.types.Cache(TrackedResource): + key "etag": str + key "id": str + key "location": Required[str] + key "name": str + key "properties": Required[CacheProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: CacheProperties + system_data: SystemData + tags: dict[str, str] + type: str + zones: list[str] + + + class azure.mgmt.netapp.types.CacheMountTargetProperties(TypedDict, total=False): + key "ipAddress": str + key "mountTargetId": str + key "smbServerFqdn": str + ip_address: str + mount_target_id: str + smb_server_fqdn: str + + + class azure.mgmt.netapp.types.CacheProperties(TypedDict, total=False): + key "actualThroughputMibps": float + key "cacheState": Union[str, CacheLifeCycleState] + key "cacheSubnetResourceId": Required[str] + key "cifsChangeNotifications": Union[str, CifsChangeNotifyState] + key "encryption": Union[str, EncryptionState] + key "encryptionKeySource": Required[Union[str, EncryptionKeySource]] + key "exportPolicy": ForwardRef('CachePropertiesExportPolicy', module='types') + key "fileAccessLogs": Union[str, CacheFileAccessLogs] + key "filePath": Required[str] + key "globalFileLocking": Union[str, GlobalFileLockingState] + key "kerberos": Union[str, KerberosState] + key "keyVaultPrivateEndpointResourceId": str + key "language": Union[str, VolumeLanguage] + key "ldap": Union[str, LdapState] + key "ldapServerType": Union[str, LdapServerType] + key "maximumNumberOfFiles": int + key "originClusterInformation": Required[OriginClusterInformation] + key "peeringSubnetResourceId": Required[str] + key "provisioningState": Union[str, CacheProvisioningState] + key "size": Required[int] + key "smbSettings": ForwardRef('SmbSettings', module='types') + key "throughputMibps": float + key "writeBack": Union[str, EnableWriteBackState] + actual_throughput_mibps: float + cache_state: Union[str, CacheLifeCycleState] + cache_subnet_resource_id: str + cifs_change_notifications: Union[str, CifsChangeNotifyState] + encryption: Union[str, EncryptionState] + encryption_key_source: Union[str, EncryptionKeySource] + export_policy: CachePropertiesExportPolicy + file_access_logs: Union[str, CacheFileAccessLogs] + file_path: str + global_file_locking: Union[str, GlobalFileLockingState] + kerberos: Union[str, KerberosState] + key_vault_private_endpoint_resource_id: str + language: Union[str, VolumeLanguage] + ldap: Union[str, LdapState] + ldap_server_type: Union[str, LdapServerType] + maximum_number_of_files: int + mountTargets: list[CacheMountTargetProperties] + mount_targets: list[CacheMountTargetProperties] + origin_cluster_information: OriginClusterInformation + peering_subnet_resource_id: str + protocolTypes: list[Union[str, ProtocolTypes]] + protocol_types: list[Union[str, ProtocolTypes]] + provisioning_state: Union[str, CacheProvisioningState] + size: int + smb_settings: SmbSettings + throughput_mibps: float + write_back: Union[str, EnableWriteBackState] - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: ElasticSnapshotPolicyUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... + class azure.mgmt.netapp.types.CachePropertiesExportPolicy(TypedDict, total=False): + rules: list[ExportPolicyRule] - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshotPolicy]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> ElasticSnapshotPolicy: ... + class azure.mgmt.netapp.types.CacheUpdate(TypedDict, total=False): + key "properties": ForwardRef('CacheUpdateProperties', module='types') + properties: CacheUpdateProperties + tags: dict[str, str] - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticSnapshotPolicy]: ... - - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'snapshot_policy_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_elastic_volumes( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticVolume]: ... + class azure.mgmt.netapp.types.CacheUpdateProperties(TypedDict, total=False): + key "cifsChangeNotifications": Union[str, CifsChangeNotifyState] + key "exportPolicy": ForwardRef('CachePropertiesExportPolicy', module='types') + key "keyVaultPrivateEndpointResourceId": str + key "size": int + key "smbSettings": ForwardRef('SmbSettings', module='types') + key "throughputMibps": float + key "writeBack": Union[str, EnableWriteBackState] + cifs_change_notifications: Union[str, CifsChangeNotifyState] + export_policy: CachePropertiesExportPolicy + key_vault_private_endpoint_resource_id: str + protocolTypes: list[Union[str, ProtocolTypes]] + protocol_types: list[Union[str, ProtocolTypes]] + size: int + smb_settings: SmbSettings + throughput_mibps: float + write_back: Union[str, EnableWriteBackState] + + + class azure.mgmt.netapp.types.CapacityPool(TrackedResource): + key "etag": str + key "id": str + key "location": Required[str] + key "name": str + key "properties": Required[PoolProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: PoolProperties + system_data: SystemData + tags: dict[str, str] + type: str - class azure.mgmt.netapp.operations.ElasticSnapshotsOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.CapacityPoolPatch(TypedDict, total=False): + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('PoolPatchProperties', module='types') + key "type": str + id: str + location: str + name: str + properties: PoolPatchProperties + tags: dict[str, str] + type: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: ElasticSnapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshot]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshot]: ... + class azure.mgmt.netapp.types.CertificateAkvDetails(TypedDict, total=False): + key "certificateKeyVaultUri": str + key "certificateName": str + certificate_key_vault_uri: str + certificate_name: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticSnapshot]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'snapshot_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.ChangeKeyVault(TypedDict, total=False): + key "keyName": Required[str] + key "keyVaultPrivateEndpoints": Required[list[KeyVaultPrivateEndpoint]] + key "keyVaultResourceId": str + key "keyVaultUri": Required[str] + key_name: str + key_vault_private_endpoints: list[KeyVaultPrivateEndpoint] + key_vault_resource_id: str + key_vault_uri: str - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'snapshot_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> ElasticSnapshot: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_volume( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticSnapshot]: ... + class azure.mgmt.netapp.types.CifsUser(TypedDict, total=False): + key "username": str + username: str - class azure.mgmt.netapp.operations.ElasticVolumesOperations: + class azure.mgmt.netapp.types.CredentialsAkvDetails(TypedDict, total=False): + key "credentialsKeyVaultUri": str + key "secretName": str + credentials_key_vault_uri: str + secret_name: str - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ElasticVolume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... + class azure.mgmt.netapp.types.DailySchedule(TypedDict, total=False): + key "hour": int + key "minute": int + key "snapshotsToKeep": int + key "usedBytes": int + hour: int + minute: int + snapshots_to_keep: int + used_bytes: int + + + class azure.mgmt.netapp.types.DestinationReplication(TypedDict, total=False): + key "region": str + key "replicationType": Union[str, ReplicationType] + key "resourceId": str + key "zone": str + region: str + replication_type: Union[str, ReplicationType] + resource_id: str + zone: str + + + class azure.mgmt.netapp.types.EncryptionIdentity(TypedDict, total=False): + key "federatedClientId": str + key "principalId": str + key "userAssignedIdentity": str + federated_client_id: str + principal_id: str + user_assigned_identity: str + + + class azure.mgmt.netapp.types.EncryptionTransitionRequest(TypedDict, total=False): + key "privateEndpointId": Required[str] + key "virtualNetworkId": Required[str] + private_endpoint_id: str + virtual_network_id: str - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... + class azure.mgmt.netapp.types.ExportPolicyRule(TypedDict, total=False): + key "allowedClients": str + key "chownMode": Union[str, ChownMode] + key "cifs": bool + key "hasRootAccess": bool + key "kerberos5ReadOnly": bool + key "kerberos5ReadWrite": bool + key "kerberos5iReadOnly": bool + key "kerberos5iReadWrite": bool + key "kerberos5pReadOnly": bool + key "kerberos5pReadWrite": bool + key "nfsv3": bool + key "nfsv41": bool + key "ruleIndex": int + key "unixReadOnly": bool + key "unixReadWrite": bool + allowed_clients: str + chown_mode: Union[str, ChownMode] + cifs: bool + has_root_access: bool + kerberos5_i_read_only: bool + kerberos5_i_read_write: bool + kerberos5_p_read_only: bool + kerberos5_p_read_write: bool + kerberos5_read_only: bool + kerberos5_read_write: bool + nfsv3: bool + nfsv41: bool + rule_index: int + unix_read_only: bool + unix_read_write: bool + + + class azure.mgmt.netapp.types.FilePathAvailabilityRequest(TypedDict, total=False): + key "availabilityZone": Optional[str] + key "name": Required[str] + key "subnetId": Required[str] + availability_zone: str + name: str + subnet_id: str - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ElasticVolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... + class azure.mgmt.netapp.types.FileSystemUser(TypedDict, total=False): + key "cifsUser": ForwardRef('CifsUser', module='types') + key "nfsUser": ForwardRef('NfsUser', module='types') + cifs_user: CifsUser + nfs_user: NfsUser - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... + class azure.mgmt.netapp.types.GetGroupIdListForLDAPUserRequest(TypedDict, total=False): + key "username": Required[str] + username: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ElasticVolumeUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... + class azure.mgmt.netapp.types.HourlySchedule(TypedDict, total=False): + key "minute": int + key "snapshotsToKeep": int + key "usedBytes": int + minute: int + snapshots_to_keep: int + used_bytes: int - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ElasticVolume]: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ElasticVolume: ... + class azure.mgmt.netapp.types.KeyVaultPrivateEndpoint(TypedDict, total=False): + key "privateEndpointId": str + key "virtualNetworkId": str + private_endpoint_id: str + virtual_network_id: str - @distributed_trace - @api_version_validation(method_added_on='2025-12-15-preview', params_added_on={'2025-12-15-preview': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'accept']}, api_versions_list=['2025-12-15-preview', '2026-01-15-preview', '2026-03-15-preview', '2026-04-15-preview']) - def list_by_elastic_pool( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> ItemPaged[ElasticVolume]: ... + class azure.mgmt.netapp.types.KeyVaultProperties(TypedDict, total=False): + key "keyName": Required[str] + key "keyVaultId": str + key "keyVaultResourceId": str + key "keyVaultUri": Required[str] + key "status": Union[str, KeyVaultStatus] + key_name: str + key_vault_id: str + key_vault_resource_id: str + key_vault_uri: str + status: Union[str, KeyVaultStatus] - class azure.mgmt.netapp.operations.NetAppResourceOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.LdapSearchScopeOpt(TypedDict, total=False): + key "groupDN": str + key "groupMembershipFilter": str + key "userDN": str + group_dn: str + group_membership_filter: str + user_dn: str - @overload - def begin_update_network_sibling_set( - self, - location: str, - body: UpdateNetworkSiblingSetRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[NetworkSiblingSet]: ... - @overload - def begin_update_network_sibling_set( - self, - location: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[NetworkSiblingSet]: ... + class azure.mgmt.netapp.types.ListReplicationsRequest(TypedDict, total=False): + key "exclude": Union[str, Exclude] + exclude: Union[str, Exclude] - @overload - def begin_update_network_sibling_set( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[NetworkSiblingSet]: ... - @overload - def check_file_path_availability( - self, - location: str, - body: FilePathAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + class azure.mgmt.netapp.types.ManagedServiceIdentity(TypedDict, total=False): + key "principalId": str + key "tenantId": str + key "type": Required[Union[str, ManagedServiceIdentityType]] + principal_id: str + tenant_id: str + type: Union[str, ManagedServiceIdentityType] + userAssignedIdentities: dict[str, UserAssignedIdentity] + user_assigned_identities: dict[str, UserAssignedIdentity] + + + class azure.mgmt.netapp.types.MonthlySchedule(TypedDict, total=False): + key "daysOfMonth": str + key "hour": int + key "minute": int + key "snapshotsToKeep": int + key "usedBytes": int + days_of_month: str + hour: int + minute: int + snapshots_to_keep: int + used_bytes: int + + + class azure.mgmt.netapp.types.MountTargetProperties(TypedDict, total=False): + key "fileSystemId": Required[str] + key "ipAddress": str + key "mountTargetId": str + key "smbServerFqdn": str + file_system_id: str + ip_address: str + mount_target_id: str + smb_server_fqdn: str + + + class azure.mgmt.netapp.types.NetAppAccount(TrackedResource): + key "etag": str + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "location": Required[str] + key "name": str + key "properties": ForwardRef('AccountProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + identity: ManagedServiceIdentity + location: str + name: str + properties: AccountProperties + system_data: SystemData + tags: dict[str, str] + type: str - @overload - def check_file_path_availability( - self, - location: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... - @overload - def check_file_path_availability( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + class azure.mgmt.netapp.types.NetAppAccountPatch(TypedDict, total=False): + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "location": str + key "name": str + key "properties": ForwardRef('AccountProperties', module='types') + key "type": str + id: str + identity: ManagedServiceIdentity + location: str + name: str + properties: AccountProperties + tags: dict[str, str] + type: str - @overload - def check_name_availability( - self, - location: str, - body: ResourceNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... - @overload - def check_name_availability( - self, - location: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + class azure.mgmt.netapp.types.NfsUser(TypedDict, total=False): + key "groupId": int + key "userId": int + group_id: int + user_id: int - @overload - def check_name_availability( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... - @overload - def check_quota_availability( - self, - location: str, - body: QuotaAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + class azure.mgmt.netapp.types.OriginClusterInformation(TypedDict, total=False): + key "peerAddresses": Required[list[str]] + key "peerClusterName": Required[str] + key "peerVolumeName": Required[str] + key "peerVserverName": Required[str] + peer_addresses: list[str] + peer_cluster_name: str + peer_volume_name: str + peer_vserver_name: str - @overload - def check_quota_availability( - self, - location: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... - @overload - def check_quota_availability( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> CheckAvailabilityResponse: ... + class azure.mgmt.netapp.types.PeerClusterForVolumeMigrationRequest(TypedDict, total=False): + key "peerIpAddresses": Required[list[str]] + peer_ip_addresses: list[str] - @overload - def query_network_sibling_set( - self, - location: str, - body: QueryNetworkSiblingSetRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> NetworkSiblingSet: ... - @overload - def query_network_sibling_set( - self, - location: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> NetworkSiblingSet: ... + class azure.mgmt.netapp.types.PlacementKeyValuePairs(TypedDict, total=False): + key "key": Required[str] + key "value": Required[str] + key: str + value: str - @overload - def query_network_sibling_set( - self, - location: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> NetworkSiblingSet: ... - @distributed_trace - def query_region_info( - self, - location: str, - **kwargs: Any - ) -> RegionInfo: ... + class azure.mgmt.netapp.types.PoolChangeRequest(TypedDict, total=False): + key "newPoolResourceId": Required[str] + new_pool_resource_id: str - class azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsAccountOperations: + class azure.mgmt.netapp.types.PoolPatchProperties(TypedDict, total=False): + key "coolAccess": bool + key "customThroughputMibps": Optional[int] + key "qosType": Union[str, QosType] + key "size": int + cool_access: bool + custom_throughput_mibps: int + qos_type: Union[str, QosType] + size: int - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @distributed_trace - @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'quota_limit_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - quota_limit_name: str, - **kwargs: Any - ) -> QuotaItem: ... + class azure.mgmt.netapp.types.PoolProperties(TypedDict, total=False): + key "coolAccess": bool + key "customThroughputMibps": Optional[int] + key "encryptionType": Optional[Union[str, EncryptionType]] + key "poolId": str + key "provisioningState": str + key "qosType": Union[str, QosType] + key "serviceLevel": Required[Union[str, ServiceLevel]] + key "size": Required[int] + key "totalThroughputMibps": float + key "utilizedThroughputMibps": float + cool_access: bool + custom_throughput_mibps: int + encryption_type: Union[str, EncryptionType] + pool_id: str + provisioning_state: str + qos_type: Union[str, QosType] + service_level: Union[str, ServiceLevel] + size: int + total_throughput_mibps: float + utilized_throughput_mibps: float - @distributed_trace - @api_version_validation(method_added_on='2025-08-01', params_added_on={'2025-08-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'accept']}, api_versions_list=['2025-08-01', '2025-09-01', '2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[QuotaItem]: ... + class azure.mgmt.netapp.types.ProxyResource(Resource): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str - class azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.QueryNetworkSiblingSetRequest(TypedDict, total=False): + key "networkSiblingSetId": Required[str] + key "subnetId": Required[str] + network_sibling_set_id: str + subnet_id: str - @distributed_trace - def get( - self, - location: str, - quota_limit_name: str, - **kwargs: Any - ) -> QuotaItem: ... - @distributed_trace - def list( - self, - location: str, - **kwargs: Any - ) -> ItemPaged[QuotaItem]: ... + class azure.mgmt.netapp.types.QuotaAvailabilityRequest(TypedDict, total=False): + key "name": Required[str] + key "resourceGroup": Required[str] + key "type": Required[Union[str, CheckQuotaNameResourceTypes]] + name: str + resource_group: str + type: Union[str, CheckQuotaNameResourceTypes] - class azure.mgmt.netapp.operations.NetAppResourceRegionInfosOperations: + class azure.mgmt.netapp.types.QuotaReportFilterRequest(TypedDict, total=False): + key "quotaTarget": str + key "quotaType": Union[str, QuotaType] + key "usageThresholdPercentage": int + quota_target: str + quota_type: Union[str, QuotaType] + usage_threshold_percentage: int - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @distributed_trace - def get( - self, - location: str, - **kwargs: Any - ) -> RegionInfoResource: ... + class azure.mgmt.netapp.types.RansomwareProtectionPatchSettings(TypedDict, total=False): + key "desiredRansomwareProtectionState": Union[str, DesiredRansomwareProtectionState] + desired_ransomware_protection_state: Union[str, DesiredRansomwareProtectionState] - @distributed_trace - def list( - self, - location: str, - **kwargs: Any - ) -> ItemPaged[RegionInfoResource]: ... + class azure.mgmt.netapp.types.RansomwareProtectionSettings(TypedDict, total=False): + key "actualRansomwareProtectionState": Union[str, ActualRansomwareProtectionState] + key "desiredRansomwareProtectionState": Union[str, DesiredRansomwareProtectionState] + actual_ransomware_protection_state: Union[str, ActualRansomwareProtectionState] + desired_ransomware_protection_state: Union[str, DesiredRansomwareProtectionState] - class azure.mgmt.netapp.operations.NetAppResourceUsagesOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.RansomwareSuspectsClearRequest(TypedDict, total=False): + key "extensions": Required[list[str]] + key "resolution": Required[Union[str, RansomwareSuspectResolution]] + extensions: list[str] + resolution: Union[str, RansomwareSuspectResolution] - @distributed_trace - def get( - self, - location: str, - usage_type: str, - **kwargs: Any - ) -> UsageResult: ... - @distributed_trace - def list( - self, - location: str, - **kwargs: Any - ) -> ItemPaged[UsageResult]: ... + class azure.mgmt.netapp.types.ReestablishReplicationRequest(TypedDict, total=False): + key "sourceVolumeId": str + source_volume_id: str - class azure.mgmt.netapp.operations.Operations: + class azure.mgmt.netapp.types.RelocateVolumeRequest(TypedDict, total=False): + key "creationToken": str + creation_token: str - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged[Operation]: ... + class azure.mgmt.netapp.types.RemotePath(TypedDict, total=False): + key "externalHostName": Required[str] + key "serverName": Required[str] + key "volumeName": Required[str] + external_host_name: str + server_name: str + volume_name: str - class azure.mgmt.netapp.operations.PoolsOperations: + class azure.mgmt.netapp.types.ReplicationObject(TypedDict, total=False): + key "endpointType": Union[str, EndpointType] + key "externalReplicationSetupInfo": str + key "externalReplicationSetupStatus": Union[str, ExternalReplicationSetupStatus] + key "mirrorState": Union[str, MirrorState] + key "relationshipStatus": Union[str, VolumeReplicationRelationshipStatus] + key "remotePath": ForwardRef('RemotePath', module='types') + key "remoteVolumeRegion": str + key "remoteVolumeResourceId": str + key "replicationId": str + key "replicationSchedule": Union[str, ReplicationSchedule] + destinationReplications: list[DestinationReplication] + destination_replications: list[DestinationReplication] + endpoint_type: Union[str, EndpointType] + external_replication_setup_info: str + external_replication_setup_status: Union[str, ExternalReplicationSetupStatus] + mirror_state: Union[str, MirrorState] + relationship_status: Union[str, VolumeReplicationRelationshipStatus] + remote_path: RemotePath + remote_volume_region: str + remote_volume_resource_id: str + replication_id: str + replication_schedule: Union[str, ReplicationSchedule] + + + class azure.mgmt.netapp.types.Resource(TypedDict, total=False): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: CapacityPool, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... + class azure.mgmt.netapp.types.ResourceNameAvailabilityRequest(TypedDict, total=False): + key "name": Required[str] + key "resourceGroup": Required[str] + key "type": Required[Union[str, CheckNameResourceTypes]] + name: str + resource_group: str + type: Union[str, CheckNameResourceTypes] - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... + class azure.mgmt.netapp.types.SmbSettings(TypedDict, total=False): + key "smbAccessBasedEnumeration": Union[str, SmbAccessBasedEnumeration] + key "smbEncryption": Union[str, SmbEncryptionState] + key "smbNonBrowsable": Union[str, SmbNonBrowsable] + smb_access_based_enumeration: Union[str, SmbAccessBasedEnumeration] + smb_encryption: Union[str, SmbEncryptionState] + smb_non_browsable: Union[str, SmbNonBrowsable] - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: CapacityPoolPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... + class azure.mgmt.netapp.types.Snapshot(ProxyResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('SnapshotProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: SnapshotProperties + system_data: SystemData + type: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[CapacityPool]: ... + class azure.mgmt.netapp.types.SnapshotPatch(TypedDict, total=False): - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> CapacityPool: ... - @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[CapacityPool]: ... + class azure.mgmt.netapp.types.SnapshotPolicy(TrackedResource): + key "etag": str + key "id": str + key "location": Required[str] + key "name": str + key "properties": Required[SnapshotPolicyProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: SnapshotPolicyProperties + system_data: SystemData + tags: dict[str, str] + type: str - class azure.mgmt.netapp.operations.RansomwareReportsOperations: + class azure.mgmt.netapp.types.SnapshotPolicyPatch(TypedDict, total=False): + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('SnapshotPolicyProperties', module='types') + key "type": str + id: str + location: str + name: str + properties: SnapshotPolicyProperties + tags: dict[str, str] + type: str - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_clear_suspects( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - ransomware_report_name: str, - body: RansomwareSuspectsClearRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.SnapshotPolicyProperties(TypedDict, total=False): + key "dailySchedule": ForwardRef('DailySchedule', module='types') + key "enabled": bool + key "hourlySchedule": ForwardRef('HourlySchedule', module='types') + key "monthlySchedule": ForwardRef('MonthlySchedule', module='types') + key "provisioningState": str + key "weeklySchedule": ForwardRef('WeeklySchedule', module='types') + daily_schedule: DailySchedule + enabled: bool + hourly_schedule: HourlySchedule + monthly_schedule: MonthlySchedule + provisioning_state: str + weekly_schedule: WeeklySchedule + + + class azure.mgmt.netapp.types.SnapshotProperties(TypedDict, total=False): + key "created": str + key "provisioningState": str + key "snapshotId": str + created: str + provisioning_state: str + snapshot_id: str + + + class azure.mgmt.netapp.types.SnapshotRestoreFiles(TypedDict, total=False): + key "destinationPath": str + key "filePaths": Required[list[str]] + destination_path: str + file_paths: list[str] - @overload - def begin_clear_suspects( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - ransomware_report_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_clear_suspects( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - ransomware_report_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.SubvolumeInfo(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('SubvolumeProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: SubvolumeProperties + system_data: SystemData + type: str - @distributed_trace - @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'ransomware_report_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - ransomware_report_name: str, - **kwargs: Any - ) -> RansomwareReport: ... - @distributed_trace - @api_version_validation(method_added_on='2025-12-01', params_added_on={'2025-12-01': ['api_version', 'subscription_id', 'resource_group_name', 'account_name', 'pool_name', 'volume_name', 'accept']}, api_versions_list=['2025-12-01', '2025-12-15-preview', '2026-01-01', '2026-01-15-preview', '2026-03-01', '2026-03-15-preview', '2026-04-01', '2026-04-15-preview']) - def list( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[RansomwareReport]: ... + class azure.mgmt.netapp.types.SubvolumePatchParams(TypedDict, total=False): + key "path": str + key "size": Optional[int] + path: str + size: int - class azure.mgmt.netapp.operations.SnapshotPoliciesOperations: + class azure.mgmt.netapp.types.SubvolumePatchRequest(TypedDict, total=False): + key "properties": ForwardRef('SubvolumePatchParams', module='types') + properties: SubvolumePatchParams - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.SubvolumeProperties(TypedDict, total=False): + key "parentPath": Optional[str] + key "path": str + key "provisioningState": str + key "size": Optional[int] + parent_path: str + path: str + provisioning_state: str + size: int - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: SnapshotPolicyPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SnapshotPolicy]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SnapshotPolicy]: ... + class azure.mgmt.netapp.types.SystemData(TypedDict, total=False): + key "createdAt": str + key "createdBy": str + key "createdByType": Union[str, CreatedByType] + key "lastModifiedAt": str + key "lastModifiedBy": str + key "lastModifiedByType": Union[str, CreatedByType] + created_at: str + created_by: str + created_by_type: Union[str, CreatedByType] + last_modified_at: str + last_modified_by: str + last_modified_by_type: Union[str, CreatedByType] + + + class azure.mgmt.netapp.types.TrackedResource(Resource): + key "id": str + key "location": Required[str] + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + system_data: SystemData + tags: dict[str, str] + type: str - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SnapshotPolicy]: ... - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: SnapshotPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> SnapshotPolicy: ... + class azure.mgmt.netapp.types.UpdateNetworkSiblingSetRequest(TypedDict, total=False): + key "networkFeatures": Required[Union[str, NetworkFeatures]] + key "networkSiblingSetId": Required[str] + key "networkSiblingSetStateId": Required[str] + key "subnetId": Required[str] + network_features: Union[str, NetworkFeatures] + network_sibling_set_id: str + network_sibling_set_state_id: str + subnet_id: str - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> SnapshotPolicy: ... - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> SnapshotPolicy: ... + class azure.mgmt.netapp.types.UserAssignedIdentity(TypedDict, total=False): + key "clientId": str + key "principalId": str + client_id: str + principal_id: str - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> SnapshotPolicy: ... - @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[SnapshotPolicy]: ... + class azure.mgmt.netapp.types.Volume(TrackedResource): + key "etag": str + key "id": str + key "location": Required[str] + key "name": str + key "properties": Required[VolumeProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + etag: str + id: str + location: str + name: str + properties: VolumeProperties + system_data: SystemData + tags: dict[str, str] + type: str + zones: list[str] - @distributed_trace - def list_volumes( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - **kwargs: Any - ) -> SnapshotPolicyVolumeList: ... + class azure.mgmt.netapp.types.VolumeBackupProperties(TypedDict, total=False): + key "backupPolicyId": str + key "backupVaultId": str + key "policyEnforced": bool + backup_policy_id: str + backup_vault_id: str + policy_enforced: bool - class azure.mgmt.netapp.operations.SnapshotsOperations: - def __init__( - self, - *args, - **kwargs - ) -> None: ... + class azure.mgmt.netapp.types.VolumeBackups(TypedDict, total=False): + key "backupsCount": int + key "policyEnabled": bool + key "volumeName": str + key "volumeResourceId": str + backups_count: int + policy_enabled: bool + volume_name: str + volume_resource_id: str - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Snapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... + class azure.mgmt.netapp.types.VolumeGroupDetails(ProxyResource): + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('VolumeGroupProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: VolumeGroupProperties + system_data: SystemData + type: str - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.VolumeGroupMetaData(TypedDict, total=False): + key "applicationIdentifier": str + key "applicationType": Union[str, ApplicationType] + key "groupDescription": str + key "volumesCount": int + application_identifier: str + application_type: Union[str, ApplicationType] + globalPlacementRules: list[PlacementKeyValuePairs] + global_placement_rules: list[PlacementKeyValuePairs] + group_description: str + volumes_count: int + + + class azure.mgmt.netapp.types.VolumeGroupProperties(TypedDict, total=False): + key "groupMetaData": ForwardRef('VolumeGroupMetaData', module='types') + key "provisioningState": str + group_meta_data: VolumeGroupMetaData + provisioning_state: str + volumes: list[VolumeGroupVolumeProperties] + + + class azure.mgmt.netapp.types.VolumeGroupVolumeProperties(TypedDict, total=False): + key "id": str + key "name": str + key "properties": Required[VolumeProperties] + key "type": str + id: str + name: str + properties: VolumeProperties + tags: dict[str, str] + type: str + zones: list[str] - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: SnapshotRestoreFiles, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... + class azure.mgmt.netapp.types.VolumePatch(TypedDict, total=False): + key "id": str + key "location": str + key "name": str + key "properties": ForwardRef('VolumePatchProperties', module='types') + key "type": str + id: str + location: str + name: str + properties: VolumePatchProperties + tags: dict[str, str] + type: str - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: SnapshotPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... + class azure.mgmt.netapp.types.VolumePatchProperties(TypedDict, total=False): + key "coolAccess": bool + key "coolAccessRetrievalPolicy": Union[str, CoolAccessRetrievalPolicy] + key "coolAccessTieringPolicy": Union[str, CoolAccessTieringPolicy] + key "coolnessPeriod": int + key "dataProtection": ForwardRef('VolumePatchPropertiesDataProtection', module='types') + key "defaultGroupQuotaInKiBs": int + key "defaultUserQuotaInKiBs": int + key "exportPolicy": ForwardRef('VolumePatchPropertiesExportPolicy', module='types') + key "isDefaultQuotaEnabled": bool + key "serviceLevel": Union[str, ServiceLevel] + key "smbAccessBasedEnumeration": Optional[Union[str, SmbAccessBasedEnumeration]] + key "smbNonBrowsable": Union[str, SmbNonBrowsable] + key "snapshotDirectoryVisible": bool + key "throughputMibps": float + key "unixPermissions": Optional[str] + key "usageThreshold": int + cool_access: bool + cool_access_retrieval_policy: Union[str, CoolAccessRetrievalPolicy] + cool_access_tiering_policy: Union[str, CoolAccessTieringPolicy] + coolness_period: int + data_protection: VolumePatchPropertiesDataProtection + default_group_quota_in_ki_bs: int + default_user_quota_in_ki_bs: int + export_policy: VolumePatchPropertiesExportPolicy + is_default_quota_enabled: bool + protocolTypes: list[str] + protocol_types: list[str] + service_level: Union[str, ServiceLevel] + smb_access_based_enumeration: Union[str, SmbAccessBasedEnumeration] + smb_non_browsable: Union[str, SmbNonBrowsable] + snapshot_directory_visible: bool + throughput_mibps: float + unix_permissions: str + usage_threshold: int - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Snapshot]: ... + class azure.mgmt.netapp.types.VolumePatchPropertiesDataProtection(TypedDict, total=False): + key "backup": ForwardRef('VolumeBackupProperties', module='types') + key "ransomwareProtection": ForwardRef('RansomwareProtectionPatchSettings', module='types') + key "snapshot": ForwardRef('VolumeSnapshotProperties', module='types') + backup: VolumeBackupProperties + ransomware_protection: RansomwareProtectionPatchSettings + snapshot: VolumeSnapshotProperties + + + class azure.mgmt.netapp.types.VolumePatchPropertiesExportPolicy(TypedDict, total=False): + rules: list[ExportPolicyRule] + + + class azure.mgmt.netapp.types.VolumeProperties(TypedDict, total=False): + key "acceptGrowCapacityPoolForShortTermCloneSplit": Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit] + key "actualThroughputMibps": float + key "avsDataStore": Union[str, AvsDataStore] + key "backupId": Optional[str] + key "baremetalTenantId": str + key "breakthroughMode": Union[str, BreakthroughMode] + key "breakthroughModeOld": Union[str, BreakthroughMode] + key "capacityPoolResourceId": str + key "cloneProgress": Optional[int] + key "coolAccess": bool + key "coolAccessRetrievalPolicy": Union[str, CoolAccessRetrievalPolicy] + key "coolAccessTieringPolicy": Union[str, CoolAccessTieringPolicy] + key "coolnessPeriod": int + key "creationToken": Required[str] + key "dataProtection": ForwardRef('VolumePropertiesDataProtection', module='types') + key "defaultGroupQuotaInKiBs": int + key "defaultUserQuotaInKiBs": int + key "deleteBaseSnapshot": bool + key "effectiveNetworkFeatures": Union[str, NetworkFeatures] + key "enableSubvolumes": Union[str, EnableSubvolumes] + key "encrypted": bool + key "encryptionKeySource": Union[str, EncryptionKeySource] + key "exportPolicy": ForwardRef('VolumePropertiesExportPolicy', module='types') + key "fileAccessLogs": Union[str, FileAccessLogs] + key "fileSystemId": str + key "inheritedSizeInBytes": Optional[int] + key "isDefaultQuotaEnabled": bool + key "isLargeVolume": bool + key "isRestoring": bool + key "kerberosEnabled": bool + key "keyVaultPrivateEndpointResourceId": str + key "ldapEnabled": bool + key "maximumNumberOfFiles": int + key "networkFeatures": Union[str, NetworkFeatures] + key "networkSiblingSetId": str + key "originatingResourceId": Optional[str] + key "provisionedAvailabilityZone": Optional[str] + key "provisioningState": str + key "proximityPlacementGroup": str + key "securityStyle": Union[str, SecurityStyle] + key "serviceLevel": Union[str, ServiceLevel] + key "smbAccessBasedEnumeration": Optional[Union[str, SmbAccessBasedEnumeration]] + key "smbContinuouslyAvailable": bool + key "smbEncryption": bool + key "smbNonBrowsable": Union[str, SmbNonBrowsable] + key "snapshotDirectoryVisible": bool + key "snapshotId": Optional[str] + key "storageToNetworkProximity": Union[str, VolumeStorageToNetworkProximity] + key "subnetId": Required[str] + key "t2Network": str + key "throughputMibps": Optional[float] + key "unixPermissions": Optional[str] + key "usageThreshold": Required[int] + key "volumeGroupName": str + key "volumeSpecName": str + key "volumeType": str + accept_grow_capacity_pool_for_short_term_clone_split: Union[str, AcceptGrowCapacityPoolForShortTermCloneSplit] + actual_throughput_mibps: float + avs_data_store: Union[str, AvsDataStore] + backup_id: str + baremetal_tenant_id: str + breakthrough_mode: Union[str, BreakthroughMode] + breakthrough_mode_old: Union[str, BreakthroughMode] + capacity_pool_resource_id: str + clone_progress: int + cool_access: bool + cool_access_retrieval_policy: Union[str, CoolAccessRetrievalPolicy] + cool_access_tiering_policy: Union[str, CoolAccessTieringPolicy] + coolness_period: int + creation_token: str + dataStoreResourceId: list[str] + data_protection: VolumePropertiesDataProtection + data_store_resource_id: list[str] + default_group_quota_in_ki_bs: int + default_user_quota_in_ki_bs: int + delete_base_snapshot: bool + effective_network_features: Union[str, NetworkFeatures] + enable_subvolumes: Union[str, EnableSubvolumes] + encrypted: bool + encryption_key_source: Union[str, EncryptionKeySource] + export_policy: VolumePropertiesExportPolicy + file_access_logs: Union[str, FileAccessLogs] + file_system_id: str + inherited_size_in_bytes: int + is_default_quota_enabled: bool + is_large_volume: bool + is_restoring: bool + kerberos_enabled: bool + key_vault_private_endpoint_resource_id: str + ldap_enabled: bool + maximum_number_of_files: int + mountTargets: list[MountTargetProperties] + mount_targets: list[MountTargetProperties] + network_features: Union[str, NetworkFeatures] + network_sibling_set_id: str + originating_resource_id: str + placementRules: list[PlacementKeyValuePairs] + placement_rules: list[PlacementKeyValuePairs] + protocolTypes: list[str] + protocol_types: list[str] + provisioned_availability_zone: str + provisioning_state: str + proximity_placement_group: str + security_style: Union[str, SecurityStyle] + service_level: Union[str, ServiceLevel] + smb_access_based_enumeration: Union[str, SmbAccessBasedEnumeration] + smb_continuously_available: bool + smb_encryption: bool + smb_non_browsable: Union[str, SmbNonBrowsable] + snapshot_directory_visible: bool + snapshot_id: str + storage_to_network_proximity: Union[str, VolumeStorageToNetworkProximity] + subnet_id: str + t2_network: str + throughput_mibps: float + unix_permissions: str + usage_threshold: int + volume_group_name: str + volume_spec_name: str + volume_type: str + + + class azure.mgmt.netapp.types.VolumePropertiesDataProtection(TypedDict, total=False): + key "backup": ForwardRef('VolumeBackupProperties', module='types') + key "ransomwareProtection": ForwardRef('RansomwareProtectionSettings', module='types') + key "replication": ForwardRef('ReplicationObject', module='types') + key "snapshot": ForwardRef('VolumeSnapshotProperties', module='types') + key "volumeRelocation": ForwardRef('VolumeRelocationProperties', module='types') + backup: VolumeBackupProperties + ransomware_protection: RansomwareProtectionSettings + replication: ReplicationObject + snapshot: VolumeSnapshotProperties + volume_relocation: VolumeRelocationProperties + + + class azure.mgmt.netapp.types.VolumePropertiesExportPolicy(TypedDict, total=False): + rules: list[ExportPolicyRule] + + + class azure.mgmt.netapp.types.VolumeQuotaRule(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('VolumeQuotaRulesProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: VolumeQuotaRulesProperties + system_data: SystemData + tags: dict[str, str] + type: str - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> Snapshot: ... - @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[Snapshot]: ... + class azure.mgmt.netapp.types.VolumeQuotaRulePatch(TypedDict, total=False): + key "properties": ForwardRef('VolumeQuotaRulesProperties', module='types') + properties: VolumeQuotaRulesProperties + tags: dict[str, str] - class azure.mgmt.netapp.operations.SubvolumesOperations: + class azure.mgmt.netapp.types.VolumeQuotaRulesProperties(TypedDict, total=False): + key "provisioningState": Union[str, NetAppProvisioningState] + key "quotaSizeInKiBs": int + key "quotaTarget": str + key "quotaType": Union[str, QuotaType] + provisioning_state: Union[str, NetAppProvisioningState] + quota_size_in_ki_bs: int + quota_target: str + quota_type: Union[str, QuotaType] - def __init__( - self, - *args, - **kwargs - ) -> None: ... - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: SubvolumeInfo, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... + class azure.mgmt.netapp.types.VolumeRelocationProperties(TypedDict, total=False): + key "readyToBeFinalized": bool + key "relocationRequested": bool + ready_to_be_finalized: bool + relocation_requested: bool - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... + class azure.mgmt.netapp.types.VolumeRevert(TypedDict, total=False): + key "snapshotId": str + snapshot_id: str - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_get_metadata( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - **kwargs: Any - ) -> LROPoller[SubvolumeModel]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: SubvolumePatchRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[SubvolumeInfo]: ... - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - **kwargs: Any - ) -> SubvolumeInfo: ... - - @distributed_trace - def list_by_volume( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[SubvolumeInfo]: ... - - - class azure.mgmt.netapp.operations.VolumeGroupsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: VolumeGroupDetails, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeGroupDetails]: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeGroupDetails]: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeGroupDetails]: ... - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - **kwargs: Any - ) -> VolumeGroupDetails: ... - - @distributed_trace - def list_by_net_app_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> ItemPaged[VolumeGroup]: ... - - - class azure.mgmt.netapp.operations.VolumeQuotaRulesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: VolumeQuotaRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: VolumeQuotaRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[VolumeQuotaRule]: ... - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - **kwargs: Any - ) -> VolumeQuotaRule: ... - - @distributed_trace - def list_by_volume( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ItemPaged[VolumeQuotaRule]: ... - - - class azure.mgmt.netapp.operations.VolumesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @distributed_trace - def begin_authorize_external_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[SvmPeerCommandResponse]: ... - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: AuthorizeRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[BreakFileLocksRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[BreakReplicationRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Volume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - *, - force_delete: Optional[bool] = ..., - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_delete_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_finalize_external_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_finalize_relocation( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_list_get_group_id_list_for_ldap_user( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: GetGroupIdListForLDAPUserRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... - - @overload - def begin_list_get_group_id_list_for_ldap_user( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... - - @overload - def begin_list_get_group_id_list_for_ldap_user( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[GetGroupIdListForLDAPUserResponse]: ... - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[QuotaReportFilterRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ListQuotaReportResult]: ... - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ListQuotaReportResult]: ... - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ListQuotaReportResult]: ... - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: PeerClusterForVolumeMigrationRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ClusterPeerCommandResponse]: ... - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ClusterPeerCommandResponse]: ... - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[ClusterPeerCommandResponse]: ... - - @distributed_trace - def begin_perform_replication_transfer( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: PoolChangeRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_populate_availability_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @distributed_trace - def begin_re_initialize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: ReestablishReplicationRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[RelocateVolumeRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_reset_cifs_password( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_resync_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: VolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_revert_relocation( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_split_clone_from_parent( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: VolumePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[Volume]: ... - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> Volume: ... - - @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - **kwargs: Any - ) -> ItemPaged[Volume]: ... - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[ListReplicationsRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged[Replication]: ... - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged[Replication]: ... + class azure.mgmt.netapp.types.VolumeSnapshotProperties(TypedDict, total=False): + key "snapshotPolicyId": str + snapshot_policy_id: str - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged[Replication]: ... - @distributed_trace - def replication_status( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - **kwargs: Any - ) -> ReplicationStatus: ... + class azure.mgmt.netapp.types.WeeklySchedule(TypedDict, total=False): + key "day": str + key "hour": int + key "minute": int + key "snapshotsToKeep": int + key "usedBytes": int + day: str + hour: int + minute: int + snapshots_to_keep: int + used_bytes: int ``` \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/api.metadata.yml b/sdk/netapp/azure-mgmt-netapp/api.metadata.yml index f3dfc5ed7fbe..fdaec39ffc84 100644 --- a/sdk/netapp/azure-mgmt-netapp/api.metadata.yml +++ b/sdk/netapp/azure-mgmt-netapp/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: 09076d6aaaa75aeaffd832f2c29cd5af14f70c31d1d82567ac34db0f7005e803 +apiMdSha256: 90c88a3f51bbb1b486ccca1e212f43ebc16f7908f3056e1a7a3bc7e490e35391 parserVersion: 0.3.28 -pythonVersion: 3.13.13 +pythonVersion: 3.13.14 diff --git a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json index b2ca7b2bfff0..39cef5a1d402 100644 --- a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json +++ b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json @@ -3,20 +3,15 @@ "CrossLanguageDefinitionId": { "azure.mgmt.netapp.models.AccountEncryption": "Microsoft.NetApp.AccountEncryption", "azure.mgmt.netapp.models.AccountProperties": "Microsoft.NetApp.AccountProperties", - "azure.mgmt.netapp.models.AccountPropertiesPatch": "Microsoft.NetApp.AccountPropertiesPatch", "azure.mgmt.netapp.models.ActiveDirectory": "Microsoft.NetApp.ActiveDirectory", - "azure.mgmt.netapp.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", - "azure.mgmt.netapp.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", - "azure.mgmt.netapp.models.ActiveDirectoryConfig": "Microsoft.NetApp.ActiveDirectoryConfig", - "azure.mgmt.netapp.models.ActiveDirectoryConfigProperties": "Microsoft.NetApp.ActiveDirectoryConfigProperties", - "azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ActiveDirectoryConfigUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "azure.mgmt.netapp.models.AuthorizeRequest": "Microsoft.NetApp.AuthorizeRequest", "azure.mgmt.netapp.models.AzureKeyVaultDetails": "Microsoft.NetApp.AzureKeyVaultDetails", + "azure.mgmt.netapp.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", "azure.mgmt.netapp.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", "azure.mgmt.netapp.models.Backup": "Microsoft.NetApp.Backup", "azure.mgmt.netapp.models.BackupPatch": "Microsoft.NetApp.BackupPatch", "azure.mgmt.netapp.models.BackupPatchProperties": "Microsoft.NetApp.BackupPatchProperties", + "azure.mgmt.netapp.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", "azure.mgmt.netapp.models.BackupPolicy": "Microsoft.NetApp.BackupPolicy", "azure.mgmt.netapp.models.BackupPolicyPatch": "Microsoft.NetApp.BackupPolicyPatch", "azure.mgmt.netapp.models.BackupPolicyProperties": "Microsoft.NetApp.BackupPolicyProperties", @@ -27,8 +22,6 @@ "azure.mgmt.netapp.models.BackupVault": "Microsoft.NetApp.BackupVault", "azure.mgmt.netapp.models.BackupVaultPatch": "Microsoft.NetApp.BackupVaultPatch", "azure.mgmt.netapp.models.BackupVaultProperties": "Microsoft.NetApp.BackupVaultProperties", - "azure.mgmt.netapp.models.BindPasswordAkvConfig": "Microsoft.NetApp.BindPasswordAkvConfig", - "azure.mgmt.netapp.models.BindPasswordAkvConfigPatch": "Microsoft.NetApp.BindPasswordAkvConfigPatch", "azure.mgmt.netapp.models.BreakFileLocksRequest": "Microsoft.NetApp.BreakFileLocksRequest", "azure.mgmt.netapp.models.BreakReplicationRequest": "Microsoft.NetApp.BreakReplicationRequest", "azure.mgmt.netapp.models.Bucket": "Microsoft.NetApp.Bucket", @@ -49,10 +42,7 @@ "azure.mgmt.netapp.models.CapacityPoolPatch": "Microsoft.NetApp.CapacityPoolPatch", "azure.mgmt.netapp.models.CertificateAkvDetails": "Microsoft.NetApp.CertificateAkvDetails", "azure.mgmt.netapp.models.ChangeKeyVault": "Microsoft.NetApp.ChangeKeyVault", - "azure.mgmt.netapp.models.ChangeZoneRequest": "Microsoft.NetApp.ChangeZoneRequest", "azure.mgmt.netapp.models.CheckAvailabilityResponse": "Microsoft.NetApp.CheckAvailabilityResponse", - "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse": "Microsoft.NetApp.CheckElasticResourceAvailabilityResponse", - "azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest": "Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest", "azure.mgmt.netapp.models.CifsUser": "Microsoft.NetApp.CifsUser", "azure.mgmt.netapp.models.ClusterPeerCommandResponse": "Microsoft.NetApp.ClusterPeerCommandResponse", "azure.mgmt.netapp.models.ClusterPeerCommandResponseProperties": "Microsoft.NetApp.ClusterPeerCommandResponseProperties", @@ -60,57 +50,8 @@ "azure.mgmt.netapp.models.DailySchedule": "Microsoft.NetApp.DailySchedule", "azure.mgmt.netapp.models.DestinationReplication": "Microsoft.NetApp.DestinationReplication", "azure.mgmt.netapp.models.Dimension": "Microsoft.NetApp.Dimension", - "azure.mgmt.netapp.models.ElasticAccount": "Microsoft.NetApp.ElasticAccount", - "azure.mgmt.netapp.models.ElasticAccountProperties": "Microsoft.NetApp.ElasticAccountProperties", - "azure.mgmt.netapp.models.ElasticAccountUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticAccountUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", - "azure.mgmt.netapp.models.ElasticBackup": "Microsoft.NetApp.ElasticBackup", - "azure.mgmt.netapp.models.ElasticBackupPolicy": "Microsoft.NetApp.ElasticBackupPolicy", - "azure.mgmt.netapp.models.ElasticBackupPolicyProperties": "Microsoft.NetApp.ElasticBackupPolicyProperties", - "azure.mgmt.netapp.models.ElasticBackupPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticBackupPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", - "azure.mgmt.netapp.models.ElasticBackupProperties": "Microsoft.NetApp.ElasticBackupProperties", - "azure.mgmt.netapp.models.ElasticBackupVault": "Microsoft.NetApp.ElasticBackupVault", - "azure.mgmt.netapp.models.ElasticBackupVaultProperties": "Microsoft.NetApp.ElasticBackupVaultProperties", - "azure.mgmt.netapp.models.ElasticBackupVaultUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticCapacityPool": "Microsoft.NetApp.ElasticCapacityPool", - "azure.mgmt.netapp.models.ElasticCapacityPoolProperties": "Microsoft.NetApp.ElasticCapacityPoolProperties", - "azure.mgmt.netapp.models.ElasticCapacityPoolUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticCapacityPoolUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", - "azure.mgmt.netapp.models.ElasticEncryption": "Microsoft.NetApp.ElasticEncryption", - "azure.mgmt.netapp.models.ElasticEncryptionConfiguration": "Microsoft.NetApp.ElasticEncryptionConfiguration", - "azure.mgmt.netapp.models.ElasticEncryptionIdentity": "Microsoft.NetApp.ElasticEncryptionIdentity", - "azure.mgmt.netapp.models.ElasticExportPolicy": "Microsoft.NetApp.ElasticExportPolicy", - "azure.mgmt.netapp.models.ElasticExportPolicyRule": "Microsoft.NetApp.ElasticExportPolicyRule", - "azure.mgmt.netapp.models.ElasticKeyVaultProperties": "Microsoft.NetApp.ElasticKeyVaultProperties", - "azure.mgmt.netapp.models.ElasticMountTargetProperties": "Microsoft.NetApp.ElasticMountTargetProperties", - "azure.mgmt.netapp.models.ElasticSmbPatchProperties": "Microsoft.NetApp.ElasticSmbPatchProperties", - "azure.mgmt.netapp.models.ElasticSmbProperties": "Microsoft.NetApp.ElasticSmbProperties", - "azure.mgmt.netapp.models.ElasticSnapshot": "Microsoft.NetApp.ElasticSnapshot", - "azure.mgmt.netapp.models.ElasticSnapshotPolicy": "Microsoft.NetApp.ElasticSnapshotPolicy", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyProperties": "Microsoft.NetApp.ElasticSnapshotPolicyProperties", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", - "azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule", - "azure.mgmt.netapp.models.ElasticSnapshotProperties": "Microsoft.NetApp.ElasticSnapshotProperties", - "azure.mgmt.netapp.models.ElasticVolume": "Microsoft.NetApp.ElasticVolume", - "azure.mgmt.netapp.models.ElasticVolumeBackupProperties": "Microsoft.NetApp.ElasticVolumeBackupProperties", - "azure.mgmt.netapp.models.ElasticVolumeDataProtectionPatchProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties", - "azure.mgmt.netapp.models.ElasticVolumeDataProtectionProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionProperties", - "azure.mgmt.netapp.models.ElasticVolumeProperties": "Microsoft.NetApp.ElasticVolumeProperties", - "azure.mgmt.netapp.models.ElasticVolumeRevert": "Microsoft.NetApp.ElasticVolumeRevert", - "azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties": "Microsoft.NetApp.ElasticVolumeSnapshotProperties", - "azure.mgmt.netapp.models.ElasticVolumeUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", - "azure.mgmt.netapp.models.ElasticVolumeUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "azure.mgmt.netapp.models.EncryptionIdentity": "Microsoft.NetApp.EncryptionIdentity", "azure.mgmt.netapp.models.EncryptionTransitionRequest": "Microsoft.NetApp.EncryptionTransitionRequest", - "azure.mgmt.netapp.models.EntraIdAkvConfig": "Microsoft.NetApp.EntraIdAkvConfig", - "azure.mgmt.netapp.models.EntraIdAkvConfigPatch": "Microsoft.NetApp.EntraIdAkvConfigPatch", - "azure.mgmt.netapp.models.EntraIdConfig": "Microsoft.NetApp.EntraIdConfig", - "azure.mgmt.netapp.models.EntraIdConfigPatch": "Microsoft.NetApp.EntraIdConfigPatch", "azure.mgmt.netapp.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", "azure.mgmt.netapp.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.mgmt.netapp.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", @@ -124,8 +65,6 @@ "azure.mgmt.netapp.models.HourlySchedule": "Microsoft.NetApp.HourlySchedule", "azure.mgmt.netapp.models.KeyVaultPrivateEndpoint": "Microsoft.NetApp.KeyVaultPrivateEndpoint", "azure.mgmt.netapp.models.KeyVaultProperties": "Microsoft.NetApp.KeyVaultProperties", - "azure.mgmt.netapp.models.LdapConfiguration": "Microsoft.NetApp.LdapConfiguration", - "azure.mgmt.netapp.models.LdapConfigurationPatch": "Microsoft.NetApp.LdapConfigurationPatch", "azure.mgmt.netapp.models.LdapSearchScopeOpt": "Microsoft.NetApp.LdapSearchScopeOpt", "azure.mgmt.netapp.models.ListQuotaReportResponse": "Microsoft.NetApp.ListQuotaReportResponse", "azure.mgmt.netapp.models.ListQuotaReportResult": "Microsoft.NetApp.ListQuotaReportResult", @@ -173,9 +112,6 @@ "azure.mgmt.netapp.models.ReplicationStatus": "Microsoft.NetApp.ReplicationStatus", "azure.mgmt.netapp.models.ResourceNameAvailabilityRequest": "Microsoft.NetApp.ResourceNameAvailabilityRequest", "azure.mgmt.netapp.models.RestoreStatus": "Microsoft.NetApp.RestoreStatus", - "azure.mgmt.netapp.models.SecretPassword": "Microsoft.NetApp.SecretPassword", - "azure.mgmt.netapp.models.SecretPasswordIdentity": "Microsoft.NetApp.SecretPasswordIdentity", - "azure.mgmt.netapp.models.SecretPasswordKeyVaultProperties": "Microsoft.NetApp.SecretPasswordKeyVaultProperties", "azure.mgmt.netapp.models.ServiceSpecification": "Microsoft.NetApp.ServiceSpecification", "azure.mgmt.netapp.models.SmbSettings": "Microsoft.NetApp.SmbSettings", "azure.mgmt.netapp.models.Snapshot": "Microsoft.NetApp.Snapshot", @@ -244,14 +180,11 @@ "azure.mgmt.netapp.models.SmbAccessBasedEnumeration": "Microsoft.NetApp.SmbAccessBasedEnumeration", "azure.mgmt.netapp.models.SmbNonBrowsable": "Microsoft.NetApp.SmbNonBrowsable", "azure.mgmt.netapp.models.EncryptionKeySource": "Microsoft.NetApp.EncryptionKeySource", - "azure.mgmt.netapp.models.LdapServerType": "Microsoft.NetApp.LdapServerType", "azure.mgmt.netapp.models.CoolAccessRetrievalPolicy": "Microsoft.NetApp.CoolAccessRetrievalPolicy", "azure.mgmt.netapp.models.CoolAccessTieringPolicy": "Microsoft.NetApp.CoolAccessTieringPolicy", "azure.mgmt.netapp.models.FileAccessLogs": "Microsoft.NetApp.FileAccessLogs", "azure.mgmt.netapp.models.AvsDataStore": "Microsoft.NetApp.AvsDataStore", "azure.mgmt.netapp.models.EnableSubvolumes": "Microsoft.NetApp.EnableSubvolumes", - "azure.mgmt.netapp.models.LargeVolumeType": "Microsoft.NetApp.LargeVolumeType", - "azure.mgmt.netapp.models.VolumeLanguage": "Microsoft.NetApp.VolumeLanguage", "azure.mgmt.netapp.models.BreakthroughMode": "Microsoft.NetApp.BreakthroughMode", "azure.mgmt.netapp.models.BackupType": "Microsoft.NetApp.BackupType", "azure.mgmt.netapp.models.VolumeBackupRelationshipStatus": "Microsoft.NetApp.VolumeBackupRelationshipStatus", @@ -273,39 +206,19 @@ "azure.mgmt.netapp.models.KerberosState": "Microsoft.NetApp.KerberosState", "azure.mgmt.netapp.models.SmbEncryptionState": "Microsoft.NetApp.SmbEncryptionState", "azure.mgmt.netapp.models.EncryptionState": "Microsoft.NetApp.EncryptionState", + "azure.mgmt.netapp.models.VolumeLanguage": "Microsoft.NetApp.VolumeLanguage", "azure.mgmt.netapp.models.LdapState": "Microsoft.NetApp.LdapState", + "azure.mgmt.netapp.models.LdapServerType": "Microsoft.NetApp.LdapServerType", "azure.mgmt.netapp.models.CifsChangeNotifyState": "Microsoft.NetApp.CifsChangeNotifyState", "azure.mgmt.netapp.models.GlobalFileLockingState": "Microsoft.NetApp.GlobalFileLockingState", "azure.mgmt.netapp.models.EnableWriteBackState": "Microsoft.NetApp.EnableWriteBackState", "azure.mgmt.netapp.models.CacheFileAccessLogs": "Microsoft.NetApp.CacheFileAccessLogs", - "azure.mgmt.netapp.models.KeySource": "Microsoft.NetApp.KeySource", - "azure.mgmt.netapp.models.ElasticKeyVaultStatus": "Microsoft.NetApp.ElasticKeyVaultStatus", - "azure.mgmt.netapp.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", - "azure.mgmt.netapp.models.ElasticServiceLevel": "Microsoft.NetApp.ElasticServiceLevel", - "azure.mgmt.netapp.models.ElasticPoolEncryptionKeySource": "Microsoft.NetApp.ElasticPoolEncryptionKeySource", - "azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus": "Microsoft.NetApp.ElasticResourceAvailabilityStatus", - "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityStatus": "Microsoft.NetApp.CheckElasticResourceAvailabilityStatus", - "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityReason": "Microsoft.NetApp.CheckElasticResourceAvailabilityReason", - "azure.mgmt.netapp.models.ElasticUnixAccessRule": "Microsoft.NetApp.ElasticUnixAccessRule", - "azure.mgmt.netapp.models.ElasticNfsv3Access": "Microsoft.NetApp.ElasticNfsv3Access", - "azure.mgmt.netapp.models.ElasticNfsv4Access": "Microsoft.NetApp.ElasticNfsv4Access", - "azure.mgmt.netapp.models.ElasticRootAccess": "Microsoft.NetApp.ElasticRootAccess", - "azure.mgmt.netapp.models.ElasticProtocolType": "Microsoft.NetApp.ElasticProtocolType", - "azure.mgmt.netapp.models.ElasticVolumePolicyEnforcement": "Microsoft.NetApp.ElasticVolumePolicyEnforcement", - "azure.mgmt.netapp.models.SnapshotDirectoryVisibility": "Microsoft.NetApp.SnapshotDirectoryVisibility", - "azure.mgmt.netapp.models.ElasticSmbEncryption": "Microsoft.NetApp.ElasticSmbEncryption", - "azure.mgmt.netapp.models.ElasticVolumeRestorationState": "Microsoft.NetApp.ElasticVolumeRestorationState", - "azure.mgmt.netapp.models.DayOfWeek": "Microsoft.NetApp.DayOfWeek", - "azure.mgmt.netapp.models.PolicyStatus": "Microsoft.NetApp.PolicyStatus", - "azure.mgmt.netapp.models.ElasticBackupPolicyState": "Microsoft.NetApp.ElasticBackupPolicyState", - "azure.mgmt.netapp.models.ElasticBackupType": "Microsoft.NetApp.ElasticBackupType", - "azure.mgmt.netapp.models.SnapshotUsage": "Microsoft.NetApp.SnapshotUsage", - "azure.mgmt.netapp.models.VolumeSize": "Microsoft.NetApp.VolumeSize", - "azure.mgmt.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus", "azure.mgmt.netapp.models.RegionStorageToNetworkProximity": "Microsoft.NetApp.RegionStorageToNetworkProximity", + "azure.mgmt.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus", + "azure.mgmt.netapp.models.KeySource": "Microsoft.NetApp.KeySource", "azure.mgmt.netapp.models.KeyVaultStatus": "Microsoft.NetApp.KeyVaultStatus", "azure.mgmt.netapp.models.MultiAdStatus": "Microsoft.NetApp.MultiAdStatus", - "azure.mgmt.netapp.models.BindAuthenticationLevel": "Microsoft.NetApp.BindAuthenticationLevel", + "azure.mgmt.netapp.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", "azure.mgmt.netapp.models.QosType": "Microsoft.NetApp.QosType", "azure.mgmt.netapp.models.EncryptionType": "Microsoft.NetApp.EncryptionType", "azure.mgmt.netapp.models.InAvailabilityReasonType": "Microsoft.NetApp.InAvailabilityReasonType", @@ -488,106 +401,6 @@ "azure.mgmt.netapp.aio.operations.CachesOperations.begin_pool_change": "Microsoft.NetApp.Caches.poolChange", "azure.mgmt.netapp.operations.CachesOperations.begin_reset_smb_password": "Microsoft.NetApp.Caches.resetSmbPassword", "azure.mgmt.netapp.aio.operations.CachesOperations.begin_reset_smb_password": "Microsoft.NetApp.Caches.resetSmbPassword", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.get": "Microsoft.NetApp.ElasticAccounts.get", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.get": "Microsoft.NetApp.ElasticAccounts.get", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_update": "Microsoft.NetApp.ElasticAccounts.update", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_update": "Microsoft.NetApp.ElasticAccounts.update", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_delete": "Microsoft.NetApp.ElasticAccounts.delete", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_delete": "Microsoft.NetApp.ElasticAccounts.delete", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.list_by_resource_group": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.list_by_resource_group": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup", - "azure.mgmt.netapp.operations.ElasticAccountsOperations.list_by_subscription": "Microsoft.NetApp.ElasticAccounts.listBySubscription", - "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.list_by_subscription": "Microsoft.NetApp.ElasticAccounts.listBySubscription", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.get": "Microsoft.NetApp.ElasticCapacityPools.get", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.get": "Microsoft.NetApp.ElasticCapacityPools.get", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_update": "Microsoft.NetApp.ElasticCapacityPools.update", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_update": "Microsoft.NetApp.ElasticCapacityPools.update", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_delete": "Microsoft.NetApp.ElasticCapacityPools.delete", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_delete": "Microsoft.NetApp.ElasticCapacityPools.delete", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_change_zone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_change_zone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", - "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.check_volume_file_path_availability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", - "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.check_volume_file_path_availability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.get": "Microsoft.NetApp.ElasticVolumes.get", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.get": "Microsoft.NetApp.ElasticVolumes.get", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_update": "Microsoft.NetApp.ElasticVolumes.update", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_update": "Microsoft.NetApp.ElasticVolumes.update", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_delete": "Microsoft.NetApp.ElasticVolumes.delete", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_delete": "Microsoft.NetApp.ElasticVolumes.delete", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.list_by_elastic_pool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.list_by_elastic_pool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool", - "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_revert": "Microsoft.NetApp.ElasticVolumes.revert", - "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_revert": "Microsoft.NetApp.ElasticVolumes.revert", - "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.get": "Microsoft.NetApp.ElasticSnapshots.get", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.get": "Microsoft.NetApp.ElasticSnapshots.get", - "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshots.delete", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshots.delete", - "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.list_by_elastic_volume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.list_by_elastic_volume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticSnapshotPolicies.update", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticSnapshotPolicies.update", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount", - "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.list_elastic_volumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes", - "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.list_elastic_volumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes", - "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.get": "Microsoft.NetApp.ElasticBackupVaults.get", - "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.get": "Microsoft.NetApp.ElasticBackupVaults.get", - "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_update": "Microsoft.NetApp.ElasticBackupVaults.update", - "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_update": "Microsoft.NetApp.ElasticBackupVaults.update", - "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_delete": "Microsoft.NetApp.ElasticBackupVaults.delete", - "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_delete": "Microsoft.NetApp.ElasticBackupVaults.delete", - "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount", - "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount", - "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.get": "Microsoft.NetApp.ElasticBackupPolicies.get", - "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.get": "Microsoft.NetApp.ElasticBackupPolicies.get", - "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticBackupPolicies.update", - "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticBackupPolicies.update", - "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticBackupPolicies.delete", - "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticBackupPolicies.delete", - "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount", - "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount", - "azure.mgmt.netapp.operations.ElasticBackupsOperations.get": "Microsoft.NetApp.ElasticBackups.get", - "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.get": "Microsoft.NetApp.ElasticBackups.get", - "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackups.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackups.createOrUpdate", - "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_update": "Microsoft.NetApp.ElasticBackups.update", - "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_update": "Microsoft.NetApp.ElasticBackups.update", - "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_delete": "Microsoft.NetApp.ElasticBackups.delete", - "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_delete": "Microsoft.NetApp.ElasticBackups.delete", - "azure.mgmt.netapp.operations.ElasticBackupsOperations.list_by_vault": "Microsoft.NetApp.ElasticBackups.listByVault", - "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.list_by_vault": "Microsoft.NetApp.ElasticBackups.listByVault", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.get": "Microsoft.NetApp.ActiveDirectoryConfigs.get", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.get": "Microsoft.NetApp.ActiveDirectoryConfigs.get", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_create_or_update": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_create_or_update": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_update": "Microsoft.NetApp.ActiveDirectoryConfigs.update", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_update": "Microsoft.NetApp.ActiveDirectoryConfigs.update", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_delete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_delete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.list_by_resource_group": "Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.list_by_resource_group": "Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup", - "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.list_by_subscription": "Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription", - "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.list_by_subscription": "Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription", "azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations.get": "Microsoft.NetApp.SubscriptionQuotaItems.get", "azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations.get": "Microsoft.NetApp.SubscriptionQuotaItems.get", "azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations.list": "Microsoft.NetApp.SubscriptionQuotaItems.list", @@ -616,8 +429,6 @@ "azure.mgmt.netapp.aio.operations.AccountsOperations.begin_get_change_key_vault_information": "Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation", "azure.mgmt.netapp.operations.AccountsOperations.begin_change_key_vault": "Microsoft.NetApp.NetAppAccounts.changeKeyVault", "azure.mgmt.netapp.aio.operations.AccountsOperations.begin_change_key_vault": "Microsoft.NetApp.NetAppAccounts.changeKeyVault", - "azure.mgmt.netapp.operations.AccountsOperations.begin_refresh_ldap_bind_password": "Microsoft.NetApp.NetAppAccounts.refreshLdapBindPassword", - "azure.mgmt.netapp.aio.operations.AccountsOperations.begin_refresh_ldap_bind_password": "Microsoft.NetApp.NetAppAccounts.refreshLdapBindPassword", "azure.mgmt.netapp.operations.BackupsUnderAccountOperations.begin_migrate_backups": "Microsoft.NetApp.NetAppAccounts.migrateBackups", "azure.mgmt.netapp.aio.operations.BackupsUnderAccountOperations.begin_migrate_backups": "Microsoft.NetApp.NetAppAccounts.migrateBackups", "azure.mgmt.netapp.operations.PoolsOperations.get": "Microsoft.NetApp.CapacityPools.get", @@ -663,5 +474,5 @@ "azure.mgmt.netapp.operations.NetAppResourceUsagesOperations.get": "Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get", "azure.mgmt.netapp.aio.operations.NetAppResourceUsagesOperations.get": "Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get" }, - "CrossLanguageVersion": "1e89995c9e71" + "CrossLanguageVersion": "9517e4ddeb15" } \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py index 78e616ad0c25..8650015b8071 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py @@ -21,7 +21,6 @@ from ._utils.serialization import Deserializer, Serializer from .operations import ( AccountsOperations, - ActiveDirectoryConfigsOperations, BackupPoliciesOperations, BackupVaultsOperations, BackupsOperations, @@ -30,14 +29,6 @@ BackupsUnderVolumeOperations, BucketsOperations, CachesOperations, - ElasticAccountsOperations, - ElasticBackupPoliciesOperations, - ElasticBackupVaultsOperations, - ElasticBackupsOperations, - ElasticCapacityPoolsOperations, - ElasticSnapshotPoliciesOperations, - ElasticSnapshotsOperations, - ElasticVolumesOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsAccountOperations, NetAppResourceQuotaLimitsOperations, @@ -95,26 +86,6 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes :vartype buckets: azure.mgmt.netapp.operations.BucketsOperations :ivar caches: CachesOperations operations :vartype caches: azure.mgmt.netapp.operations.CachesOperations - :ivar elastic_accounts: ElasticAccountsOperations operations - :vartype elastic_accounts: azure.mgmt.netapp.operations.ElasticAccountsOperations - :ivar elastic_capacity_pools: ElasticCapacityPoolsOperations operations - :vartype elastic_capacity_pools: azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations - :ivar elastic_volumes: ElasticVolumesOperations operations - :vartype elastic_volumes: azure.mgmt.netapp.operations.ElasticVolumesOperations - :ivar elastic_snapshots: ElasticSnapshotsOperations operations - :vartype elastic_snapshots: azure.mgmt.netapp.operations.ElasticSnapshotsOperations - :ivar elastic_snapshot_policies: ElasticSnapshotPoliciesOperations operations - :vartype elastic_snapshot_policies: - azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations - :ivar elastic_backup_vaults: ElasticBackupVaultsOperations operations - :vartype elastic_backup_vaults: azure.mgmt.netapp.operations.ElasticBackupVaultsOperations - :ivar elastic_backup_policies: ElasticBackupPoliciesOperations operations - :vartype elastic_backup_policies: azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations - :ivar elastic_backups: ElasticBackupsOperations operations - :vartype elastic_backups: azure.mgmt.netapp.operations.ElasticBackupsOperations - :ivar active_directory_configs: ActiveDirectoryConfigsOperations operations - :vartype active_directory_configs: - azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations :ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations :vartype net_app_resource_quota_limits: azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations @@ -147,10 +118,9 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-04-15-preview" and None. Default value is None. If not set, the operation's default API - version will be used. Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-05-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -224,29 +194,6 @@ def __init__( self.backup_vaults = BackupVaultsOperations(self._client, self._config, self._serialize, self._deserialize) self.buckets = BucketsOperations(self._client, self._config, self._serialize, self._deserialize) self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize) - self.elastic_accounts = ElasticAccountsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_capacity_pools = ElasticCapacityPoolsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_volumes = ElasticVolumesOperations(self._client, self._config, self._serialize, self._deserialize) - self.elastic_snapshots = ElasticSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_snapshot_policies = ElasticSnapshotPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backup_vaults = ElasticBackupVaultsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backup_policies = ElasticBackupPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backups = ElasticBackupsOperations(self._client, self._config, self._serialize, self._deserialize) - self.active_directory_configs = ActiveDirectoryConfigsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py index a73fe24a0ea9..9543f23f36a0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py @@ -33,10 +33,9 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-04-15-preview" and None. Default value is None. If not set, the operation's default API - version will be used. Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-05-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -48,7 +47,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-04-15-preview") + api_version: str = kwargs.pop("api_version", "2026-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py index b93f5120d517..0f2c5bdfe70f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py @@ -458,21 +458,21 @@ def __ne__(self, other: typing.Any) -> bool: def keys(self) -> typing.KeysView[str]: """ - :returns: a set-like object providing a view on D's keys + :returns: a set-like object providing a view on the mapping's keys :rtype: ~typing.KeysView """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: """ - :returns: an object providing a view on D's values + :returns: an object providing a view on the mapping's values :rtype: ~typing.ValuesView """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: """ - :returns: set-like object providing a view on D's items + :returns: a set-like object providing a view on the mapping's items :rtype: ~typing.ItemsView """ return self._data.items() @@ -482,7 +482,7 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ try: @@ -517,19 +517,19 @@ def popitem(self) -> tuple[str, typing.Any]: Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple - :raises KeyError: if D is empty. + :raises KeyError: if the dictionary is empty. """ return self._data.popitem() def clear(self) -> None: """ - Remove all items from D. + Remove all items from the dictionary. """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ - Updates D from mapping/iterable E and F. + Update the dictionary from a mapping or an iterable of key-value pairs. :param any args: Either a mapping object or an iterable of key-value pairs. """ self._data.update(*args, **kwargs) @@ -542,10 +542,11 @@ def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ - Same as calling D.get(k, d), and setting D[k]=d if k not found + Return the value for key if key is in the dictionary; otherwise set the key to + default and return default. :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ if default is _UNSET: diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py index 34588e07c84b..193979baa1ba 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "18.0.0b1" +VERSION = "17.1.0" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py index 327fc42c8370..6c3397911149 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py @@ -21,7 +21,6 @@ from ._configuration import NetAppManagementClientConfiguration from .operations import ( AccountsOperations, - ActiveDirectoryConfigsOperations, BackupPoliciesOperations, BackupVaultsOperations, BackupsOperations, @@ -30,14 +29,6 @@ BackupsUnderVolumeOperations, BucketsOperations, CachesOperations, - ElasticAccountsOperations, - ElasticBackupPoliciesOperations, - ElasticBackupVaultsOperations, - ElasticBackupsOperations, - ElasticCapacityPoolsOperations, - ElasticSnapshotPoliciesOperations, - ElasticSnapshotsOperations, - ElasticVolumesOperations, NetAppResourceOperations, NetAppResourceQuotaLimitsAccountOperations, NetAppResourceQuotaLimitsOperations, @@ -95,28 +86,6 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes :vartype buckets: azure.mgmt.netapp.aio.operations.BucketsOperations :ivar caches: CachesOperations operations :vartype caches: azure.mgmt.netapp.aio.operations.CachesOperations - :ivar elastic_accounts: ElasticAccountsOperations operations - :vartype elastic_accounts: azure.mgmt.netapp.aio.operations.ElasticAccountsOperations - :ivar elastic_capacity_pools: ElasticCapacityPoolsOperations operations - :vartype elastic_capacity_pools: - azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations - :ivar elastic_volumes: ElasticVolumesOperations operations - :vartype elastic_volumes: azure.mgmt.netapp.aio.operations.ElasticVolumesOperations - :ivar elastic_snapshots: ElasticSnapshotsOperations operations - :vartype elastic_snapshots: azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations - :ivar elastic_snapshot_policies: ElasticSnapshotPoliciesOperations operations - :vartype elastic_snapshot_policies: - azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations - :ivar elastic_backup_vaults: ElasticBackupVaultsOperations operations - :vartype elastic_backup_vaults: azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations - :ivar elastic_backup_policies: ElasticBackupPoliciesOperations operations - :vartype elastic_backup_policies: - azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations - :ivar elastic_backups: ElasticBackupsOperations operations - :vartype elastic_backups: azure.mgmt.netapp.aio.operations.ElasticBackupsOperations - :ivar active_directory_configs: ActiveDirectoryConfigsOperations operations - :vartype active_directory_configs: - azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations :ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations :vartype net_app_resource_quota_limits: azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations @@ -150,10 +119,9 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-04-15-preview" and None. Default value is None. If not set, the operation's default API - version will be used. Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-05-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -229,29 +197,6 @@ def __init__( self.backup_vaults = BackupVaultsOperations(self._client, self._config, self._serialize, self._deserialize) self.buckets = BucketsOperations(self._client, self._config, self._serialize, self._deserialize) self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize) - self.elastic_accounts = ElasticAccountsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_capacity_pools = ElasticCapacityPoolsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_volumes = ElasticVolumesOperations(self._client, self._config, self._serialize, self._deserialize) - self.elastic_snapshots = ElasticSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_snapshot_policies = ElasticSnapshotPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backup_vaults = ElasticBackupVaultsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backup_policies = ElasticBackupPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.elastic_backups = ElasticBackupsOperations(self._client, self._config, self._serialize, self._deserialize) - self.active_directory_configs = ActiveDirectoryConfigsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py index 2878435a1887..9c7a4141e7b3 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py @@ -33,10 +33,9 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-04-15-preview" and None. Default value is None. If not set, the operation's default API - version will be used. Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-05-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -48,7 +47,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-04-15-preview") + api_version: str = kwargs.pop("api_version", "2026-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py index dc8916780c55..4edfa8469e9a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py @@ -25,15 +25,6 @@ from ._operations import BackupVaultsOperations # type: ignore from ._operations import BucketsOperations # type: ignore from ._operations import CachesOperations # type: ignore -from ._operations import ElasticAccountsOperations # type: ignore -from ._operations import ElasticCapacityPoolsOperations # type: ignore -from ._operations import ElasticVolumesOperations # type: ignore -from ._operations import ElasticSnapshotsOperations # type: ignore -from ._operations import ElasticSnapshotPoliciesOperations # type: ignore -from ._operations import ElasticBackupVaultsOperations # type: ignore -from ._operations import ElasticBackupPoliciesOperations # type: ignore -from ._operations import ElasticBackupsOperations # type: ignore -from ._operations import ActiveDirectoryConfigsOperations # type: ignore from ._operations import NetAppResourceQuotaLimitsOperations # type: ignore from ._operations import NetAppResourceRegionInfosOperations # type: ignore from ._operations import AccountsOperations # type: ignore @@ -63,15 +54,6 @@ "BackupVaultsOperations", "BucketsOperations", "CachesOperations", - "ElasticAccountsOperations", - "ElasticCapacityPoolsOperations", - "ElasticVolumesOperations", - "ElasticSnapshotsOperations", - "ElasticSnapshotPoliciesOperations", - "ElasticBackupVaultsOperations", - "ElasticBackupPoliciesOperations", - "ElasticBackupsOperations", - "ActiveDirectoryConfigsOperations", "NetAppResourceQuotaLimitsOperations", "NetAppResourceRegionInfosOperations", "AccountsOperations", diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py index c468a26cccf7..097831dafff3 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py @@ -33,7 +33,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models as _models +from ... import models as _models, types as _types from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ..._validation import api_version_validation @@ -45,16 +45,9 @@ build_accounts_get_request, build_accounts_list_by_subscription_request, build_accounts_list_request, - build_accounts_refresh_ldap_bind_password_request, build_accounts_renew_credentials_request, build_accounts_transition_to_cmk_request, build_accounts_update_request, - build_active_directory_configs_create_or_update_request, - build_active_directory_configs_delete_request, - build_active_directory_configs_get_request, - build_active_directory_configs_list_by_resource_group_request, - build_active_directory_configs_list_by_subscription_request, - build_active_directory_configs_update_request, build_backup_policies_create_request, build_backup_policies_delete_request, build_backup_policies_get_request, @@ -91,50 +84,6 @@ build_caches_pool_change_request, build_caches_reset_smb_password_request, build_caches_update_request, - build_elastic_accounts_create_or_update_request, - build_elastic_accounts_delete_request, - build_elastic_accounts_get_request, - build_elastic_accounts_list_by_resource_group_request, - build_elastic_accounts_list_by_subscription_request, - build_elastic_accounts_update_request, - build_elastic_backup_policies_create_or_update_request, - build_elastic_backup_policies_delete_request, - build_elastic_backup_policies_get_request, - build_elastic_backup_policies_list_by_elastic_account_request, - build_elastic_backup_policies_update_request, - build_elastic_backup_vaults_create_or_update_request, - build_elastic_backup_vaults_delete_request, - build_elastic_backup_vaults_get_request, - build_elastic_backup_vaults_list_by_elastic_account_request, - build_elastic_backup_vaults_update_request, - build_elastic_backups_create_or_update_request, - build_elastic_backups_delete_request, - build_elastic_backups_get_request, - build_elastic_backups_list_by_vault_request, - build_elastic_backups_update_request, - build_elastic_capacity_pools_change_zone_request, - build_elastic_capacity_pools_check_volume_file_path_availability_request, - build_elastic_capacity_pools_create_or_update_request, - build_elastic_capacity_pools_delete_request, - build_elastic_capacity_pools_get_request, - build_elastic_capacity_pools_list_by_elastic_account_request, - build_elastic_capacity_pools_update_request, - build_elastic_snapshot_policies_create_or_update_request, - build_elastic_snapshot_policies_delete_request, - build_elastic_snapshot_policies_get_request, - build_elastic_snapshot_policies_list_by_elastic_account_request, - build_elastic_snapshot_policies_list_elastic_volumes_request, - build_elastic_snapshot_policies_update_request, - build_elastic_snapshots_create_or_update_request, - build_elastic_snapshots_delete_request, - build_elastic_snapshots_get_request, - build_elastic_snapshots_list_by_elastic_volume_request, - build_elastic_volumes_create_or_update_request, - build_elastic_volumes_delete_request, - build_elastic_volumes_get_request, - build_elastic_volumes_list_by_elastic_pool_request, - build_elastic_volumes_revert_request, - build_elastic_volumes_update_request, build_net_app_resource_check_file_path_availability_request, build_net_app_resource_check_name_availability_request, build_net_app_resource_check_quota_availability_request, @@ -218,7 +167,6 @@ T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] List = list @@ -373,6 +321,7 @@ def __init__(self, *args, **kwargs) -> None: "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def get( @@ -466,6 +415,7 @@ async def get( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncItemPaged["_models.QuotaItem"]: @@ -666,7 +616,7 @@ async def _create_initial( resource_group_name: str, account_name: str, volume_group_name: str, - body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]], + body: Union[_models.VolumeGroupDetails, _types.VolumeGroupDetails, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -774,7 +724,7 @@ async def begin_create( resource_group_name: str, account_name: str, volume_group_name: str, - body: JSON, + body: _types.VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any @@ -789,7 +739,7 @@ async def begin_create( :param volume_group_name: The name of the volumeGroup. Required. :type volume_group_name: str :param body: Volume Group object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.VolumeGroupDetails :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -836,7 +786,7 @@ async def begin_create( resource_group_name: str, account_name: str, volume_group_name: str, - body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]], + body: Union[_models.VolumeGroupDetails, _types.VolumeGroupDetails, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.VolumeGroupDetails]: """Create a volume group along with specified volumes. @@ -848,9 +798,10 @@ async def begin_create( :type account_name: str :param volume_group_name: The name of the volumeGroup. Required. :type volume_group_name: str - :param body: Volume Group object supplied in the body of the operation. Is one of the following - types: VolumeGroupDetails, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or JSON or IO[bytes] + :param body: Volume Group object supplied in the body of the operation. Is either a + VolumeGroupDetails type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or + ~azure.mgmt.netapp.types.VolumeGroupDetails or IO[bytes] :return: An instance of AsyncLROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] @@ -1241,7 +1192,7 @@ async def _create_initial( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.Backup, JSON, IO[bytes]], + body: Union[_models.Backup, _types.Backup, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -1357,7 +1308,7 @@ async def begin_create( account_name: str, backup_vault_name: str, backup_name: str, - body: JSON, + body: _types.Backup, *, content_type: str = "application/json", **kwargs: Any @@ -1374,7 +1325,7 @@ async def begin_create( :param backup_name: The name of the backup. Required. :type backup_name: str :param body: Backup object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Backup :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1425,7 +1376,7 @@ async def begin_create( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.Backup, JSON, IO[bytes]], + body: Union[_models.Backup, _types.Backup, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Backup]: """Create a backup under the Backup Vault. @@ -1439,9 +1390,9 @@ async def begin_create( :type backup_vault_name: str :param backup_name: The name of the backup. Required. :type backup_name: str - :param body: Backup object supplied in the body of the operation. Is one of the following - types: Backup, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Backup or JSON or IO[bytes] + :param body: Backup object supplied in the body of the operation. Is either a Backup type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Backup or ~azure.mgmt.netapp.types.Backup or IO[bytes] :return: An instance of AsyncLROPoller that returns Backup. The Backup is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Backup] @@ -1507,7 +1458,7 @@ async def _update_initial( account_name: str, backup_vault_name: str, backup_name: str, - body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BackupPatch, _types.BackupPatch, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -1625,7 +1576,7 @@ async def begin_update( account_name: str, backup_vault_name: str, backup_name: str, - body: Optional[JSON] = None, + body: Optional[_types.BackupPatch] = None, *, content_type: str = "application/json", **kwargs: Any @@ -1642,7 +1593,7 @@ async def begin_update( :param backup_name: The name of the backup. Required. :type backup_name: str :param body: Backup object supplied in the body of the operation. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1693,7 +1644,7 @@ async def begin_update( account_name: str, backup_vault_name: str, backup_name: str, - body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BackupPatch, _types.BackupPatch, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.Backup]: """Patch a Backup under the Backup Vault. @@ -1707,9 +1658,10 @@ async def begin_update( :type backup_vault_name: str :param backup_name: The name of the backup. Required. :type backup_name: str - :param body: Backup object supplied in the body of the operation. Is one of the following - types: BackupPatch, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BackupPatch or JSON or IO[bytes] + :param body: Backup object supplied in the body of the operation. Is either a BackupPatch type + or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BackupPatch or ~azure.mgmt.netapp.types.BackupPatch or + IO[bytes] :return: An instance of AsyncLROPoller that returns Backup. The Backup is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Backup] @@ -2271,7 +2223,7 @@ async def _create_or_update_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.Volume, JSON, IO[bytes]], + body: Union[_models.Volume, _types.Volume, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -2391,7 +2343,7 @@ async def begin_create_or_update( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.Volume, *, content_type: str = "application/json", **kwargs: Any @@ -2408,7 +2360,7 @@ async def begin_create_or_update( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Volume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Volume :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2459,7 +2411,7 @@ async def begin_create_or_update( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.Volume, JSON, IO[bytes]], + body: Union[_models.Volume, _types.Volume, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Volume]: """Create or update the specified volume within the capacity pool. @@ -2473,9 +2425,9 @@ async def begin_create_or_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Volume object supplied in the body of the operation. Is one of the following - types: Volume, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Volume or JSON or IO[bytes] + :param body: Volume object supplied in the body of the operation. Is either a Volume type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Volume or ~azure.mgmt.netapp.types.Volume or IO[bytes] :return: An instance of AsyncLROPoller that returns Volume. The Volume is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Volume] @@ -2541,7 +2493,7 @@ async def _update_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.VolumePatch, JSON, IO[bytes]], + body: Union[_models.VolumePatch, _types.VolumePatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -2655,7 +2607,7 @@ async def begin_update( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.VolumePatch, *, content_type: str = "application/json", **kwargs: Any @@ -2672,7 +2624,7 @@ async def begin_update( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Volume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.VolumePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2723,7 +2675,7 @@ async def begin_update( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.VolumePatch, JSON, IO[bytes]], + body: Union[_models.VolumePatch, _types.VolumePatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Volume]: """Patch the specified volume. @@ -2737,9 +2689,10 @@ async def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Volume object supplied in the body of the operation. Is one of the following - types: VolumePatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumePatch or JSON or IO[bytes] + :param body: Volume object supplied in the body of the operation. Is either a VolumePatch type + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumePatch or ~azure.mgmt.netapp.types.VolumePatch or + IO[bytes] :return: An instance of AsyncLROPoller that returns Volume. The Volume is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Volume] @@ -3191,7 +3144,7 @@ async def _revert_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.VolumeRevert, JSON, IO[bytes]], + body: Union[_models.VolumeRevert, _types.VolumeRevert, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -3304,7 +3257,7 @@ async def begin_revert( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.VolumeRevert, *, content_type: str = "application/json", **kwargs: Any @@ -3321,7 +3274,7 @@ async def begin_revert( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Object for snapshot to revert supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.VolumeRevert :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3370,7 +3323,7 @@ async def begin_revert( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.VolumeRevert, JSON, IO[bytes]], + body: Union[_models.VolumeRevert, _types.VolumeRevert, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Revert a volume to the snapshot specified in the body. @@ -3384,9 +3337,10 @@ async def begin_revert( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Object for snapshot to revert supplied in the body of the operation. Is one of the - following types: VolumeRevert, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeRevert or JSON or IO[bytes] + :param body: Object for snapshot to revert supplied in the body of the operation. Is either a + VolumeRevert type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeRevert or ~azure.mgmt.netapp.types.VolumeRevert or + IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -3707,7 +3661,7 @@ async def _break_file_locks_initial( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BreakFileLocksRequest, _types.BreakFileLocksRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -3825,7 +3779,7 @@ async def begin_break_file_locks( account_name: str, pool_name: str, volume_name: str, - body: Optional[JSON] = None, + body: Optional[_types.BreakFileLocksRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -3843,7 +3797,7 @@ async def begin_break_file_locks( :type volume_name: str :param body: Optional body to provide the ability to clear file locks with selected options. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BreakFileLocksRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3893,7 +3847,7 @@ async def begin_break_file_locks( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BreakFileLocksRequest, _types.BreakFileLocksRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Break all the file locks on a volume. @@ -3908,8 +3862,9 @@ async def begin_break_file_locks( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Optional body to provide the ability to clear file locks with selected options. Is - one of the following types: BreakFileLocksRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or JSON or IO[bytes] + either a BreakFileLocksRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or + ~azure.mgmt.netapp.types.BreakFileLocksRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -3989,6 +3944,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long @@ -3997,7 +3953,7 @@ async def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name account_name: str, pool_name: str, volume_name: str, - body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]], + body: Union[_models.GetGroupIdListForLDAPUserRequest, _types.GetGroupIdListForLDAPUserRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -4115,7 +4071,7 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.GetGroupIdListForLDAPUserRequest, *, content_type: str = "application/json", **kwargs: Any @@ -4132,7 +4088,7 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Returns group Id list for a specific LDAP user. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.GetGroupIdListForLDAPUserRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4204,6 +4160,7 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long @@ -4212,7 +4169,7 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to account_name: str, pool_name: str, volume_name: str, - body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]], + body: Union[_models.GetGroupIdListForLDAPUserRequest, _types.GetGroupIdListForLDAPUserRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.GetGroupIdListForLDAPUserResponse]: """Returns the list of group Ids for a specific LDAP User. @@ -4226,9 +4183,10 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Returns group Id list for a specific LDAP user. Is one of the following types: - GetGroupIdListForLDAPUserRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or JSON or IO[bytes] + :param body: Returns group Id list for a specific LDAP user. Is either a + GetGroupIdListForLDAPUserRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or + ~azure.mgmt.netapp.types.GetGroupIdListForLDAPUserRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns GetGroupIdListForLDAPUserResponse. The GetGroupIdListForLDAPUserResponse is compatible with MutableMapping :rtype: @@ -4295,7 +4253,7 @@ async def _break_replication_initial( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BreakReplicationRequest, _types.BreakReplicationRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -4412,7 +4370,7 @@ async def begin_break_replication( account_name: str, pool_name: str, volume_name: str, - body: Optional[JSON] = None, + body: Optional[_types.BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -4429,7 +4387,7 @@ async def begin_break_replication( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Optional body to force break the replication. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BreakReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4478,7 +4436,7 @@ async def begin_break_replication( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.BreakReplicationRequest, _types.BreakReplicationRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Break the replication connection on the destination volume. @@ -4492,9 +4450,10 @@ async def begin_break_replication( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Optional body to force break the replication. Is one of the following types: - BreakReplicationRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or JSON or IO[bytes] + :param body: Optional body to force break the replication. Is either a BreakReplicationRequest + type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or + ~azure.mgmt.netapp.types.BreakReplicationRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -4555,7 +4514,7 @@ async def _reestablish_replication_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]], + body: Union[_models.ReestablishReplicationRequest, _types.ReestablishReplicationRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -4668,7 +4627,7 @@ async def begin_reestablish_replication( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -4686,7 +4645,7 @@ async def begin_reestablish_replication( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: body for the id of the source volume. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ReestablishReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4736,7 +4695,7 @@ async def begin_reestablish_replication( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]], + body: Union[_models.ReestablishReplicationRequest, _types.ReestablishReplicationRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or @@ -4751,9 +4710,10 @@ async def begin_reestablish_replication( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: body for the id of the source volume. Is one of the following types: - ReestablishReplicationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or JSON or IO[bytes] + :param body: body for the id of the source volume. Is either a ReestablishReplicationRequest + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or + ~azure.mgmt.netapp.types.ReestablishReplicationRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -4925,7 +4885,7 @@ def list_replications( account_name: str, pool_name: str, volume_name: str, - body: Optional[JSON] = None, + body: Optional[_types.ListReplicationsRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -4942,7 +4902,7 @@ def list_replications( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: The content of the action request. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ListReplicationsRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5010,6 +4970,7 @@ def list_replications( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) def list_replications( @@ -5018,7 +4979,7 @@ def list_replications( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.ListReplicationsRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.ListReplicationsRequest, _types.ListReplicationsRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncItemPaged["_models.Replication"]: """List all replications for a specified volume. @@ -5032,9 +4993,10 @@ def list_replications( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The content of the action request. Is one of the following types: - ListReplicationsRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or JSON or IO[bytes] + :param body: The content of the action request. Is either a ListReplicationsRequest type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or + ~azure.mgmt.netapp.types.ListReplicationsRequest or IO[bytes] :return: An iterator like instance of Replication :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.Replication] :raises ~azure.core.exceptions.HttpResponseError: @@ -5405,7 +5367,7 @@ async def _authorize_replication_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.AuthorizeRequest, JSON, IO[bytes]], + body: Union[_models.AuthorizeRequest, _types.AuthorizeRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -5518,7 +5480,7 @@ async def begin_authorize_replication( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -5535,7 +5497,7 @@ async def begin_authorize_replication( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Authorize request object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.AuthorizeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5584,7 +5546,7 @@ async def begin_authorize_replication( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.AuthorizeRequest, JSON, IO[bytes]], + body: Union[_models.AuthorizeRequest, _types.AuthorizeRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Authorize the replication connection on the source volume. @@ -5598,9 +5560,10 @@ async def begin_authorize_replication( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Authorize request object supplied in the body of the operation. Is one of the - following types: AuthorizeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or JSON or IO[bytes] + :param body: Authorize request object supplied in the body of the operation. Is either a + AuthorizeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or + ~azure.mgmt.netapp.types.AuthorizeRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -5788,7 +5751,9 @@ async def _peer_external_cluster_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]], + body: Union[ + _models.PeerClusterForVolumeMigrationRequest, _types.PeerClusterForVolumeMigrationRequest, IO[bytes] + ], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -5906,7 +5871,7 @@ async def begin_peer_external_cluster( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.PeerClusterForVolumeMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -5923,7 +5888,7 @@ async def begin_peer_external_cluster( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Cluster peer request object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.PeerClusterForVolumeMigrationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5976,7 +5941,9 @@ async def begin_peer_external_cluster( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]], + body: Union[ + _models.PeerClusterForVolumeMigrationRequest, _types.PeerClusterForVolumeMigrationRequest, IO[bytes] + ], **kwargs: Any ) -> AsyncLROPoller[_models.ClusterPeerCommandResponse]: """Starts peering the external cluster for this migration volume. @@ -5990,9 +5957,10 @@ async def begin_peer_external_cluster( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Cluster peer request object supplied in the body of the operation. Is one of the - following types: PeerClusterForVolumeMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or JSON or IO[bytes] + :param body: Cluster peer request object supplied in the body of the operation. Is either a + PeerClusterForVolumeMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or + ~azure.mgmt.netapp.types.PeerClusterForVolumeMigrationRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns ClusterPeerCommandResponse. The ClusterPeerCommandResponse is compatible with MutableMapping :rtype: @@ -6466,7 +6434,7 @@ async def _pool_change_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -6579,7 +6547,7 @@ async def begin_pool_change( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -6596,7 +6564,7 @@ async def begin_pool_change( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Move volume to the pool supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6645,7 +6613,7 @@ async def begin_pool_change( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Moves volume to another pool. @@ -6659,9 +6627,10 @@ async def begin_pool_change( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Move volume to the pool supplied in the body of the operation. Is one of the - following types: PoolChangeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes] + :param body: Move volume to the pool supplied in the body of the operation. Is either a + PoolChangeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or + ~azure.mgmt.netapp.types.PoolChangeRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -6721,7 +6690,7 @@ async def _relocate_initial( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.RelocateVolumeRequest, _types.RelocateVolumeRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -6838,7 +6807,7 @@ async def begin_relocate( account_name: str, pool_name: str, volume_name: str, - body: Optional[JSON] = None, + body: Optional[_types.RelocateVolumeRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -6855,7 +6824,7 @@ async def begin_relocate( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: Relocate volume request. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.RelocateVolumeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6904,7 +6873,7 @@ async def begin_relocate( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.RelocateVolumeRequest, _types.RelocateVolumeRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Relocates volume to a new stamp. @@ -6918,9 +6887,10 @@ async def begin_relocate( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Relocate volume request. Is one of the following types: RelocateVolumeRequest, - JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or JSON or IO[bytes] + :param body: Relocate volume request. Is either a RelocateVolumeRequest type or a IO[bytes] + type. Default value is None. + :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or + ~azure.mgmt.netapp.types.RelocateVolumeRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -7255,6 +7225,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _list_quota_report_initial( @@ -7263,7 +7234,7 @@ async def _list_quota_report_initial( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.QuotaReportFilterRequest, _types.QuotaReportFilterRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -7384,7 +7355,7 @@ async def begin_list_quota_report( account_name: str, pool_name: str, volume_name: str, - body: Optional[JSON] = None, + body: Optional[_types.QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -7401,7 +7372,7 @@ async def begin_list_quota_report( :param volume_name: The name of the volume. Required. :type volume_name: str :param body: The content of the action request. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.QuotaReportFilterRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7469,6 +7440,7 @@ async def begin_list_quota_report( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_list_quota_report( @@ -7477,7 +7449,7 @@ async def begin_list_quota_report( account_name: str, pool_name: str, volume_name: str, - body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.QuotaReportFilterRequest, _types.QuotaReportFilterRequest, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.ListQuotaReportResult]: """Get quota report for volume (with filter support). @@ -7491,9 +7463,10 @@ async def begin_list_quota_report( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The content of the action request. Is one of the following types: - QuotaReportFilterRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or JSON or IO[bytes] + :param body: The content of the action request. Is either a QuotaReportFilterRequest type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or + ~azure.mgmt.netapp.types.QuotaReportFilterRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns ListQuotaReportResult. The ListQuotaReportResult is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] @@ -7673,7 +7646,7 @@ async def _create_initial( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.Snapshot, JSON, IO[bytes]], + body: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -7791,7 +7764,7 @@ async def begin_create( pool_name: str, volume_name: str, snapshot_name: str, - body: JSON, + body: _types.Snapshot, *, content_type: str = "application/json", **kwargs: Any @@ -7810,7 +7783,7 @@ async def begin_create( :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str :param body: Snapshot object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Snapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7865,7 +7838,7 @@ async def begin_create( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.Snapshot, JSON, IO[bytes]], + body: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Snapshot]: """Create the specified snapshot within the given volume. @@ -7881,9 +7854,10 @@ async def begin_create( :type volume_name: str :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Is one of the following - types: Snapshot, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Snapshot or JSON or IO[bytes] + :param body: Snapshot object supplied in the body of the operation. Is either a Snapshot type + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Snapshot or ~azure.mgmt.netapp.types.Snapshot or + IO[bytes] :return: An instance of AsyncLROPoller that returns Snapshot. The Snapshot is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Snapshot] @@ -7955,7 +7929,7 @@ async def _update_initial( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.SnapshotPatch, JSON, IO[bytes]], + body: Union[_models.SnapshotPatch, _types.SnapshotPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -8074,7 +8048,7 @@ async def begin_update( pool_name: str, volume_name: str, snapshot_name: str, - body: JSON, + body: _types.SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any @@ -8093,7 +8067,7 @@ async def begin_update( :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str :param body: Snapshot object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SnapshotPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8148,7 +8122,7 @@ async def begin_update( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.SnapshotPatch, JSON, IO[bytes]], + body: Union[_models.SnapshotPatch, _types.SnapshotPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Snapshot]: """Patch a snapshot. @@ -8164,9 +8138,10 @@ async def begin_update( :type volume_name: str :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Is one of the following - types: SnapshotPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPatch or JSON or IO[bytes] + :param body: Snapshot object supplied in the body of the operation. Is either a SnapshotPatch + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPatch or ~azure.mgmt.netapp.types.SnapshotPatch + or IO[bytes] :return: An instance of AsyncLROPoller that returns Snapshot. The Snapshot is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Snapshot] @@ -8486,7 +8461,7 @@ async def _restore_files_initial( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]], + body: Union[_models.SnapshotRestoreFiles, _types.SnapshotRestoreFiles, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -8604,7 +8579,7 @@ async def begin_restore_files( pool_name: str, volume_name: str, snapshot_name: str, - body: JSON, + body: _types.SnapshotRestoreFiles, *, content_type: str = "application/json", **kwargs: Any @@ -8623,7 +8598,7 @@ async def begin_restore_files( :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str :param body: Restore payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SnapshotRestoreFiles :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8676,7 +8651,7 @@ async def begin_restore_files( pool_name: str, volume_name: str, snapshot_name: str, - body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]], + body: Union[_models.SnapshotRestoreFiles, _types.SnapshotRestoreFiles, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Restore the specified files from the specified snapshot to the active filesystem. @@ -8692,9 +8667,10 @@ async def begin_restore_files( :type volume_name: str :param snapshot_name: The name of the snapshot. Required. :type snapshot_name: str - :param body: Restore payload supplied in the body of the operation. Is one of the following - types: SnapshotRestoreFiles, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or JSON or IO[bytes] + :param body: Restore payload supplied in the body of the operation. Is either a + SnapshotRestoreFiles type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or + ~azure.mgmt.netapp.types.SnapshotRestoreFiles or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -8878,7 +8854,7 @@ async def create( resource_group_name: str, account_name: str, snapshot_policy_name: str, - body: JSON, + body: _types.SnapshotPolicy, *, content_type: str = "application/json", **kwargs: Any @@ -8893,7 +8869,7 @@ async def create( :param snapshot_policy_name: The name of the snapshot policy. Required. :type snapshot_policy_name: str :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SnapshotPolicy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8938,7 +8914,7 @@ async def create( resource_group_name: str, account_name: str, snapshot_policy_name: str, - body: Union[_models.SnapshotPolicy, JSON, IO[bytes]], + body: Union[_models.SnapshotPolicy, _types.SnapshotPolicy, IO[bytes]], **kwargs: Any ) -> _models.SnapshotPolicy: """Create a snapshot policy. @@ -8950,9 +8926,10 @@ async def create( :type account_name: str :param snapshot_policy_name: The name of the snapshot policy. Required. :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Is one of the - following types: SnapshotPolicy, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or JSON or IO[bytes] + :param body: Snapshot policy object supplied in the body of the operation. Is either a + SnapshotPolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or ~azure.mgmt.netapp.types.SnapshotPolicy + or IO[bytes] :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy :raises ~azure.core.exceptions.HttpResponseError: @@ -9030,7 +9007,7 @@ async def _update_initial( resource_group_name: str, account_name: str, snapshot_policy_name: str, - body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]], + body: Union[_models.SnapshotPolicyPatch, _types.SnapshotPolicyPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -9139,7 +9116,7 @@ async def begin_update( resource_group_name: str, account_name: str, snapshot_policy_name: str, - body: JSON, + body: _types.SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any @@ -9154,7 +9131,7 @@ async def begin_update( :param snapshot_policy_name: The name of the snapshot policy. Required. :type snapshot_policy_name: str :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SnapshotPolicyPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9201,7 +9178,7 @@ async def begin_update( resource_group_name: str, account_name: str, snapshot_policy_name: str, - body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]], + body: Union[_models.SnapshotPolicyPatch, _types.SnapshotPolicyPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.SnapshotPolicy]: """Patch a snapshot policy. @@ -9213,9 +9190,10 @@ async def begin_update( :type account_name: str :param snapshot_policy_name: The name of the snapshot policy. Required. :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Is one of the - following types: SnapshotPolicyPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or JSON or IO[bytes] + :param body: Snapshot policy object supplied in the body of the operation. Is either a + SnapshotPolicyPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or + ~azure.mgmt.netapp.types.SnapshotPolicyPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] @@ -9674,7 +9652,7 @@ async def _create_initial( resource_group_name: str, account_name: str, backup_policy_name: str, - body: Union[_models.BackupPolicy, JSON, IO[bytes]], + body: Union[_models.BackupPolicy, _types.BackupPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -9789,7 +9767,7 @@ async def begin_create( resource_group_name: str, account_name: str, backup_policy_name: str, - body: JSON, + body: _types.BackupPolicy, *, content_type: str = "application/json", **kwargs: Any @@ -9804,7 +9782,7 @@ async def begin_create( :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. :type backup_policy_name: str :param body: Backup policy object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupPolicy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9851,7 +9829,7 @@ async def begin_create( resource_group_name: str, account_name: str, backup_policy_name: str, - body: Union[_models.BackupPolicy, JSON, IO[bytes]], + body: Union[_models.BackupPolicy, _types.BackupPolicy, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.BackupPolicy]: """Create a backup policy for Netapp Account. @@ -9863,9 +9841,10 @@ async def begin_create( :type account_name: str :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Is one of the - following types: BackupPolicy, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicy or JSON or IO[bytes] + :param body: Backup policy object supplied in the body of the operation. Is either a + BackupPolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicy or ~azure.mgmt.netapp.types.BackupPolicy or + IO[bytes] :return: An instance of AsyncLROPoller that returns BackupPolicy. The BackupPolicy is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupPolicy] @@ -9929,7 +9908,7 @@ async def _update_initial( resource_group_name: str, account_name: str, backup_policy_name: str, - body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]], + body: Union[_models.BackupPolicyPatch, _types.BackupPolicyPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -10040,7 +10019,7 @@ async def begin_update( resource_group_name: str, account_name: str, backup_policy_name: str, - body: JSON, + body: _types.BackupPolicyPatch, *, content_type: str = "application/json", **kwargs: Any @@ -10055,7 +10034,7 @@ async def begin_update( :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. :type backup_policy_name: str :param body: Backup policy object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupPolicyPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10102,7 +10081,7 @@ async def begin_update( resource_group_name: str, account_name: str, backup_policy_name: str, - body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]], + body: Union[_models.BackupPolicyPatch, _types.BackupPolicyPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.BackupPolicy]: """Patch a backup policy for Netapp Account. @@ -10114,9 +10093,10 @@ async def begin_update( :type account_name: str :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Is one of the - following types: BackupPolicyPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or JSON or IO[bytes] + :param body: Backup policy object supplied in the body of the operation. Is either a + BackupPolicyPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or + ~azure.mgmt.netapp.types.BackupPolicyPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns BackupPolicy. The BackupPolicy is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupPolicy] @@ -10513,7 +10493,7 @@ async def _create_initial( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]], + body: Union[_models.VolumeQuotaRule, _types.VolumeQuotaRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -10632,7 +10612,7 @@ async def begin_create( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: JSON, + body: _types.VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any @@ -10651,7 +10631,7 @@ async def begin_create( :param volume_quota_rule_name: The name of volume quota rule. Required. :type volume_quota_rule_name: str :param body: Quota rule object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.VolumeQuotaRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10706,7 +10686,7 @@ async def begin_create( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]], + body: Union[_models.VolumeQuotaRule, _types.VolumeQuotaRule, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.VolumeQuotaRule]: """Create the specified quota rule within the given volume. @@ -10722,9 +10702,10 @@ async def begin_create( :type volume_name: str :param volume_quota_rule_name: The name of volume quota rule. Required. :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Is one of the following - types: VolumeQuotaRule, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or JSON or IO[bytes] + :param body: Quota rule object supplied in the body of the operation. Is either a + VolumeQuotaRule type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or + ~azure.mgmt.netapp.types.VolumeQuotaRule or IO[bytes] :return: An instance of AsyncLROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] @@ -10792,7 +10773,7 @@ async def _update_initial( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]], + body: Union[_models.VolumeQuotaRulePatch, _types.VolumeQuotaRulePatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -10911,7 +10892,7 @@ async def begin_update( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: JSON, + body: _types.VolumeQuotaRulePatch, *, content_type: str = "application/json", **kwargs: Any @@ -10930,7 +10911,7 @@ async def begin_update( :param volume_quota_rule_name: The name of volume quota rule. Required. :type volume_quota_rule_name: str :param body: Quota rule object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.VolumeQuotaRulePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10985,7 +10966,7 @@ async def begin_update( pool_name: str, volume_name: str, volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]], + body: Union[_models.VolumeQuotaRulePatch, _types.VolumeQuotaRulePatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.VolumeQuotaRule]: """Patch a quota rule. @@ -11001,9 +10982,10 @@ async def begin_update( :type volume_name: str :param volume_quota_rule_name: The name of volume quota rule. Required. :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Is one of the following - types: VolumeQuotaRulePatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or JSON or IO[bytes] + :param body: Quota rule object supplied in the body of the operation. Is either a + VolumeQuotaRulePatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or + ~azure.mgmt.netapp.types.VolumeQuotaRulePatch or IO[bytes] :return: An instance of AsyncLROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] @@ -11358,6 +11340,7 @@ def __init__(self, *args, **kwargs) -> None: "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def get( @@ -11473,6 +11456,7 @@ async def get( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) def list( @@ -11610,6 +11594,7 @@ async def get_next(next_link=None): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _clear_suspects_initial( @@ -11619,7 +11604,7 @@ async def _clear_suspects_initial( pool_name: str, volume_name: str, ransomware_report_name: str, - body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]], + body: Union[_models.RansomwareSuspectsClearRequest, _types.RansomwareSuspectsClearRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -11740,7 +11725,7 @@ async def begin_clear_suspects( pool_name: str, volume_name: str, ransomware_report_name: str, - body: JSON, + body: _types.RansomwareSuspectsClearRequest, *, content_type: str = "application/json", **kwargs: Any @@ -11763,7 +11748,7 @@ async def begin_clear_suspects( :param ransomware_report_name: The name of the ransomware report. Required. :type ransomware_report_name: str :param body: Clear suspects request object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.RansomwareSuspectsClearRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11836,6 +11821,7 @@ async def begin_clear_suspects( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_clear_suspects( @@ -11845,7 +11831,7 @@ async def begin_clear_suspects( pool_name: str, volume_name: str, ransomware_report_name: str, - body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]], + body: Union[_models.RansomwareSuspectsClearRequest, _types.RansomwareSuspectsClearRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should @@ -11865,9 +11851,10 @@ async def begin_clear_suspects( :type volume_name: str :param ransomware_report_name: The name of the ransomware report. Required. :type ransomware_report_name: str - :param body: Clear suspects request object supplied in the body of the operation. Is one of the - following types: RansomwareSuspectsClearRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or JSON or IO[bytes] + :param body: Clear suspects request object supplied in the body of the operation. Is either a + RansomwareSuspectsClearRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or + ~azure.mgmt.netapp.types.RansomwareSuspectsClearRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -12020,7 +12007,7 @@ async def _create_or_update_initial( resource_group_name: str, account_name: str, backup_vault_name: str, - body: Union[_models.BackupVault, JSON, IO[bytes]], + body: Union[_models.BackupVault, _types.BackupVault, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -12131,7 +12118,7 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, backup_vault_name: str, - body: JSON, + body: _types.BackupVault, *, content_type: str = "application/json", **kwargs: Any @@ -12146,7 +12133,7 @@ async def begin_create_or_update( :param backup_vault_name: The name of the Backup Vault. Required. :type backup_vault_name: str :param body: BackupVault object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupVault :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12193,7 +12180,7 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, backup_vault_name: str, - body: Union[_models.BackupVault, JSON, IO[bytes]], + body: Union[_models.BackupVault, _types.BackupVault, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.BackupVault]: """Create or update the specified Backup Vault in the NetApp account. @@ -12205,9 +12192,10 @@ async def begin_create_or_update( :type account_name: str :param backup_vault_name: The name of the Backup Vault. Required. :type backup_vault_name: str - :param body: BackupVault object supplied in the body of the operation. Is one of the following - types: BackupVault, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupVault or JSON or IO[bytes] + :param body: BackupVault object supplied in the body of the operation. Is either a BackupVault + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupVault or ~azure.mgmt.netapp.types.BackupVault or + IO[bytes] :return: An instance of AsyncLROPoller that returns BackupVault. The BackupVault is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault] @@ -12271,7 +12259,7 @@ async def _update_initial( resource_group_name: str, account_name: str, backup_vault_name: str, - body: Union[_models.BackupVaultPatch, JSON, IO[bytes]], + body: Union[_models.BackupVaultPatch, _types.BackupVaultPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -12380,7 +12368,7 @@ async def begin_update( resource_group_name: str, account_name: str, backup_vault_name: str, - body: JSON, + body: _types.BackupVaultPatch, *, content_type: str = "application/json", **kwargs: Any @@ -12395,7 +12383,7 @@ async def begin_update( :param backup_vault_name: The name of the Backup Vault. Required. :type backup_vault_name: str :param body: Backup Vault object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupVaultPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12442,7 +12430,7 @@ async def begin_update( resource_group_name: str, account_name: str, backup_vault_name: str, - body: Union[_models.BackupVaultPatch, JSON, IO[bytes]], + body: Union[_models.BackupVaultPatch, _types.BackupVaultPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.BackupVault]: """Patch the specified NetApp Backup Vault. @@ -12454,9 +12442,10 @@ async def begin_update( :type account_name: str :param backup_vault_name: The name of the Backup Vault. Required. :type backup_vault_name: str - :param body: Backup Vault object supplied in the body of the operation. Is one of the following - types: BackupVaultPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or JSON or IO[bytes] + :param body: Backup Vault object supplied in the body of the operation. Is either a + BackupVaultPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or + ~azure.mgmt.netapp.types.BackupVaultPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns BackupVault. The BackupVault is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault] @@ -12782,6 +12771,7 @@ def __init__(self, *args, **kwargs) -> None: "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def get( @@ -12894,6 +12884,7 @@ async def get( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _create_or_update_initial( @@ -12903,7 +12894,7 @@ async def _create_or_update_initial( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.Bucket, JSON, IO[bytes]], + body: Union[_models.Bucket, _types.Bucket, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -13026,7 +13017,7 @@ async def begin_create_or_update( pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: _types.Bucket, *, content_type: str = "application/json", **kwargs: Any @@ -13047,7 +13038,7 @@ async def begin_create_or_update( :type bucket_name: str :param body: The bucket details including user details, and the volume path that should be mounted inside the bucket. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Bucket :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13120,6 +13111,7 @@ async def begin_create_or_update( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_create_or_update( @@ -13129,7 +13121,7 @@ async def begin_create_or_update( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.Bucket, JSON, IO[bytes]], + body: Union[_models.Bucket, _types.Bucket, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Bucket]: """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI @@ -13147,8 +13139,8 @@ async def begin_create_or_update( :param bucket_name: The name of the bucket. Required. :type bucket_name: str :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Is one of the following types: Bucket, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Bucket or JSON or IO[bytes] + mounted inside the bucket. Is either a Bucket type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Bucket or ~azure.mgmt.netapp.types.Bucket or IO[bytes] :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket] @@ -13232,6 +13224,7 @@ def get_long_running_output(pipeline_response): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _update_initial( @@ -13241,7 +13234,7 @@ async def _update_initial( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.BucketPatch, JSON, IO[bytes]], + body: Union[_models.BucketPatch, _types.BucketPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -13364,7 +13357,7 @@ async def begin_update( pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: _types.BucketPatch, *, content_type: str = "application/json", **kwargs: Any @@ -13384,7 +13377,7 @@ async def begin_update( :type bucket_name: str :param body: The bucket details including user details, and the volume path that should be mounted inside the bucket. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BucketPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13456,6 +13449,7 @@ async def begin_update( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_update( @@ -13465,7 +13459,7 @@ async def begin_update( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.BucketPatch, JSON, IO[bytes]], + body: Union[_models.BucketPatch, _types.BucketPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Bucket]: """Updates the details of a volume bucket. @@ -13482,9 +13476,9 @@ async def begin_update( :param bucket_name: The name of the bucket. Required. :type bucket_name: str :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Is one of the following types: BucketPatch, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.BucketPatch or JSON or IO[bytes] + mounted inside the bucket. Is either a BucketPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketPatch or ~azure.mgmt.netapp.types.BucketPatch or + IO[bytes] :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket] @@ -13566,6 +13560,7 @@ def get_long_running_output(pipeline_response): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _delete_initial( @@ -13663,6 +13658,7 @@ async def _delete_initial( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_delete( @@ -13760,6 +13756,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) def list( @@ -13917,7 +13914,7 @@ async def generate_credentials( pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: _types.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any @@ -13938,7 +13935,7 @@ async def generate_credentials( :type bucket_name: str :param body: The bucket's Access and Secret key pair expiry time expressed as the number of days from now. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14011,6 +14008,7 @@ async def generate_credentials( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def generate_credentials( @@ -14020,7 +14018,7 @@ async def generate_credentials( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any ) -> _models.BucketGenerateCredentials: """Generate the access key and secret key used for accessing the specified volume bucket. Also @@ -14038,9 +14036,9 @@ async def generate_credentials( :param bucket_name: The name of the bucket. Required. :type bucket_name: str :param body: The bucket's Access and Secret key pair expiry time expressed as the number of - days from now. Is one of the following types: BucketCredentialsExpiry, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes] + days from now. Is either a BucketCredentialsExpiry type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or + ~azure.mgmt.netapp.types.BucketCredentialsExpiry or IO[bytes] :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials @@ -14138,6 +14136,7 @@ async def generate_credentials( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _generate_akv_credentials_initial( @@ -14147,7 +14146,7 @@ async def _generate_akv_credentials_initial( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -14268,7 +14267,7 @@ async def begin_generate_akv_credentials( pool_name: str, volume_name: str, bucket_name: str, - body: JSON, + body: _types.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any @@ -14288,7 +14287,7 @@ async def begin_generate_akv_credentials( :param bucket_name: The name of the bucket. Required. :type bucket_name: str :param body: The content of the action request. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14357,6 +14356,7 @@ async def begin_generate_akv_credentials( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_generate_akv_credentials( @@ -14366,7 +14366,7 @@ async def begin_generate_akv_credentials( pool_name: str, volume_name: str, bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Generate the access key and secret key used for accessing the specified volume bucket and store @@ -14383,9 +14383,10 @@ async def begin_generate_akv_credentials( :type volume_name: str :param bucket_name: The name of the bucket. Required. :type bucket_name: str - :param body: The content of the action request. Is one of the following types: - BucketCredentialsExpiry, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes] + :param body: The content of the action request. Is either a BucketCredentialsExpiry type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or + ~azure.mgmt.netapp.types.BucketCredentialsExpiry or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -14461,6 +14462,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _refresh_certificate_initial( @@ -14557,6 +14559,7 @@ async def _refresh_certificate_initial( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_refresh_certificate( @@ -14673,6 +14676,7 @@ def __init__(self, *args, **kwargs) -> None: "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def get( @@ -14774,6 +14778,7 @@ async def get( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _create_or_update_initial( @@ -14782,7 +14787,7 @@ async def _create_or_update_initial( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.Cache, JSON, IO[bytes]], + body: Union[_models.Cache, _types.Cache, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -14898,7 +14903,7 @@ async def begin_create_or_update( account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: _types.Cache, *, content_type: str = "application/json", **kwargs: Any @@ -14915,7 +14920,7 @@ async def begin_create_or_update( :param cache_name: The name of the cache resource. Required. :type cache_name: str :param body: Resource create parameters. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Cache :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14982,6 +14987,7 @@ async def begin_create_or_update( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_create_or_update( @@ -14990,7 +14996,7 @@ async def begin_create_or_update( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.Cache, JSON, IO[bytes]], + body: Union[_models.Cache, _types.Cache, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Cache]: """Create or update the specified Cache within the Capacity Pool. @@ -15004,9 +15010,8 @@ async def begin_create_or_update( :type pool_name: str :param cache_name: The name of the cache resource. Required. :type cache_name: str - :param body: Resource create parameters. Is one of the following types: Cache, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.Cache or JSON or IO[bytes] + :param body: Resource create parameters. Is either a Cache type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Cache or ~azure.mgmt.netapp.types.Cache or IO[bytes] :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache] @@ -15088,6 +15093,7 @@ def get_long_running_output(pipeline_response): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _update_initial( @@ -15096,7 +15102,7 @@ async def _update_initial( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.CacheUpdate, JSON, IO[bytes]], + body: Union[_models.CacheUpdate, _types.CacheUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -15213,7 +15219,7 @@ async def begin_update( account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: _types.CacheUpdate, *, content_type: str = "application/json", **kwargs: Any @@ -15230,7 +15236,7 @@ async def begin_update( :param cache_name: The name of the cache resource. Required. :type cache_name: str :param body: The resource properties to be updated. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CacheUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15297,6 +15303,7 @@ async def begin_update( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_update( @@ -15305,7 +15312,7 @@ async def begin_update( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.CacheUpdate, JSON, IO[bytes]], + body: Union[_models.CacheUpdate, _types.CacheUpdate, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Cache]: """Patch the specified Cache. @@ -15319,9 +15326,10 @@ async def begin_update( :type pool_name: str :param cache_name: The name of the cache resource. Required. :type cache_name: str - :param body: The resource properties to be updated. Is one of the following types: CacheUpdate, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CacheUpdate or JSON or IO[bytes] + :param body: The resource properties to be updated. Is either a CacheUpdate type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.CacheUpdate or ~azure.mgmt.netapp.types.CacheUpdate or + IO[bytes] :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache] @@ -15401,6 +15409,7 @@ def get_long_running_output(pipeline_response): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _delete_initial( @@ -15487,6 +15496,7 @@ async def _delete_initial( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_delete( @@ -15573,6 +15583,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) def list( @@ -15701,6 +15712,7 @@ async def get_next(next_link=None): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def list_peering_passphrases( @@ -15803,6 +15815,7 @@ async def list_peering_passphrases( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _pool_change_initial( @@ -15811,7 +15824,7 @@ async def _pool_change_initial( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -15925,7 +15938,7 @@ async def begin_pool_change( account_name: str, pool_name: str, cache_name: str, - body: JSON, + body: _types.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -15942,7 +15955,7 @@ async def begin_pool_change( :param cache_name: The name of the cache resource. Required. :type cache_name: str :param body: Move cache to the pool supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -16009,6 +16022,7 @@ async def begin_pool_change( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_pool_change( @@ -16017,7 +16031,7 @@ async def begin_pool_change( account_name: str, pool_name: str, cache_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Cache]: """Moves Cache to another Capacity Pool. @@ -16031,9 +16045,10 @@ async def begin_pool_change( :type pool_name: str :param cache_name: The name of the cache resource. Required. :type cache_name: str - :param body: Move cache to the pool supplied in the body of the operation. Is one of the - following types: PoolChangeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes] + :param body: Move cache to the pool supplied in the body of the operation. Is either a + PoolChangeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or + ~azure.mgmt.netapp.types.PoolChangeRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache] @@ -16114,6 +16129,7 @@ def get_long_running_output(pipeline_response): "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def _reset_smb_password_initial( @@ -16201,6 +16217,7 @@ async def _reset_smb_password_initial( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) async def begin_reset_smb_password( @@ -16274,14 +16291,14 @@ def get_long_running_output(pipeline_response): ) -class ElasticAccountsOperations: +class NetAppResourceQuotaLimitsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_accounts` attribute. + :attr:`net_app_resource_quota_limits` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -16292,23 +16309,15 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.ElasticAccount: - """Get the NetApp Elastic Account. + async def get(self, location: str, quota_limit_name: str, **kwargs: Any) -> _models.QuotaItem: + """Get the default and current quota limit. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: ElasticAccount. The ElasticAccount is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticAccount + :param location: The name of the Azure region. Required. + :type location: str + :param quota_limit_name: The name of the Quota Limit. Required. + :type quota_limit_name: str + :return: QuotaItem. The QuotaItem is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.QuotaItem :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -16322,11 +16331,11 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) + cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None) - _request = build_elastic_accounts_get_request( - resource_group_name=resource_group_name, - account_name=account_name, + _request = build_net_app_resource_quota_limits_get_request( + location=location, + quota_limit_name=quota_limit_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -16361,34 +16370,28 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ElasticAccount, response.json()) + deserialized = _deserialize(_models.QuotaItem, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - body: Union[_models.ElasticAccount, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: + @distributed_trace + def list(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.QuotaItem"]: + """Get the default and current limits for quotas. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of QuotaItem + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.QuotaItem] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -16397,26 +16400,124 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + _request = build_net_app_resource_quota_limits_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_elastic_accounts_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.QuotaItem], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetAppResourceRegionInfosOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s + :attr:`net_app_resource_region_infos` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, location: str, **kwargs: Any) -> _models.RegionInfoResource: + """Provides storage to network proximity and logical zone mapping information. + + :param location: The name of the Azure region. Required. + :type location: str + :return: RegionInfoResource. The RegionInfoResource is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.RegionInfoResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegionInfoResource] = kwargs.pop("cls", None) + + _request = build_net_app_resource_region_infos_get_request( + location=location, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -16426,18 +16527,19 @@ async def _create_or_update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -16445,9351 +16547,28 @@ async def _create_or_update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RegionInfoResource, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - body: _models.ElasticAccount, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. + @distributed_trace + def list(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.RegionInfoResource"]: + """Provides region specific information. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccount - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of RegionInfoResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.RegionInfoResource] :raises ~azure.core.exceptions.HttpResponseError: """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - body: Union[_models.ElasticAccount, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: Resource create parameters. Is one of the following types: ElasticAccount, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccount or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticAccount, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticAccount].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_accounts_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - body: _models.ElasticAccountUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticAccountUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticAccount, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticAccount].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_accounts_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Delete the specified NetApp elastic account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticAccount"]: - """List and describe all NetApp elastic accounts in the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ElasticAccount - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_accounts_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticAccount], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ElasticAccount"]: - """List and describe all NetApp elastic accounts in the subscription. - - :return: An iterator like instance of ElasticAccount - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_accounts_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticAccount], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ElasticCapacityPoolsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_capacity_pools` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> _models.ElasticCapacityPool: - """Get the NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: ElasticCapacityPool. The ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticCapacityPool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) - - _request = build_elastic_capacity_pools_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_capacity_pools_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.ElasticCapacityPool, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Is one of the following types: ElasticCapacityPool, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_capacity_pools_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.ElasticCapacityPoolUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticCapacityPoolUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_capacity_pools_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticCapacityPool"]: - """List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticCapacityPool - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticCapacityPool]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_capacity_pools_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticCapacityPool], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _change_zone_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_capacity_pools_change_zone_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.ChangeZoneRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_change_zone( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Is one of the following types: - ChangeZoneRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The - ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._change_zone_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.CheckElasticVolumeFilePathAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Is one of the following types: - CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest or JSON or - IO[bytes] - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckElasticResourceAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_capacity_pools_check_volume_file_path_availability_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CheckElasticResourceAvailabilityResponse, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class ElasticVolumesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_volumes` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.ElasticVolume: - """Get the details of the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :return: ElasticVolume. The ElasticVolume is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticVolume - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) - - _request = build_elastic_volumes_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticVolume, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolume, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_volumes_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ElasticVolume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolume - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolume, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Is one of the following types: ElasticVolume, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolume or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticVolume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticVolume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_volumes_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ElasticVolumeUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticVolumeUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticVolume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticVolume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_volumes_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete the specified Elastic Volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_pool( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticVolume"]: - """List all Elastic Volumes within the Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: An iterator like instance of ElasticVolume - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_volumes_list_by_elastic_pool_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticVolume], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _revert_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_volumes_revert_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ElasticVolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Is one of the following types: - ElasticVolumeRevert, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._revert_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticVolume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticVolume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - -class ElasticSnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> _models.ElasticSnapshot: - """Get a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :return: ElasticSnapshot. The ElasticSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None) - - _request = build_elastic_snapshots_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticSnapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.ElasticSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_snapshots_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: _models.ElasticSnapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.ElasticSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Is one of the following types: ElasticSnapshot, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshot or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshot, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticSnapshot].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticSnapshot]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_snapshots_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_volume( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticSnapshot"]: - """List ElasticSnapshot resources by ElasticVolume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :return: An iterator like instance of ElasticSnapshot - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticSnapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_snapshots_list_by_elastic_volume_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticSnapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ElasticSnapshotPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_snapshot_policies` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> _models.ElasticSnapshotPolicy: - """Get a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :return: ElasticSnapshotPolicy. The ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) - - _request = build_elastic_snapshot_policies_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_snapshot_policies_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: _models.ElasticSnapshotPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Is one of the following types: ElasticSnapshotPolicy, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticSnapshotPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticSnapshotPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_snapshot_policies_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: _models.ElasticSnapshotPolicyUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticSnapshotPolicyUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The - ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticSnapshotPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticSnapshotPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_snapshot_policies_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a ElasticSnapshotPolicy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticSnapshotPolicy"]: - """List ElasticSnapshotPolicy resources by ElasticAccount. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticSnapshotPolicy - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticSnapshotPolicy]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_snapshot_policies_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticSnapshotPolicy], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_elastic_volumes( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticVolume"]: - """Get elastic volumes associated with Elastic Snapshot Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :return: An iterator like instance of ElasticVolume - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_snapshot_policies_list_elastic_volumes_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticVolume], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ElasticBackupVaultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_backup_vaults` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> _models.ElasticBackupVault: - """Get the Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :return: ElasticBackupVault. The ElasticBackupVault is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackupVault - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) - - _request = build_elastic_backup_vaults_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVault, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backup_vaults_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: _models.ElasticBackupVault, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVault - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVault, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackupVault, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVault or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackupVault].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackupVault]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backup_vaults_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: _models.ElasticBackupVaultUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackupVaultUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault - is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackupVault].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackupVault]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_backup_vaults_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete the specified Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticBackupVault"]: - """List and describe all Elastic Backup Vaults in the elastic account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticBackupVault - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticBackupVault]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_backup_vaults_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticBackupVault], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ElasticBackupPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_backup_policies` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any - ) -> _models.ElasticBackupPolicy: - """Get the Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :return: ElasticBackupPolicy. The ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackupPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) - - _request = build_elastic_backup_policies_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backup_policies_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: _models.ElasticBackupPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackupPolicy, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackupPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackupPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backup_policies_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: _models.ElasticBackupPolicyUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackupPolicyUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The - ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackupPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackupPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_backup_policies_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete the specified Elastic Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticBackupPolicy"]: - """List and describe all Elastic Backup Policies in the elastic account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticBackupPolicy - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticBackupPolicy]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_backup_policies_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticBackupPolicy], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ElasticBackupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`elastic_backups` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> _models.ElasticBackup: - """Get the specified Elastic Backup under Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :return: ElasticBackup. The ElasticBackup is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) - - _request = build_elastic_backups_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticBackup, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backups_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: _models.ElasticBackup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackup, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackup, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backups_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: _models.ElasticBackup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackup, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackup, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ElasticBackup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ElasticBackup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_elastic_backups_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "backup_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a ElasticBackup. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_vault_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_vault( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ElasticBackup"]: - """List all elastic backups Under an elastic Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :return: An iterator like instance of ElasticBackup - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticBackup]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_backups_list_by_vault_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticBackup], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ActiveDirectoryConfigsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`active_directory_configs` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def get( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any - ) -> _models.ActiveDirectoryConfig: - """Get the details of the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :return: ActiveDirectoryConfig. The ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ActiveDirectoryConfig - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) - - _request = build_active_directory_configs_get_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_active_directory_configs_create_or_update_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: _models.ActiveDirectoryConfig, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Is one of the following types: ActiveDirectoryConfig, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ActiveDirectoryConfig].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ActiveDirectoryConfig]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _update_initial( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_active_directory_configs_update_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: _models.ActiveDirectoryConfigUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Is one of the following types: - ActiveDirectoryConfigUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The - ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ActiveDirectoryConfig].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ActiveDirectoryConfig]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_active_directory_configs_delete_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - async def begin_delete( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete the specified Active Directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ActiveDirectoryConfig"]: - """List all active directory configurations within the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ActiveDirectoryConfig - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_active_directory_configs_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ActiveDirectoryConfig], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ActiveDirectoryConfig"]: - """List all active directory configurations within the subscription. - - :return: An iterator like instance of ActiveDirectoryConfig - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_active_directory_configs_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ActiveDirectoryConfig], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class NetAppResourceQuotaLimitsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`net_app_resource_quota_limits` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, quota_limit_name: str, **kwargs: Any) -> _models.QuotaItem: - """Get the default and current quota limit. - - :param location: The name of the Azure region. Required. - :type location: str - :param quota_limit_name: The name of the Quota Limit. Required. - :type quota_limit_name: str - :return: QuotaItem. The QuotaItem is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.QuotaItem - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None) - - _request = build_net_app_resource_quota_limits_get_request( - location=location, - quota_limit_name=quota_limit_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.QuotaItem, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.QuotaItem"]: - """Get the default and current limits for quotas. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of QuotaItem - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.QuotaItem] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_net_app_resource_quota_limits_list_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.QuotaItem], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class NetAppResourceRegionInfosOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s - :attr:`net_app_resource_region_infos` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, **kwargs: Any) -> _models.RegionInfoResource: - """Provides storage to network proximity and logical zone mapping information. - - :param location: The name of the Azure region. Required. - :type location: str - :return: RegionInfoResource. The RegionInfoResource is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.RegionInfoResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RegionInfoResource] = kwargs.pop("cls", None) - - _request = build_net_app_resource_region_infos_get_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.RegionInfoResource, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.RegionInfoResource"]: - """Provides region specific information. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of RegionInfoResource - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.RegionInfoResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} cls: ClsType[List[_models.RegionInfoResource]] = kwargs.pop("cls", None) @@ -25966,7 +16745,7 @@ async def _create_or_update_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccount, JSON, IO[bytes]], + body: Union[_models.NetAppAccount, _types.NetAppAccount, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -26072,7 +16851,7 @@ async def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.NetAppAccount, *, content_type: str = "application/json", **kwargs: Any @@ -26085,7 +16864,7 @@ async def begin_create_or_update( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: NetApp Account object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.NetAppAccount :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -26128,7 +16907,7 @@ async def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccount, JSON, IO[bytes]], + body: Union[_models.NetAppAccount, _types.NetAppAccount, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetAppAccount]: """Create or update the specified NetApp account within the resource group. @@ -26138,9 +16917,10 @@ async def begin_create_or_update( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: NetApp Account object supplied in the body of the operation. Is one of the - following types: NetAppAccount, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.NetAppAccount or JSON or IO[bytes] + :param body: NetApp Account object supplied in the body of the operation. Is either a + NetAppAccount type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.NetAppAccount or ~azure.mgmt.netapp.types.NetAppAccount + or IO[bytes] :return: An instance of AsyncLROPoller that returns NetAppAccount. The NetAppAccount is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.NetAppAccount] @@ -26199,9 +16979,9 @@ def get_long_running_output(pipeline_response): ) @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2026-01-01", params_added_on={ - "2025-12-15-preview": [ + "2026-01-01": [ "api_version", "subscription_id", "resource_group_name", @@ -26210,13 +16990,13 @@ def get_long_running_output(pipeline_response): "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=["2026-01-01", "2026-03-01", "2026-04-01", "2026-05-01"], ) async def _update_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccountPatch, JSON, IO[bytes]], + body: Union[_models.NetAppAccountPatch, _types.NetAppAccountPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -26320,7 +17100,7 @@ async def begin_update( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.NetAppAccountPatch, *, content_type: str = "application/json", **kwargs: Any @@ -26333,7 +17113,7 @@ async def begin_update( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: NetApp Account object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.NetAppAccountPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -26373,9 +17153,9 @@ async def begin_update( @distributed_trace_async @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2026-01-01", params_added_on={ - "2025-12-15-preview": [ + "2026-01-01": [ "api_version", "subscription_id", "resource_group_name", @@ -26384,13 +17164,13 @@ async def begin_update( "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=["2026-01-01", "2026-03-01", "2026-04-01", "2026-05-01"], ) async def begin_update( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccountPatch, JSON, IO[bytes]], + body: Union[_models.NetAppAccountPatch, _types.NetAppAccountPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetAppAccount]: """Patch the specified NetApp account. @@ -26400,9 +17180,10 @@ async def begin_update( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: NetApp Account object supplied in the body of the operation. Is one of the - following types: NetAppAccountPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch or JSON or IO[bytes] + :param body: NetApp Account object supplied in the body of the operation. Is either a + NetAppAccountPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch or + ~azure.mgmt.netapp.types.NetAppAccountPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns NetAppAccount. The NetAppAccount is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.NetAppAccount] @@ -26894,7 +17675,9 @@ async def _transition_to_cmk_initial( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.EncryptionTransitionRequest, JSON, IO[bytes]]] = None, + body: Optional[ + Union[_models.EncryptionTransitionRequest, _types.EncryptionTransitionRequest, IO[bytes]] + ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -27002,7 +17785,7 @@ async def begin_transition_to_cmk( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[_types.EncryptionTransitionRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -27017,7 +17800,7 @@ async def begin_transition_to_cmk( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: The required parameters to perform encryption transition. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.EncryptionTransitionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -27060,7 +17843,9 @@ async def begin_transition_to_cmk( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.EncryptionTransitionRequest, JSON, IO[bytes]]] = None, + body: Optional[ + Union[_models.EncryptionTransitionRequest, _types.EncryptionTransitionRequest, IO[bytes]] + ] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key @@ -27072,9 +17857,10 @@ async def begin_transition_to_cmk( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: The required parameters to perform encryption transition. Is one of the following - types: EncryptionTransitionRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or JSON or IO[bytes] + :param body: The required parameters to perform encryption transition. Is either a + EncryptionTransitionRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or + ~azure.mgmt.netapp.types.EncryptionTransitionRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -27269,7 +18055,7 @@ async def _change_key_vault_initial( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.ChangeKeyVault, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.ChangeKeyVault, _types.ChangeKeyVault, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -27376,7 +18162,7 @@ async def begin_change_key_vault( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[_types.ChangeKeyVault] = None, *, content_type: str = "application/json", **kwargs: Any @@ -27390,7 +18176,7 @@ async def begin_change_key_vault( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: The required parameters to perform encryption migration. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ChangeKeyVault :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -27432,7 +18218,7 @@ async def begin_change_key_vault( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.ChangeKeyVault, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.ChangeKeyVault, _types.ChangeKeyVault, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. @@ -27443,9 +18229,10 @@ async def begin_change_key_vault( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: The required parameters to perform encryption migration. Is one of the following - types: ChangeKeyVault, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or JSON or IO[bytes] + :param body: The required parameters to perform encryption migration. Is either a + ChangeKeyVault type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or ~azure.mgmt.netapp.types.ChangeKeyVault + or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -27498,142 +18285,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2026-04-15-preview", - params_added_on={ - "2026-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2026-04-15-preview"], - ) - async def _refresh_ldap_bind_password_initial( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_accounts_refresh_ldap_bind_password_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-04-15-preview", - params_added_on={ - "2026-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2026-04-15-preview"], - ) - async def begin_refresh_ldap_bind_password( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_ldap_bind_password_initial( - resource_group_name=resource_group_name, - account_name=account_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - class BackupsUnderAccountOperations: """ @@ -27656,7 +18307,7 @@ async def _migrate_backups_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -27759,7 +18410,7 @@ async def begin_migrate_backups( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -27773,7 +18424,7 @@ async def begin_migrate_backups( :type account_name: str :param body: Migrate backups under an account payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupsMigrationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -27815,7 +18466,7 @@ async def begin_migrate_backups( self, resource_group_name: str, account_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Migrate the backups under a NetApp account to backup vault. @@ -27826,8 +18477,9 @@ async def begin_migrate_backups( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: Migrate backups under an account payload supplied in the body of the operation. Is - one of the following types: BackupsMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or JSON or IO[bytes] + either a BackupsMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or + ~azure.mgmt.netapp.types.BackupsMigrationRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -27977,7 +18629,7 @@ async def _create_or_update_initial( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPool, JSON, IO[bytes]], + body: Union[_models.CapacityPool, _types.CapacityPool, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -28086,7 +18738,7 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + body: _types.CapacityPool, *, content_type: str = "application/json", **kwargs: Any @@ -28101,7 +18753,7 @@ async def begin_create_or_update( :param pool_name: The name of the capacity pool. Required. :type pool_name: str :param body: Capacity pool object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CapacityPool :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -28148,7 +18800,7 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPool, JSON, IO[bytes]], + body: Union[_models.CapacityPool, _types.CapacityPool, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CapacityPool]: """Create or Update a capacity pool. @@ -28160,9 +18812,10 @@ async def begin_create_or_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param body: Capacity pool object supplied in the body of the operation. Is one of the - following types: CapacityPool, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CapacityPool or JSON or IO[bytes] + :param body: Capacity pool object supplied in the body of the operation. Is either a + CapacityPool type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.CapacityPool or ~azure.mgmt.netapp.types.CapacityPool or + IO[bytes] :return: An instance of AsyncLROPoller that returns CapacityPool. The CapacityPool is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.CapacityPool] @@ -28226,7 +18879,7 @@ async def _update_initial( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPoolPatch, JSON, IO[bytes]], + body: Union[_models.CapacityPoolPatch, _types.CapacityPoolPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -28335,7 +18988,7 @@ async def begin_update( resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + body: _types.CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any @@ -28350,7 +19003,7 @@ async def begin_update( :param pool_name: The name of the capacity pool. Required. :type pool_name: str :param body: Capacity pool object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CapacityPoolPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -28397,7 +19050,7 @@ async def begin_update( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPoolPatch, JSON, IO[bytes]], + body: Union[_models.CapacityPoolPatch, _types.CapacityPoolPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CapacityPool]: """Patch the specified capacity pool. @@ -28409,9 +19062,10 @@ async def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param body: Capacity pool object supplied in the body of the operation. Is one of the - following types: CapacityPoolPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch or JSON or IO[bytes] + :param body: Capacity pool object supplied in the body of the operation. Is either a + CapacityPoolPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch or + ~azure.mgmt.netapp.types.CapacityPoolPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns CapacityPool. The CapacityPool is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.CapacityPool] @@ -28720,7 +19374,7 @@ async def _restore_files_initial( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.BackupRestoreFiles, JSON, IO[bytes]], + body: Union[_models.BackupRestoreFiles, _types.BackupRestoreFiles, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -28832,7 +19486,7 @@ async def begin_restore_files( account_name: str, backup_vault_name: str, backup_name: str, - body: JSON, + body: _types.BackupRestoreFiles, *, content_type: str = "application/json", **kwargs: Any @@ -28849,7 +19503,7 @@ async def begin_restore_files( :param backup_name: The name of the backup. Required. :type backup_name: str :param body: Restore payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupRestoreFiles :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -28898,7 +19552,7 @@ async def begin_restore_files( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.BackupRestoreFiles, JSON, IO[bytes]], + body: Union[_models.BackupRestoreFiles, _types.BackupRestoreFiles, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Restore the specified files from the specified backup to the active filesystem. @@ -28912,9 +19566,10 @@ async def begin_restore_files( :type backup_vault_name: str :param backup_name: The name of the backup. Required. :type backup_name: str - :param body: Restore payload supplied in the body of the operation. Is one of the following - types: BackupRestoreFiles, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupRestoreFiles or JSON or IO[bytes] + :param body: Restore payload supplied in the body of the operation. Is either a + BackupRestoreFiles type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupRestoreFiles or + ~azure.mgmt.netapp.types.BackupRestoreFiles or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -28992,7 +19647,7 @@ async def _migrate_backups_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -29105,7 +19760,7 @@ async def begin_migrate_backups( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -29123,7 +19778,7 @@ async def begin_migrate_backups( :type volume_name: str :param body: Migrate backups under volume payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupsMigrationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -29173,7 +19828,7 @@ async def begin_migrate_backups( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Migrate the backups under volume to backup vault. @@ -29187,9 +19842,10 @@ async def begin_migrate_backups( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Migrate backups under volume payload supplied in the body of the operation. Is one - of the following types: BackupsMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or JSON or IO[bytes] + :param body: Migrate backups under volume payload supplied in the body of the operation. Is + either a BackupsMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or + ~azure.mgmt.netapp.types.BackupsMigrationRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -29355,7 +20011,7 @@ async def _create_initial( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumeInfo, JSON, IO[bytes]], + body: Union[_models.SubvolumeInfo, _types.SubvolumeInfo, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -29480,7 +20136,7 @@ async def begin_create( pool_name: str, volume_name: str, subvolume_name: str, - body: JSON, + body: _types.SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any @@ -29499,7 +20155,7 @@ async def begin_create( :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str :param body: Subvolume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SubvolumeInfo :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -29554,7 +20210,7 @@ async def begin_create( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumeInfo, JSON, IO[bytes]], + body: Union[_models.SubvolumeInfo, _types.SubvolumeInfo, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.SubvolumeInfo]: """Creates a subvolume in the path or clones the subvolume mentioned in the parentPath. @@ -29570,9 +20226,10 @@ async def begin_create( :type volume_name: str :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str - :param body: Subvolume object supplied in the body of the operation. Is one of the following - types: SubvolumeInfo, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SubvolumeInfo or JSON or IO[bytes] + :param body: Subvolume object supplied in the body of the operation. Is either a SubvolumeInfo + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SubvolumeInfo or ~azure.mgmt.netapp.types.SubvolumeInfo + or IO[bytes] :return: An instance of AsyncLROPoller that returns SubvolumeInfo. The SubvolumeInfo is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.SubvolumeInfo] @@ -29640,7 +20297,7 @@ async def _update_initial( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumePatchRequest, JSON, IO[bytes]], + body: Union[_models.SubvolumePatchRequest, _types.SubvolumePatchRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -29761,7 +20418,7 @@ async def begin_update( pool_name: str, volume_name: str, subvolume_name: str, - body: JSON, + body: _types.SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any @@ -29780,7 +20437,7 @@ async def begin_update( :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str :param body: Subvolume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SubvolumePatchRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -29835,7 +20492,7 @@ async def begin_update( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumePatchRequest, JSON, IO[bytes]], + body: Union[_models.SubvolumePatchRequest, _types.SubvolumePatchRequest, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.SubvolumeInfo]: """Patch a subvolume. @@ -29851,9 +20508,10 @@ async def begin_update( :type volume_name: str :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str - :param body: Subvolume object supplied in the body of the operation. Is one of the following - types: SubvolumePatchRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SubvolumePatchRequest or JSON or IO[bytes] + :param body: Subvolume object supplied in the body of the operation. Is either a + SubvolumePatchRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SubvolumePatchRequest or + ~azure.mgmt.netapp.types.SubvolumePatchRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns SubvolumeInfo. The SubvolumeInfo is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.SubvolumeInfo] @@ -30372,7 +21030,12 @@ async def check_name_availability( @overload async def check_name_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.ResourceNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check resource name availability. @@ -30381,7 +21044,7 @@ async def check_name_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ResourceNameAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -30414,7 +21077,10 @@ async def check_name_availability( @distributed_trace_async async def check_name_availability( - self, location: str, body: Union[_models.ResourceNameAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.ResourceNameAvailabilityRequest, _types.ResourceNameAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check resource name availability. @@ -30422,9 +21088,10 @@ async def check_name_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: ResourceNameAvailabilityRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ResourceNameAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a ResourceNameAvailabilityRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.ResourceNameAvailabilityRequest or + ~azure.mgmt.netapp.types.ResourceNameAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -30524,7 +21191,12 @@ async def check_file_path_availability( @overload async def check_file_path_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.FilePathAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -30533,7 +21205,7 @@ async def check_file_path_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.FilePathAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -30566,7 +21238,10 @@ async def check_file_path_availability( @distributed_trace_async async def check_file_path_availability( - self, location: str, body: Union[_models.FilePathAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.FilePathAvailabilityRequest, _types.FilePathAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -30574,9 +21249,10 @@ async def check_file_path_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: FilePathAvailabilityRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.FilePathAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a FilePathAvailabilityRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.FilePathAvailabilityRequest or + ~azure.mgmt.netapp.types.FilePathAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -30676,7 +21352,12 @@ async def check_quota_availability( @overload async def check_quota_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.QuotaAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check quota availability. @@ -30685,7 +21366,7 @@ async def check_quota_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.QuotaAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -30718,7 +21399,10 @@ async def check_quota_availability( @distributed_trace_async async def check_quota_availability( - self, location: str, body: Union[_models.QuotaAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.QuotaAvailabilityRequest, _types.QuotaAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check quota availability. @@ -30726,9 +21410,10 @@ async def check_quota_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: QuotaAvailabilityRequest, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.QuotaAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a QuotaAvailabilityRequest type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.netapp.models.QuotaAvailabilityRequest or + ~azure.mgmt.netapp.types.QuotaAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -30895,7 +21580,12 @@ async def query_network_sibling_set( @overload async def query_network_sibling_set( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.QueryNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.NetworkSiblingSet: """Describe a network sibling set. @@ -30904,7 +21594,7 @@ async def query_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.QueryNetworkSiblingSetRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -30935,7 +21625,10 @@ async def query_network_sibling_set( @distributed_trace_async async def query_network_sibling_set( - self, location: str, body: Union[_models.QueryNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.QueryNetworkSiblingSetRequest, _types.QueryNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> _models.NetworkSiblingSet: """Describe a network sibling set. @@ -30943,9 +21636,10 @@ async def query_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: QueryNetworkSiblingSetRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest or JSON or IO[bytes] + :param body: The request body. Is either a QueryNetworkSiblingSetRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest or + ~azure.mgmt.netapp.types.QueryNetworkSiblingSetRequest or IO[bytes] :return: NetworkSiblingSet. The NetworkSiblingSet is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.NetworkSiblingSet :raises ~azure.core.exceptions.HttpResponseError: @@ -31017,7 +21711,10 @@ async def query_network_sibling_set( return deserialized # type: ignore async def _update_network_sibling_set_initial( - self, location: str, body: Union[_models.UpdateNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.UpdateNetworkSiblingSetRequest, _types.UpdateNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -31114,7 +21811,12 @@ async def begin_update_network_sibling_set( @overload async def begin_update_network_sibling_set( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.UpdateNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkSiblingSet]: """Update the network features of a network sibling set. @@ -31123,7 +21825,7 @@ async def begin_update_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.UpdateNetworkSiblingSetRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -31156,7 +21858,10 @@ async def begin_update_network_sibling_set( @distributed_trace_async async def begin_update_network_sibling_set( - self, location: str, body: Union[_models.UpdateNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.UpdateNetworkSiblingSetRequest, _types.UpdateNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkSiblingSet]: """Update the network features of a network sibling set. @@ -31164,9 +21869,10 @@ async def begin_update_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: UpdateNetworkSiblingSetRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest or JSON or IO[bytes] + :param body: The request body. Is either a UpdateNetworkSiblingSetRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest or + ~azure.mgmt.netapp.types.UpdateNetworkSiblingSetRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns NetworkSiblingSet. The NetworkSiblingSet is compatible with MutableMapping :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.NetworkSiblingSet] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index 8db65dbdfab4..039165f11857 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -16,12 +16,7 @@ from ._models import ( # type: ignore AccountEncryption, AccountProperties, - AccountPropertiesPatch, ActiveDirectory, - ActiveDirectoryConfig, - ActiveDirectoryConfigProperties, - ActiveDirectoryConfigUpdate, - ActiveDirectoryConfigUpdateProperties, AuthorizeRequest, AzureKeyVaultDetails, Backup, @@ -37,8 +32,6 @@ BackupVaultPatch, BackupVaultProperties, BackupsMigrationRequest, - BindPasswordAkvConfig, - BindPasswordAkvConfigPatch, BreakFileLocksRequest, BreakReplicationRequest, Bucket, @@ -59,10 +52,7 @@ CapacityPoolPatch, CertificateAkvDetails, ChangeKeyVault, - ChangeZoneRequest, CheckAvailabilityResponse, - CheckElasticResourceAvailabilityResponse, - CheckElasticVolumeFilePathAvailabilityRequest, CifsUser, ClusterPeerCommandResponse, ClusterPeerCommandResponseProperties, @@ -70,57 +60,8 @@ DailySchedule, DestinationReplication, Dimension, - ElasticAccount, - ElasticAccountProperties, - ElasticAccountUpdate, - ElasticAccountUpdateProperties, - ElasticBackup, - ElasticBackupPolicy, - ElasticBackupPolicyProperties, - ElasticBackupPolicyUpdate, - ElasticBackupPolicyUpdateProperties, - ElasticBackupProperties, - ElasticBackupVault, - ElasticBackupVaultProperties, - ElasticBackupVaultUpdate, - ElasticCapacityPool, - ElasticCapacityPoolProperties, - ElasticCapacityPoolUpdate, - ElasticCapacityPoolUpdateProperties, - ElasticEncryption, - ElasticEncryptionConfiguration, - ElasticEncryptionIdentity, - ElasticExportPolicy, - ElasticExportPolicyRule, - ElasticKeyVaultProperties, - ElasticMountTargetProperties, - ElasticSmbPatchProperties, - ElasticSmbProperties, - ElasticSnapshot, - ElasticSnapshotPolicy, - ElasticSnapshotPolicyDailySchedule, - ElasticSnapshotPolicyHourlySchedule, - ElasticSnapshotPolicyMonthlySchedule, - ElasticSnapshotPolicyProperties, - ElasticSnapshotPolicyUpdate, - ElasticSnapshotPolicyUpdateProperties, - ElasticSnapshotPolicyWeeklySchedule, - ElasticSnapshotProperties, - ElasticVolume, - ElasticVolumeBackupProperties, - ElasticVolumeDataProtectionPatchProperties, - ElasticVolumeDataProtectionProperties, - ElasticVolumeProperties, - ElasticVolumeRevert, - ElasticVolumeSnapshotProperties, - ElasticVolumeUpdate, - ElasticVolumeUpdateProperties, EncryptionIdentity, EncryptionTransitionRequest, - EntraIdAkvConfig, - EntraIdAkvConfigPatch, - EntraIdConfig, - EntraIdConfigPatch, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, @@ -134,8 +75,6 @@ HourlySchedule, KeyVaultPrivateEndpoint, KeyVaultProperties, - LdapConfiguration, - LdapConfigurationPatch, LdapSearchScopeOpt, ListQuotaReportResponse, ListQuotaReportResult, @@ -185,9 +124,6 @@ Resource, ResourceNameAvailabilityRequest, RestoreStatus, - SecretPassword, - SecretPasswordIdentity, - SecretPasswordKeyVaultProperties, ServiceSpecification, SmbSettings, Snapshot, @@ -246,15 +182,12 @@ ApplicationType, AvsDataStore, BackupType, - BindAuthenticationLevel, BreakthroughMode, BucketPatchPermissions, BucketPermissions, CacheFileAccessLogs, CacheLifeCycleState, CacheProvisioningState, - CheckElasticResourceAvailabilityReason, - CheckElasticResourceAvailabilityStatus, CheckNameResourceTypes, CheckQuotaNameResourceTypes, ChownMode, @@ -263,22 +196,7 @@ CoolAccessTieringPolicy, CreatedByType, CredentialsStatus, - DayOfWeek, DesiredRansomwareProtectionState, - ElasticBackupPolicyState, - ElasticBackupType, - ElasticKeyVaultStatus, - ElasticNfsv3Access, - ElasticNfsv4Access, - ElasticPoolEncryptionKeySource, - ElasticProtocolType, - ElasticResourceAvailabilityStatus, - ElasticRootAccess, - ElasticServiceLevel, - ElasticSmbEncryption, - ElasticUnixAccessRule, - ElasticVolumePolicyEnforcement, - ElasticVolumeRestorationState, EnableSubvolumes, EnableWriteBackState, EncryptionKeySource, @@ -293,7 +211,6 @@ KerberosState, KeySource, KeyVaultStatus, - LargeVolumeType, LdapServerType, LdapState, ManagedServiceIdentityType, @@ -304,7 +221,6 @@ NetworkFeatures, NetworkSiblingSetProvisioningState, OnCertificateConflictAction, - PolicyStatus, ProtocolTypes, QosType, QuotaType, @@ -320,13 +236,10 @@ SmbAccessBasedEnumeration, SmbEncryptionState, SmbNonBrowsable, - SnapshotDirectoryVisibility, - SnapshotUsage, VolumeBackupRelationshipStatus, VolumeLanguage, VolumeReplicationRelationshipStatus, VolumeRestoreRelationshipStatus, - VolumeSize, VolumeStorageToNetworkProximity, ) from ._patch import __all__ as _patch_all @@ -336,12 +249,7 @@ __all__ = [ "AccountEncryption", "AccountProperties", - "AccountPropertiesPatch", "ActiveDirectory", - "ActiveDirectoryConfig", - "ActiveDirectoryConfigProperties", - "ActiveDirectoryConfigUpdate", - "ActiveDirectoryConfigUpdateProperties", "AuthorizeRequest", "AzureKeyVaultDetails", "Backup", @@ -357,8 +265,6 @@ "BackupVaultPatch", "BackupVaultProperties", "BackupsMigrationRequest", - "BindPasswordAkvConfig", - "BindPasswordAkvConfigPatch", "BreakFileLocksRequest", "BreakReplicationRequest", "Bucket", @@ -379,10 +285,7 @@ "CapacityPoolPatch", "CertificateAkvDetails", "ChangeKeyVault", - "ChangeZoneRequest", "CheckAvailabilityResponse", - "CheckElasticResourceAvailabilityResponse", - "CheckElasticVolumeFilePathAvailabilityRequest", "CifsUser", "ClusterPeerCommandResponse", "ClusterPeerCommandResponseProperties", @@ -390,57 +293,8 @@ "DailySchedule", "DestinationReplication", "Dimension", - "ElasticAccount", - "ElasticAccountProperties", - "ElasticAccountUpdate", - "ElasticAccountUpdateProperties", - "ElasticBackup", - "ElasticBackupPolicy", - "ElasticBackupPolicyProperties", - "ElasticBackupPolicyUpdate", - "ElasticBackupPolicyUpdateProperties", - "ElasticBackupProperties", - "ElasticBackupVault", - "ElasticBackupVaultProperties", - "ElasticBackupVaultUpdate", - "ElasticCapacityPool", - "ElasticCapacityPoolProperties", - "ElasticCapacityPoolUpdate", - "ElasticCapacityPoolUpdateProperties", - "ElasticEncryption", - "ElasticEncryptionConfiguration", - "ElasticEncryptionIdentity", - "ElasticExportPolicy", - "ElasticExportPolicyRule", - "ElasticKeyVaultProperties", - "ElasticMountTargetProperties", - "ElasticSmbPatchProperties", - "ElasticSmbProperties", - "ElasticSnapshot", - "ElasticSnapshotPolicy", - "ElasticSnapshotPolicyDailySchedule", - "ElasticSnapshotPolicyHourlySchedule", - "ElasticSnapshotPolicyMonthlySchedule", - "ElasticSnapshotPolicyProperties", - "ElasticSnapshotPolicyUpdate", - "ElasticSnapshotPolicyUpdateProperties", - "ElasticSnapshotPolicyWeeklySchedule", - "ElasticSnapshotProperties", - "ElasticVolume", - "ElasticVolumeBackupProperties", - "ElasticVolumeDataProtectionPatchProperties", - "ElasticVolumeDataProtectionProperties", - "ElasticVolumeProperties", - "ElasticVolumeRevert", - "ElasticVolumeSnapshotProperties", - "ElasticVolumeUpdate", - "ElasticVolumeUpdateProperties", "EncryptionIdentity", "EncryptionTransitionRequest", - "EntraIdAkvConfig", - "EntraIdAkvConfigPatch", - "EntraIdConfig", - "EntraIdConfigPatch", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", @@ -454,8 +308,6 @@ "HourlySchedule", "KeyVaultPrivateEndpoint", "KeyVaultProperties", - "LdapConfiguration", - "LdapConfigurationPatch", "LdapSearchScopeOpt", "ListQuotaReportResponse", "ListQuotaReportResult", @@ -505,9 +357,6 @@ "Resource", "ResourceNameAvailabilityRequest", "RestoreStatus", - "SecretPassword", - "SecretPasswordIdentity", - "SecretPasswordKeyVaultProperties", "ServiceSpecification", "SmbSettings", "Snapshot", @@ -563,15 +412,12 @@ "ApplicationType", "AvsDataStore", "BackupType", - "BindAuthenticationLevel", "BreakthroughMode", "BucketPatchPermissions", "BucketPermissions", "CacheFileAccessLogs", "CacheLifeCycleState", "CacheProvisioningState", - "CheckElasticResourceAvailabilityReason", - "CheckElasticResourceAvailabilityStatus", "CheckNameResourceTypes", "CheckQuotaNameResourceTypes", "ChownMode", @@ -580,22 +426,7 @@ "CoolAccessTieringPolicy", "CreatedByType", "CredentialsStatus", - "DayOfWeek", "DesiredRansomwareProtectionState", - "ElasticBackupPolicyState", - "ElasticBackupType", - "ElasticKeyVaultStatus", - "ElasticNfsv3Access", - "ElasticNfsv4Access", - "ElasticPoolEncryptionKeySource", - "ElasticProtocolType", - "ElasticResourceAvailabilityStatus", - "ElasticRootAccess", - "ElasticServiceLevel", - "ElasticSmbEncryption", - "ElasticUnixAccessRule", - "ElasticVolumePolicyEnforcement", - "ElasticVolumeRestorationState", "EnableSubvolumes", "EnableWriteBackState", "EncryptionKeySource", @@ -610,7 +441,6 @@ "KerberosState", "KeySource", "KeyVaultStatus", - "LargeVolumeType", "LdapServerType", "LdapState", "ManagedServiceIdentityType", @@ -621,7 +451,6 @@ "NetworkFeatures", "NetworkSiblingSetProvisioningState", "OnCertificateConflictAction", - "PolicyStatus", "ProtocolTypes", "QosType", "QuotaType", @@ -637,13 +466,10 @@ "SmbAccessBasedEnumeration", "SmbEncryptionState", "SmbNonBrowsable", - "SnapshotDirectoryVisibility", - "SnapshotUsage", "VolumeBackupRelationshipStatus", "VolumeLanguage", "VolumeReplicationRelationshipStatus", "VolumeRestoreRelationshipStatus", - "VolumeSize", "VolumeStorageToNetworkProximity", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py index ac14b803aa87..6645c020c9b5 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -82,15 +81,6 @@ class BackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Scheduled backup.""" -class BindAuthenticationLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The authentication level to use when binding to the LDAP server.""" - - ANONYMOUS = "Anonymous" - """Anonymous bind i.e. no credentials provided.""" - SIMPLE = "Simple" - """Simple bind i.e. plain text credentials provided.""" - - class BreakthroughMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies whether the volume operates in Breakthrough Mode. When set to 'Enabled', the volume runs on the resources configured for this mode, delivering improved performance and higher @@ -169,24 +159,6 @@ class CacheProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource creation was canceled.""" -class CheckElasticResourceAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Availability reason.""" - - INVALID = "Invalid" - """Value indicating the name provided does not match Azure NetApp Files naming requirements.""" - ALREADY_EXISTS = "AlreadyExists" - """Value indicating the name is already in use and is therefore unavailable.""" - - -class CheckElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Availability status.""" - - TRUE = "True" - """Value indicating the name is valid and available.""" - FALSE = "False" - """Value indicating the the name is invalid, unavailable, or both.""" - - class CheckNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource type used for verification.""" @@ -313,25 +285,6 @@ class CredentialsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): unexpired.""" -class DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Day of the week.""" - - SUNDAY = "Sunday" - """Take a snapshot each Sunday.""" - MONDAY = "Monday" - """Take a snapshot each Monday.""" - TUESDAY = "Tuesday" - """Take a snapshot each Tuesday.""" - WEDNESDAY = "Wednesday" - """Take a snapshot each Wednesday.""" - THURSDAY = "Thursday" - """Take a snapshot each Thursday.""" - FRIDAY = "Friday" - """Take a snapshot each Friday.""" - SATURDAY = "Saturday" - """Take a snapshot each Saturday.""" - - class DesiredRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The desired state of the Advanced Ransomware Protection feature.""" @@ -341,144 +294,10 @@ class DesiredRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumM """Advanced Ransomware Protection is enabled.""" -class ElasticBackupPolicyState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Elastic Backup Policy state.""" - - ENABLED = "Enabled" - """Value indicating the policy is enabled.""" - DISABLED = "Disabled" - """Value indicating the policy is disabled.""" - - -class ElasticBackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of backup.""" - - MANUAL = "Manual" - """Manual backup type.""" - SCHEDULED = "Scheduled" - """Scheduled backup type.""" - - -class ElasticKeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """KeyVault status.""" - - CREATED = "Created" - """KeyVault connection created but not in use.""" - IN_USE = "InUse" - """KeyVault connection in use by SMB Volume.""" - DELETED = "Deleted" - """KeyVault connection Deleted.""" - ERROR = "Error" - """Error with the KeyVault connection.""" - UPDATING = "Updating" - """KeyVault connection Updating.""" - - -class ElasticNfsv3Access(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """NFSv3 access.""" - - ENABLED = "Enabled" - """Clients can connect to the volume using the NFSv3 protocol.""" - DISABLED = "Disabled" - """Clients can't connect to the volume using the NFSv3 protocol.""" - - -class ElasticNfsv4Access(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """NFSv4 access.""" - - ENABLED = "Enabled" - """Clients can connect to the volume using the NFSv4 protocol.""" - DISABLED = "Disabled" - """Clients can't connect to the volume using the NFSv4 protocol.""" - - -class ElasticPoolEncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Pool Encryption Key Source.""" - - NET_APP = "NetApp" - """Represents the encryption key source of Elastic pool is Microsoft.NetApp.""" - KEY_VAULT = "KeyVault" - """Represents the encryption key source of Elastic pool is Microsoft.KeyVault.""" - - -class ElasticProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Protocol types for elastic volume.""" - - NF_SV3 = "NFSv3" - """NFSv3 protocol type.""" - NF_SV4 = "NFSv4" - """NFSv4 protocol type.""" - SMB = "SMB" - """SMB/CIFS protocol type.""" - - -class ElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current availability status of the resource.""" - - ONLINE = "Online" - """The resource is currently Online and accessible.""" - OFFLINE = "Offline" - """The resource is currently Offline and not accessible.""" - - -class ElasticRootAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Root access.""" - - ENABLED = "Enabled" - """Root user access is enabled for clients affected by this rule.""" - DISABLED = "Disabled" - """Root user access is disabled for clients affected by this rule.""" - - -class ElasticServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Service level for elastic capacity pool.""" - - ZONE_REDUNDANT = "ZoneRedundant" - """Zone redundant storage service level.""" - - -class ElasticSmbEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SMB encryption.""" - - ENABLED = "Enabled" - """Value indicating the SMB encryption is enabled.""" - DISABLED = "Disabled" - """Value indicating the SMB encryption is disabled.""" - - -class ElasticUnixAccessRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Unix access rule.""" - - READ_ONLY = "ReadOnly" - """Clients connecting with this rule will only have read access to the volume.""" - READ_WRITE = "ReadWrite" - """Clients connecting with this rule will have full read and write access to the volume.""" - NO_ACCESS = "NoAccess" - """Clients connecting with this rule will have no access to the volume.""" - - -class ElasticVolumePolicyEnforcement(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Policy enforcement.""" - - ENFORCED = "Enforced" - """Value indicating the policy is enforced on the volume.""" - NOT_ENFORCED = "NotEnforced" - """Value indicating the policy is not enforced on the volume.""" - - -class ElasticVolumeRestorationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current state of the restoration process.""" - - RESTORING = "Restoring" - """Value indicating that the volume is currently restoring.""" - RESTORED = "Restored" - """Value indicating that the volume is restored.""" - FAILED = "Failed" - """Value indicating that the volume restore has failed.""" - - class EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Flag indicating whether subvolume operations are enabled on the volume.""" + """Flag indicating whether subvolume operations are enabled on the volume Deprecated. This type + will be removed in a future API version. + """ ENABLED = "Enabled" """subvolumes are enabled.""" @@ -633,21 +452,6 @@ class KeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """KeyVault connection Updating.""" -class LargeVolumeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created - with standard configuration. If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume - is created with higher capacity limit 7.2PiB with cool access enabled, delivering higher - capacity limit with lower costs. - """ - - LARGE_VOLUME = "LargeVolume" - """The large volume is created with standard configuration that provides standard performance and - throughput.""" - EXTRA_LARGE_VOLUME7_DOT2_PI_B = "PremExtraLargeVolume7Dot2PiB" - """The extra large volume is created with higher volume capacity limit 7.2PiB with cool access - enabled, delivering higher capacity limit with lower costs.""" - - class LdapServerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the LDAP server.""" @@ -774,15 +578,6 @@ class OnCertificateConflictAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): existing certificate will continue to be in use.""" -class PolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Policy status.""" - - ENABLED = "Enabled" - """Value indicating the policy is enabled.""" - DISABLED = "Disabled" - """Value indicating the policy is disabled.""" - - class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" @@ -956,26 +751,6 @@ class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta): """smbNonBrowsable share setting is enabled.""" -class SnapshotDirectoryVisibility(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides - access to each of the volume's snapshots. - """ - - HIDDEN = "Hidden" - """Value indicating the read-only snapshot directory is not visible.""" - VISIBLE = "Visible" - """Value indicating the read-only snapshot directory is visible.""" - - -class SnapshotUsage(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Snapshot usage for backup.""" - - USE_EXISTING_SNAPSHOT = "UseExistingSnapshot" - """Value indicating an existing snapshot is used.""" - CREATE_NEW_SNAPSHOT = "CreateNewSnapshot" - """Value indicating a new snapshot is created.""" - - class VolumeBackupRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Status of the volume backup relationship.""" @@ -1154,15 +929,6 @@ class VolumeRestoreRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMe """UNKNOWN.""" -class VolumeSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Volume size for backup.""" - - LARGE = "Large" - """Value indicating backup is for a large volume.""" - REGULAR = "Regular" - """Value indicating backup is not for a large volume.""" - - class VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provides storage to network proximity information for the volume.""" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py index d505d9e056c5..eaba0a238a3e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py @@ -73,8 +73,6 @@ class AccountProperties(_Model): :vartype provisioning_state: str :ivar active_directories: Active Directories. :vartype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] - :ivar entra_id_config: Entra ID configuration for the account. - :vartype entra_id_config: ~azure.mgmt.netapp.models.EntraIdConfig :ivar encryption: Encryption settings. :vartype encryption: ~azure.mgmt.netapp.models.AccountEncryption :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the @@ -86,8 +84,6 @@ class AccountProperties(_Model): :ivar multi_ad_status: MultiAD Status for the account. Known values are: "Disabled" and "Enabled". :vartype multi_ad_status: str or ~azure.mgmt.netapp.models.MultiAdStatus - :ivar ldap_configuration: LDAP Configuration for the account. - :vartype ldap_configuration: ~azure.mgmt.netapp.models.LdapConfiguration """ provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) @@ -96,10 +92,6 @@ class AccountProperties(_Model): name="activeDirectories", visibility=["read", "create", "update", "delete", "query"] ) """Active Directories.""" - entra_id_config: Optional["_models.EntraIdConfig"] = rest_field( - name="entraIdConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """Entra ID configuration for the account.""" encryption: Optional["_models.AccountEncryption"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -115,70 +107,6 @@ class AccountProperties(_Model): name="multiAdStatus", visibility=["read"] ) """MultiAD Status for the account. Known values are: \"Disabled\" and \"Enabled\".""" - ldap_configuration: Optional["_models.LdapConfiguration"] = rest_field( - name="ldapConfiguration", visibility=["read", "create", "update", "delete", "query"] - ) - """LDAP Configuration for the account.""" - - @overload - def __init__( - self, - *, - active_directories: Optional[list["_models.ActiveDirectory"]] = None, - entra_id_config: Optional["_models.EntraIdConfig"] = None, - encryption: Optional["_models.AccountEncryption"] = None, - nfs_v4_id_domain: Optional[str] = None, - ldap_configuration: Optional["_models.LdapConfiguration"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class AccountPropertiesPatch(_Model): - """NetApp account patch properties. - - :ivar active_directories: Active Directories. - :vartype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] - :ivar encryption: Encryption settings. - :vartype encryption: ~azure.mgmt.netapp.models.AccountEncryption - :ivar nfs_v4_id_domain: 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. - :vartype nfs_v4_id_domain: str - :ivar entra_id_config: Entra ID configuration for the account. - :vartype entra_id_config: ~azure.mgmt.netapp.models.EntraIdConfigPatch - :ivar ldap_configuration: LDAP Configuration for the account. - :vartype ldap_configuration: ~azure.mgmt.netapp.models.LdapConfigurationPatch - """ - - active_directories: Optional[list["_models.ActiveDirectory"]] = rest_field( - name="activeDirectories", visibility=["read", "create", "update", "delete", "query"] - ) - """Active Directories.""" - encryption: Optional["_models.AccountEncryption"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Encryption settings.""" - nfs_v4_id_domain: Optional[str] = rest_field( - name="nfsV4IDDomain", visibility=["read", "create", "update", "delete", "query"] - ) - """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.""" - entra_id_config: Optional["_models.EntraIdConfigPatch"] = rest_field( - name="entraIdConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """Entra ID configuration for the account.""" - ldap_configuration: Optional["_models.LdapConfigurationPatch"] = rest_field( - name="ldapConfiguration", visibility=["read", "create", "update", "delete", "query"] - ) - """LDAP Configuration for the account.""" @overload def __init__( @@ -187,8 +115,6 @@ def __init__( active_directories: Optional[list["_models.ActiveDirectory"]] = None, encryption: Optional["_models.AccountEncryption"] = None, nfs_v4_id_domain: Optional[str] = None, - entra_id_config: Optional["_models.EntraIdConfigPatch"] = None, - ldap_configuration: Optional["_models.LdapConfigurationPatch"] = None, ) -> None: ... @overload @@ -390,6 +316,88 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class AuthorizeRequest(_Model): + """Authorize request. + + :ivar remote_volume_resource_id: Resource id of the remote volume. + :vartype remote_volume_resource_id: str + """ + + remote_volume_resource_id: Optional[str] = rest_field( + name="remoteVolumeResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource id of the remote volume.""" + + @overload + def __init__( + self, + *, + remote_volume_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AzureKeyVaultDetails(_Model): + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + + 2. These properties are mutually exclusive with the server.certificateObject property. + + :ivar certificate_akv_details: Specifies the Azure Key Vault settings for retrieving the bucket + server certificate. + :vartype certificate_akv_details: ~azure.mgmt.netapp.models.CertificateAkvDetails + :ivar credentials_akv_details: Specifies the Azure Key Vault settings for storing the bucket + credentials. + :vartype credentials_akv_details: ~azure.mgmt.netapp.models.CredentialsAkvDetails + """ + + certificate_akv_details: Optional["_models.CertificateAkvDetails"] = rest_field( + name="certificateAkvDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Azure Key Vault settings for retrieving the bucket server certificate.""" + credentials_akv_details: Optional["_models.CredentialsAkvDetails"] = rest_field( + name="credentialsAkvDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Azure Key Vault settings for storing the bucket credentials.""" + + @overload + def __init__( + self, + *, + certificate_akv_details: Optional["_models.CertificateAkvDetails"] = None, + credentials_akv_details: Optional["_models.CredentialsAkvDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class Resource(_Model): """Resource. @@ -418,8 +426,8 @@ class Resource(_Model): """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" -class TrackedResource(Resource): - """Tracked Resource. +class ProxyResource(Resource): + """Proxy Resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -432,23 +440,52 @@ class TrackedResource(Resource): :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str """ - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - location: str = rest_field(visibility=["read", "create"]) - """The geo-location where the resource lives. Required.""" + +class Backup(ProxyResource): + """Backup under a Backup Vault. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData + :ivar properties: Backup Properties. Required. + :vartype properties: ~azure.mgmt.netapp.models.BackupProperties + """ + + properties: "_models.BackupProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Backup Properties. Required.""" + + __flattened_items = [ + "backup_id", + "creation_date", + "snapshot_creation_date", + "completion_date", + "provisioning_state", + "size", + "label", + "backup_type", + "failure_reason", + "volume_resource_id", + "use_existing_snapshot", + "snapshot_name", + "backup_policy_resource_id", + "is_large_volume", + ] @overload def __init__( self, *, - location: str, - tags: Optional[dict[str, str]] = None, + properties: "_models.BackupProperties", ) -> None: ... @overload @@ -459,60 +496,46 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) -class ActiveDirectoryConfig(TrackedResource): - """Active Directory Configuration resource. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ActiveDirectoryConfigProperties - :ivar etag: "If etag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). - :vartype etag: str - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity +class BackupPatch(_Model): + """Backup patch. + + :ivar properties: Backup Patch Properties. + :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties """ - properties: Optional["_models.ActiveDirectoryConfigProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - etag: Optional[str] = rest_field(visibility=["read"]) - """\"If etag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" - identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + properties: Optional["_models.BackupPatchProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The managed service identities assigned to this resource.""" + """Backup Patch Properties.""" + + __flattened_items = ["label"] @overload def __init__( self, *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ActiveDirectoryConfigProperties"] = None, - identity: Optional["_models.ManagedServiceIdentity"] = None, + properties: Optional["_models.BackupPatchProperties"] = None, ) -> None: ... @overload @@ -523,106 +546,42 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") -class ActiveDirectoryConfigProperties(_Model): - """Active Directory Configuration properties. - - :ivar user_name: A domain user account with permission to create machine accounts. - :vartype user_name: str - :ivar dns: An array of DNS server IP addresses(IPv4 only) for the Active Directory. - :vartype dns: list[str] - :ivar smb_server_name: NetBIOS name of the SMB server. This name will be registered as a - computer account in the AD and used to mount volumes. - :vartype smb_server_name: str - :ivar organizational_unit: The Organizational Unit (OU) within the Windows Active Directory. - :vartype organizational_unit: str - :ivar site: The Active Directory site the service will limit Domain Controller discovery to. - Required. - :vartype site: str - :ivar backup_operators: Users to be added to the Built-in Backup Operator active directory - group. A list of unique usernames without domain specifier. - :vartype backup_operators: list[str] - :ivar administrators: Users to be added to the Built-in Administrators active directory group. - A list of unique usernames without domain specifier. - :vartype administrators: list[str] - :ivar security_operators: Domain Users in the Active directory to be given SecurityPrivilege - privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames - without domain specifier. - :vartype security_operators: list[str] - :ivar active_directory_status: Status of the Active Directory. Known values are: "Created", - "InUse", "Deleted", "Error", and "Updating". - :vartype active_directory_status: str or ~azure.mgmt.netapp.models.ActiveDirectoryStatus - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar domain: Name of the Active Directory domain. Required. - :vartype domain: str - :ivar secret_password: Access password from Azure KeyVault Secrets to connect Active Directory. - Required. - :vartype secret_password: ~azure.mgmt.netapp.models.SecretPassword + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BackupPatchProperties(_Model): + """Backup patch properties. + + :ivar label: Label for backup. + :vartype label: str """ - user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"]) - """A domain user account with permission to create machine accounts.""" - dns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of DNS server IP addresses(IPv4 only) for the Active Directory.""" - smb_server_name: Optional[str] = rest_field( - name="smbServerName", visibility=["read", "create", "update", "delete", "query"] - ) - """NetBIOS name of the SMB server. This name will be registered as a computer account in the AD - and used to mount volumes.""" - organizational_unit: Optional[str] = rest_field( - name="organizationalUnit", visibility=["read", "create", "update", "delete", "query"] - ) - """The Organizational Unit (OU) within the Windows Active Directory.""" - site: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The Active Directory site the service will limit Domain Controller discovery to. Required.""" - backup_operators: Optional[list[str]] = rest_field( - name="backupOperators", visibility=["read", "create", "update", "delete", "query"] - ) - """Users to be added to the Built-in Backup Operator active directory group. A list of unique - usernames without domain specifier.""" - administrators: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Users to be added to the Built-in Administrators active directory group. A list of unique - usernames without domain specifier.""" - security_operators: Optional[list[str]] = rest_field( - name="securityOperators", visibility=["read", "create", "update", "delete", "query"] - ) - """Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB - Continuously available shares for SQL). A list of unique usernames without domain specifier.""" - active_directory_status: Optional[Union[str, "_models.ActiveDirectoryStatus"]] = rest_field( - name="activeDirectoryStatus", visibility=["read"] - ) - """Status of the Active Directory. Known values are: \"Created\", \"InUse\", \"Deleted\", - \"Error\", and \"Updating\".""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - domain: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Name of the Active Directory domain. Required.""" - secret_password: "_models.SecretPassword" = rest_field( - name="secretPassword", visibility=["read", "create", "update", "delete", "query"] - ) - """Access password from Azure KeyVault Secrets to connect Active Directory. Required.""" + label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Label for backup.""" @overload def __init__( self, *, - site: str, - domain: str, - secret_password: "_models.SecretPassword", - user_name: Optional[str] = None, - dns: Optional[list[str]] = None, - smb_server_name: Optional[str] = None, - organizational_unit: Optional[str] = None, - backup_operators: Optional[list[str]] = None, - administrators: Optional[list[str]] = None, - security_operators: Optional[list[str]] = None, + label: Optional[str] = None, ) -> None: ... @overload @@ -636,35 +595,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ActiveDirectoryConfigUpdate(_Model): - """The type used for update operations of the ActiveDirectoryConfig. +class TrackedResource(Resource): + """Tracked Resource. - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdateProperties + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str """ - identity: Optional["_models.ManagedServiceIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The managed service identities assigned to this resource.""" tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" @overload def __init__( self, *, - identity: Optional["_models.ManagedServiceIdentity"] = None, + location: str, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = None, ) -> None: ... @overload @@ -678,85 +639,61 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ActiveDirectoryConfigUpdateProperties(_Model): - """The updatable properties of the ActiveDirectoryConfig. +class BackupPolicy(TrackedResource): + """Backup policy information. - :ivar user_name: A domain user account with permission to create machine accounts. - :vartype user_name: str - :ivar dns: An array of DNS server IP addresses(IPv4 only) for the Active Directory. - :vartype dns: list[str] - :ivar smb_server_name: NetBIOS name of the SMB server. This name will be registered as a - computer account in the AD and used to mount volumes. - :vartype smb_server_name: str - :ivar organizational_unit: The Organizational Unit (OU) within the Windows Active Directory. - :vartype organizational_unit: str - :ivar site: The Active Directory site the service will limit Domain Controller discovery to. - :vartype site: str - :ivar backup_operators: Users to be added to the Built-in Backup Operator active directory - group. A list of unique usernames without domain specifier. - :vartype backup_operators: list[str] - :ivar administrators: Users to be added to the Built-in Administrators active directory group. - A list of unique usernames without domain specifier. - :vartype administrators: list[str] - :ivar security_operators: Domain Users in the Active directory to be given SecurityPrivilege - privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames - without domain specifier. - :vartype security_operators: list[str] - :ivar domain: Name of the Active Directory domain. - :vartype domain: str - :ivar secret_password: Access password from Azure KeyVault Secrets to connect Active Directory. - :vartype secret_password: ~azure.mgmt.netapp.models.SecretPassword + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Backup policy Properties. Required. + :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str """ - user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"]) - """A domain user account with permission to create machine accounts.""" - dns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of DNS server IP addresses(IPv4 only) for the Active Directory.""" - smb_server_name: Optional[str] = rest_field( - name="smbServerName", visibility=["read", "create", "update", "delete", "query"] - ) - """NetBIOS name of the SMB server. This name will be registered as a computer account in the AD - and used to mount volumes.""" - organizational_unit: Optional[str] = rest_field( - name="organizationalUnit", visibility=["read", "create", "update", "delete", "query"] - ) - """The Organizational Unit (OU) within the Windows Active Directory.""" - site: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The Active Directory site the service will limit Domain Controller discovery to.""" - backup_operators: Optional[list[str]] = rest_field( - name="backupOperators", visibility=["read", "create", "update", "delete", "query"] - ) - """Users to be added to the Built-in Backup Operator active directory group. A list of unique - usernames without domain specifier.""" - administrators: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Users to be added to the Built-in Administrators active directory group. A list of unique - usernames without domain specifier.""" - security_operators: Optional[list[str]] = rest_field( - name="securityOperators", visibility=["read", "create", "update", "delete", "query"] - ) - """Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB - Continuously available shares for SQL). A list of unique usernames without domain specifier.""" - domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Name of the Active Directory domain.""" - secret_password: Optional["_models.SecretPassword"] = rest_field( - name="secretPassword", visibility=["read", "create", "update", "delete", "query"] + properties: "_models.BackupPolicyProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Access password from Azure KeyVault Secrets to connect Active Directory.""" + """Backup policy Properties. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + __flattened_items = [ + "backup_policy_id", + "provisioning_state", + "daily_backups_to_keep", + "weekly_backups_to_keep", + "monthly_backups_to_keep", + "volumes_assigned", + "enabled", + "volume_backups", + ] @overload def __init__( self, *, - user_name: Optional[str] = None, - dns: Optional[list[str]] = None, - smb_server_name: Optional[str] = None, - organizational_unit: Optional[str] = None, - site: Optional[str] = None, - backup_operators: Optional[list[str]] = None, - administrators: Optional[list[str]] = None, - security_operators: Optional[list[str]] = None, - domain: Optional[str] = None, - secret_password: Optional["_models.SecretPassword"] = None, + location: str, + properties: "_models.BackupPolicyProperties", + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -767,151 +704,77 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") -class AuthorizeRequest(_Model): - """Authorize request. + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) - :ivar remote_volume_resource_id: Resource id of the remote volume. - :vartype remote_volume_resource_id: str + +class BackupPolicyPatch(_Model): + """Backup policy Details for create and update. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Backup policy Properties. + :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties """ - remote_volume_resource_id: Optional[str] = rest_field( - name="remoteVolumeResourceId", visibility=["read", "create", "update", "delete", "query"] + location: Optional[str] = rest_field(visibility=["read", "create"]) + """Resource location.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Resource Id.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + properties: Optional["_models.BackupPolicyProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Resource id of the remote volume.""" - - @overload - def __init__( - self, - *, - remote_volume_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class AzureKeyVaultDetails(_Model): - """Specifies the Azure Key Vault settings. These are used when - a) retrieving the bucket server certificate, and - b) storing the bucket credentials - - Notes: - - - - 1. If a bucket certificate was previously provided directly using the certificateObject - property, it is possible to subsequently use the Azure Key Vault for certificate management by - using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no - longer possible to provide the certificate directly via the certificateObject property. - - 2. These properties are mutually exclusive with the server.certificateObject property. - - :ivar certificate_akv_details: Specifies the Azure Key Vault settings for retrieving the bucket - server certificate. - :vartype certificate_akv_details: ~azure.mgmt.netapp.models.CertificateAkvDetails - :ivar credentials_akv_details: Specifies the Azure Key Vault settings for storing the bucket - credentials. - :vartype credentials_akv_details: ~azure.mgmt.netapp.models.CredentialsAkvDetails - """ - - certificate_akv_details: Optional["_models.CertificateAkvDetails"] = rest_field( - name="certificateAkvDetails", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the Azure Key Vault settings for retrieving the bucket server certificate.""" - credentials_akv_details: Optional["_models.CredentialsAkvDetails"] = rest_field( - name="credentialsAkvDetails", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the Azure Key Vault settings for storing the bucket credentials.""" - - @overload - def __init__( - self, - *, - certificate_akv_details: Optional["_models.CertificateAkvDetails"] = None, - credentials_akv_details: Optional["_models.CredentialsAkvDetails"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ProxyResource(Resource): - """Proxy Resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - """ - - -class Backup(ProxyResource): - """Backup under a Backup Vault. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar properties: Backup Properties. Required. - :vartype properties: ~azure.mgmt.netapp.models.BackupProperties - """ - - properties: "_models.BackupProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Backup Properties. Required.""" + """Backup policy Properties.""" __flattened_items = [ - "backup_id", - "creation_date", - "snapshot_creation_date", - "completion_date", + "backup_policy_id", "provisioning_state", - "size", - "label", - "backup_type", - "failure_reason", - "volume_resource_id", - "use_existing_snapshot", - "snapshot_name", - "backup_policy_resource_id", - "is_large_volume", + "daily_backups_to_keep", + "weekly_backups_to_keep", + "monthly_backups_to_keep", + "volumes_assigned", + "enabled", + "volume_backups", ] @overload def __init__( self, *, - properties: "_models.BackupProperties", + location: Optional[str] = None, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.BackupPolicyProperties"] = None, ) -> None: ... @overload @@ -943,25 +806,58 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class BackupPatch(_Model): - """Backup patch. +class BackupPolicyProperties(_Model): + """Backup policy properties. - :ivar properties: Backup Patch Properties. - :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties + :ivar backup_policy_id: Backup Policy GUID ID. + :vartype backup_policy_id: str + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar daily_backups_to_keep: Daily backups count to keep. + :vartype daily_backups_to_keep: int + :ivar weekly_backups_to_keep: Weekly backups count to keep. + :vartype weekly_backups_to_keep: int + :ivar monthly_backups_to_keep: Monthly backups count to keep. + :vartype monthly_backups_to_keep: int + :ivar volumes_assigned: Volumes using current backup policy. + :vartype volumes_assigned: int + :ivar enabled: The property to decide policy is enabled or not. + :vartype enabled: bool + :ivar volume_backups: A list of volumes assigned to this policy. + :vartype volume_backups: list[~azure.mgmt.netapp.models.VolumeBackups] """ - properties: Optional["_models.BackupPatchProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + backup_policy_id: Optional[str] = rest_field(name="backupPolicyId", visibility=["read"]) + """Backup Policy GUID ID.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """Azure lifecycle management.""" + daily_backups_to_keep: Optional[int] = rest_field( + name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] ) - """Backup Patch Properties.""" - - __flattened_items = ["label"] + """Daily backups count to keep.""" + weekly_backups_to_keep: Optional[int] = rest_field( + name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] + ) + """Weekly backups count to keep.""" + monthly_backups_to_keep: Optional[int] = rest_field( + name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] + ) + """Monthly backups count to keep.""" + volumes_assigned: Optional[int] = rest_field(name="volumesAssigned", visibility=["read"]) + """Volumes using current backup policy.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The property to decide policy is enabled or not.""" + volume_backups: Optional[list["_models.VolumeBackups"]] = rest_field(name="volumeBackups", visibility=["read"]) + """A list of volumes assigned to this policy.""" @overload def __init__( self, *, - properties: Optional["_models.BackupPatchProperties"] = None, + daily_backups_to_keep: Optional[int] = None, + weekly_backups_to_keep: Optional[int] = None, + monthly_backups_to_keep: Optional[int] = None, + enabled: Optional[bool] = None, ) -> None: ... @overload @@ -972,47 +868,91 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) -class BackupPatchProperties(_Model): - """Backup patch properties. +class BackupProperties(_Model): + """Backup properties. + :ivar backup_id: UUID v4 used to identify the Backup. + :vartype backup_id: str + :ivar creation_date: The creation date of the backup. + :vartype creation_date: ~datetime.datetime + :ivar snapshot_creation_date: The snapshot creation date of the backup. + :vartype snapshot_creation_date: ~datetime.datetime + :ivar completion_date: The completion date of the backup. + :vartype completion_date: ~datetime.datetime + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar size: Size of backup in bytes. + :vartype size: int :ivar label: Label for backup. :vartype label: str + :ivar backup_type: Type of backup Manual or Scheduled. Known values are: "Manual" and + "Scheduled". + :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType + :ivar failure_reason: Failure reason. + :vartype failure_reason: str + :ivar volume_resource_id: ResourceId used to identify the Volume. Required. + :vartype volume_resource_id: str + :ivar use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :vartype use_existing_snapshot: bool + :ivar snapshot_name: The name of the snapshot. + :vartype snapshot_name: str + :ivar backup_policy_resource_id: ResourceId used to identify the backup policy. + :vartype backup_policy_resource_id: str + :ivar is_large_volume: Specifies if the backup is for a large volume. + :vartype is_large_volume: bool """ + backup_id: Optional[str] = rest_field(name="backupId", visibility=["read"]) + """UUID v4 used to identify the Backup.""" + creation_date: Optional[datetime.datetime] = rest_field(name="creationDate", visibility=["read"], format="rfc3339") + """The creation date of the backup.""" + snapshot_creation_date: Optional[datetime.datetime] = rest_field( + name="snapshotCreationDate", visibility=["read"], format="rfc3339" + ) + """The snapshot creation date of the backup.""" + completion_date: Optional[datetime.datetime] = rest_field( + name="completionDate", visibility=["read"], format="rfc3339" + ) + """The completion date of the backup.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """Azure lifecycle management.""" + size: Optional[int] = rest_field(visibility=["read"]) + """Size of backup in bytes.""" label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Label for backup.""" - - @overload - def __init__( - self, - *, - label: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ + backup_type: Optional[Union[str, "_models.BackupType"]] = rest_field(name="backupType", visibility=["read"]) + """Type of backup Manual or Scheduled. Known values are: \"Manual\" and \"Scheduled\".""" + failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"]) + """Failure reason.""" + volume_resource_id: str = rest_field(name="volumeResourceId", visibility=["read", "create"]) + """ResourceId used to identify the Volume. Required.""" + use_existing_snapshot: Optional[bool] = rest_field(name="useExistingSnapshot", visibility=["read", "create"]) + """Manual backup an already existing snapshot. This will always be false for scheduled backups and + true/false for manual backups.""" + snapshot_name: Optional[str] = rest_field(name="snapshotName", visibility=["read", "create"]) + """The name of the snapshot.""" + backup_policy_resource_id: Optional[str] = rest_field(name="backupPolicyResourceId", visibility=["read"]) + """ResourceId used to identify the backup policy.""" + is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read"]) + """Specifies if the backup is for a large volume.""" + + @overload + def __init__( + self, + *, + volume_resource_id: str, + label: Optional[str] = None, + use_existing_snapshot: Optional[bool] = None, + snapshot_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ @@ -1021,8 +961,132 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BackupPolicy(TrackedResource): - """Backup policy information. +class BackupRestoreFiles(_Model): + """Restore payload for Single File Backup Restore. + + :ivar file_list: List of files to be restored. Required. + :vartype file_list: list[str] + :ivar restore_file_path: Destination folder where the files will be restored. The path name + should start with a forward slash. If it is omitted from request then restore is done at the + root folder of the destination volume by default. + :vartype restore_file_path: str + :ivar destination_volume_id: Resource Id of the destination volume on which the files need to + be restored. Required. + :vartype destination_volume_id: str + """ + + file_list: list[str] = rest_field(name="fileList", visibility=["read", "create", "update", "delete", "query"]) + """List of files to be restored. Required.""" + restore_file_path: Optional[str] = rest_field( + name="restoreFilePath", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination folder where the files will be restored. The path name should start with a forward + slash. If it is omitted from request then restore is done at the root folder of the destination + volume by default.""" + destination_volume_id: str = rest_field( + name="destinationVolumeId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource Id of the destination volume on which the files need to be restored. Required.""" + + @overload + def __init__( + self, + *, + file_list: list[str], + destination_volume_id: str, + restore_file_path: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackupsMigrationRequest(_Model): + """Migrate Backups Request. + + :ivar backup_vault_id: The ResourceId of the Backup Vault. Required. + :vartype backup_vault_id: str + """ + + backup_vault_id: str = rest_field(name="backupVaultId", visibility=["read", "create", "update", "delete", "query"]) + """The ResourceId of the Backup Vault. Required.""" + + @overload + def __init__( + self, + *, + backup_vault_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackupStatus(_Model): + """Backup status. + + :ivar healthy: Backup health status. + :vartype healthy: bool + :ivar relationship_status: Status of the backup mirror relationship. Known values are: "Idle", + "Transferring", "Failed", and "Unknown". + :vartype relationship_status: str or ~azure.mgmt.netapp.models.VolumeBackupRelationshipStatus + :ivar mirror_state: The status of the backup. Known values are: "Uninitialized", "Mirrored", + and "Broken". + :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :ivar unhealthy_reason: Reason for the unhealthy backup relationship. + :vartype unhealthy_reason: str + :ivar error_message: Displays error message if the backup is in an error state. + :vartype error_message: str + :ivar last_transfer_size: Displays the last transfer size. + :vartype last_transfer_size: int + :ivar last_transfer_type: Displays the last transfer type. + :vartype last_transfer_type: str + :ivar total_transfer_bytes: Displays the total bytes transferred. + :vartype total_transfer_bytes: int + :ivar transfer_progress_bytes: Displays the total number of bytes transferred for the ongoing + operation. + :vartype transfer_progress_bytes: int + """ + + healthy: Optional[bool] = rest_field(visibility=["read"]) + """Backup health status.""" + relationship_status: Optional[Union[str, "_models.VolumeBackupRelationshipStatus"]] = rest_field( + name="relationshipStatus", visibility=["read"] + ) + """Status of the backup mirror relationship. Known values are: \"Idle\", \"Transferring\", + \"Failed\", and \"Unknown\".""" + mirror_state: Optional[Union[str, "_models.MirrorState"]] = rest_field(name="mirrorState", visibility=["read"]) + """The status of the backup. Known values are: \"Uninitialized\", \"Mirrored\", and \"Broken\".""" + unhealthy_reason: Optional[str] = rest_field(name="unhealthyReason", visibility=["read"]) + """Reason for the unhealthy backup relationship.""" + error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"]) + """Displays error message if the backup is in an error state.""" + last_transfer_size: Optional[int] = rest_field(name="lastTransferSize", visibility=["read"]) + """Displays the last transfer size.""" + last_transfer_type: Optional[str] = rest_field(name="lastTransferType", visibility=["read"]) + """Displays the last transfer type.""" + total_transfer_bytes: Optional[int] = rest_field(name="totalTransferBytes", visibility=["read"]) + """Displays the total bytes transferred.""" + transfer_progress_bytes: Optional[int] = rest_field(name="transferProgressBytes", visibility=["read"]) + """Displays the total number of bytes transferred for the ongoing operation.""" + + +class BackupVault(TrackedResource): + """Backup Vault information. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -1039,43 +1103,24 @@ class BackupPolicy(TrackedResource): :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str - :ivar properties: Backup policy Properties. Required. - :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties - :ivar etag: "If etag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). - :vartype etag: str + :ivar properties: Backup Vault Properties. + :vartype properties: ~azure.mgmt.netapp.models.BackupVaultProperties """ - properties: "_models.BackupPolicyProperties" = rest_field( + properties: Optional["_models.BackupVaultProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Backup policy Properties. Required.""" - etag: Optional[str] = rest_field(visibility=["read"]) - """\"If etag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + """Backup Vault Properties.""" - __flattened_items = [ - "backup_policy_id", - "provisioning_state", - "daily_backups_to_keep", - "weekly_backups_to_keep", - "monthly_backups_to_keep", - "volumes_assigned", - "enabled", - "volume_backups", - ] + __flattened_items = ["provisioning_state"] @overload def __init__( self, *, location: str, - properties: "_models.BackupPolicyProperties", tags: Optional[dict[str, str]] = None, + properties: Optional["_models.BackupVaultProperties"] = None, ) -> None: ... @overload @@ -1107,56 +1152,21 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class BackupPolicyPatch(_Model): - """Backup policy Details for create and update. +class BackupVaultPatch(_Model): + """Backup Vault information. - :ivar location: Resource location. - :vartype location: str - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str :ivar tags: Resource tags. :vartype tags: dict[str, str] - :ivar properties: Backup policy Properties. - :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties """ - location: Optional[str] = rest_field(visibility=["read", "create"]) - """Resource location.""" - id: Optional[str] = rest_field(visibility=["read"]) - """Resource Id.""" - name: Optional[str] = rest_field(visibility=["read"]) - """Resource name.""" - type: Optional[str] = rest_field(visibility=["read"]) - """Resource type.""" tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.BackupPolicyProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Backup policy Properties.""" - - __flattened_items = [ - "backup_policy_id", - "provisioning_state", - "daily_backups_to_keep", - "weekly_backups_to_keep", - "monthly_backups_to_keep", - "volumes_assigned", - "enabled", - "volume_backups", - ] @overload def __init__( self, *, - location: Optional[str] = None, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.BackupPolicyProperties"] = None, ) -> None: ... @overload @@ -1167,79 +1177,44 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) -class BackupPolicyProperties(_Model): - """Backup policy properties. +class BackupVaultProperties(_Model): + """Backup Vault properties. - :ivar backup_policy_id: Backup Policy GUID ID. - :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str - :ivar daily_backups_to_keep: Daily backups count to keep. - :vartype daily_backups_to_keep: int - :ivar weekly_backups_to_keep: Weekly backups count to keep. - :vartype weekly_backups_to_keep: int - :ivar monthly_backups_to_keep: Monthly backups count to keep. - :vartype monthly_backups_to_keep: int - :ivar volumes_assigned: Volumes using current backup policy. - :vartype volumes_assigned: int - :ivar enabled: The property to decide policy is enabled or not. - :vartype enabled: bool - :ivar volume_backups: A list of volumes assigned to this policy. - :vartype volume_backups: list[~azure.mgmt.netapp.models.VolumeBackups] """ - backup_policy_id: Optional[str] = rest_field(name="backupPolicyId", visibility=["read"]) - """Backup Policy GUID ID.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """Azure lifecycle management.""" - daily_backups_to_keep: Optional[int] = rest_field( - name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Daily backups count to keep.""" - weekly_backups_to_keep: Optional[int] = rest_field( - name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Weekly backups count to keep.""" - monthly_backups_to_keep: Optional[int] = rest_field( - name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] + + +class BreakFileLocksRequest(_Model): + """Break file locks request. + + :ivar client_ip: To clear file locks on a volume for a particular client. + :vartype client_ip: str + :ivar confirm_running_disruptive_operation: Break File locks could be a disruptive operation + for application as locks on the volume will be broken, if want to process, set to true. + :vartype confirm_running_disruptive_operation: bool + """ + + client_ip: Optional[str] = rest_field(name="clientIp", visibility=["read", "create", "update", "delete", "query"]) + """To clear file locks on a volume for a particular client.""" + confirm_running_disruptive_operation: Optional[bool] = rest_field( + name="confirmRunningDisruptiveOperation", visibility=["read", "create", "update", "delete", "query"] ) - """Monthly backups count to keep.""" - volumes_assigned: Optional[int] = rest_field(name="volumesAssigned", visibility=["read"]) - """Volumes using current backup policy.""" - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The property to decide policy is enabled or not.""" - volume_backups: Optional[list["_models.VolumeBackups"]] = rest_field(name="volumeBackups", visibility=["read"]) - """A list of volumes assigned to this policy.""" + """Break File locks could be a disruptive operation for application as locks on the volume will be + broken, if want to process, set to true.""" @overload def __init__( self, *, - daily_backups_to_keep: Optional[int] = None, - weekly_backups_to_keep: Optional[int] = None, - monthly_backups_to_keep: Optional[int] = None, - enabled: Optional[bool] = None, + client_ip: Optional[str] = None, + confirm_running_disruptive_operation: Optional[bool] = None, ) -> None: ... @overload @@ -1253,83 +1228,25 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BackupProperties(_Model): - """Backup properties. +class BreakReplicationRequest(_Model): + """Break replication request. - :ivar backup_id: UUID v4 used to identify the Backup. - :vartype backup_id: str - :ivar creation_date: The creation date of the backup. - :vartype creation_date: ~datetime.datetime - :ivar snapshot_creation_date: The snapshot creation date of the backup. - :vartype snapshot_creation_date: ~datetime.datetime - :ivar completion_date: The completion date of the backup. - :vartype completion_date: ~datetime.datetime - :ivar provisioning_state: Azure lifecycle management. - :vartype provisioning_state: str - :ivar size: Size of backup in bytes. - :vartype size: int - :ivar label: Label for backup. - :vartype label: str - :ivar backup_type: Type of backup Manual or Scheduled. Known values are: "Manual" and - "Scheduled". - :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType - :ivar failure_reason: Failure reason. - :vartype failure_reason: str - :ivar volume_resource_id: ResourceId used to identify the Volume. Required. - :vartype volume_resource_id: str - :ivar use_existing_snapshot: Manual backup an already existing snapshot. This will always be - false for scheduled backups and true/false for manual backups. - :vartype use_existing_snapshot: bool - :ivar snapshot_name: The name of the snapshot. - :vartype snapshot_name: str - :ivar backup_policy_resource_id: ResourceId used to identify the backup policy. - :vartype backup_policy_resource_id: str - :ivar is_large_volume: Specifies if the backup is for a large volume. - :vartype is_large_volume: bool + :ivar force_break_replication: If replication is in status transferring and you want to force + break the replication, set to true. + :vartype force_break_replication: bool """ - backup_id: Optional[str] = rest_field(name="backupId", visibility=["read"]) - """UUID v4 used to identify the Backup.""" - creation_date: Optional[datetime.datetime] = rest_field(name="creationDate", visibility=["read"], format="rfc3339") - """The creation date of the backup.""" - snapshot_creation_date: Optional[datetime.datetime] = rest_field( - name="snapshotCreationDate", visibility=["read"], format="rfc3339" - ) - """The snapshot creation date of the backup.""" - completion_date: Optional[datetime.datetime] = rest_field( - name="completionDate", visibility=["read"], format="rfc3339" + force_break_replication: Optional[bool] = rest_field( + name="forceBreakReplication", visibility=["read", "create", "update", "delete", "query"] ) - """The completion date of the backup.""" - provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) - """Azure lifecycle management.""" - size: Optional[int] = rest_field(visibility=["read"]) - """Size of backup in bytes.""" - label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Label for backup.""" - backup_type: Optional[Union[str, "_models.BackupType"]] = rest_field(name="backupType", visibility=["read"]) - """Type of backup Manual or Scheduled. Known values are: \"Manual\" and \"Scheduled\".""" - failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"]) - """Failure reason.""" - volume_resource_id: str = rest_field(name="volumeResourceId", visibility=["read", "create"]) - """ResourceId used to identify the Volume. Required.""" - use_existing_snapshot: Optional[bool] = rest_field(name="useExistingSnapshot", visibility=["read", "create"]) - """Manual backup an already existing snapshot. This will always be false for scheduled backups and - true/false for manual backups.""" - snapshot_name: Optional[str] = rest_field(name="snapshotName", visibility=["read", "create"]) - """The name of the snapshot.""" - backup_policy_resource_id: Optional[str] = rest_field(name="backupPolicyResourceId", visibility=["read"]) - """ResourceId used to identify the backup policy.""" - is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read"]) - """Specifies if the backup is for a large volume.""" + """If replication is in status transferring and you want to force break the replication, set to + true.""" @overload def __init__( self, *, - volume_resource_id: str, - label: Optional[str] = None, - use_existing_snapshot: Optional[bool] = None, - snapshot_name: Optional[str] = None, + force_break_replication: Optional[bool] = None, ) -> None: ... @overload @@ -1343,40 +1260,44 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BackupRestoreFiles(_Model): - """Restore payload for Single File Backup Restore. +class Bucket(ProxyResource): + """Bucket resource. - :ivar file_list: List of files to be restored. Required. - :vartype file_list: list[str] - :ivar restore_file_path: Destination folder where the files will be restored. The path name - should start with a forward slash. If it is omitted from request then restore is done at the - root folder of the destination volume by default. - :vartype restore_file_path: str - :ivar destination_volume_id: Resource Id of the destination volume on which the files need to - be restored. Required. - :vartype destination_volume_id: str + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData + :ivar properties: Bucket properties. + :vartype properties: ~azure.mgmt.netapp.models.BucketProperties """ - file_list: list[str] = rest_field(name="fileList", visibility=["read", "create", "update", "delete", "query"]) - """List of files to be restored. Required.""" - restore_file_path: Optional[str] = rest_field( - name="restoreFilePath", visibility=["read", "create", "update", "delete", "query"] - ) - """Destination folder where the files will be restored. The path name should start with a forward - slash. If it is omitted from request then restore is done at the root folder of the destination - volume by default.""" - destination_volume_id: str = rest_field( - name="destinationVolumeId", visibility=["read", "create", "update", "delete", "query"] + properties: Optional["_models.BucketProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Resource Id of the destination volume on which the files need to be restored. Required.""" + """Bucket properties.""" + + __flattened_items = [ + "path", + "file_system_user", + "provisioning_state", + "status", + "server", + "permissions", + "akv_details", + ] @overload def __init__( self, *, - file_list: list[str], - destination_volume_id: str, - restore_file_path: Optional[str] = None, + properties: Optional["_models.BucketProperties"] = None, ) -> None: ... @overload @@ -1387,24 +1308,45 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") -class BackupsMigrationRequest(_Model): - """Migrate Backups Request. + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) - :ivar backup_vault_id: The ResourceId of the Backup Vault. Required. - :vartype backup_vault_id: str + +class BucketCredentialsExpiry(_Model): + """The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. + + :ivar key_pair_expiry_days: The number of days from now until the newly generated Access and + Secret key pair will expire. + :vartype key_pair_expiry_days: int """ - backup_vault_id: str = rest_field(name="backupVaultId", visibility=["read", "create", "update", "delete", "query"]) - """The ResourceId of the Backup Vault. Required.""" + key_pair_expiry_days: Optional[int] = rest_field( + name="keyPairExpiryDays", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of days from now until the newly generated Access and Secret key pair will expire.""" @overload def __init__( self, *, - backup_vault_id: str, + key_pair_expiry_days: Optional[int] = None, ) -> None: ... @overload @@ -1418,57 +1360,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BackupStatus(_Model): - """Backup status. +class BucketGenerateCredentials(_Model): + """Bucket Access Key, Secret Key, and Expiry date and time of the key pair. - :ivar healthy: Backup health status. - :vartype healthy: bool - :ivar relationship_status: Status of the backup mirror relationship. Known values are: "Idle", - "Transferring", "Failed", and "Unknown". - :vartype relationship_status: str or ~azure.mgmt.netapp.models.VolumeBackupRelationshipStatus - :ivar mirror_state: The status of the backup. Known values are: "Uninitialized", "Mirrored", - and "Broken". - :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState - :ivar unhealthy_reason: Reason for the unhealthy backup relationship. - :vartype unhealthy_reason: str - :ivar error_message: Displays error message if the backup is in an error state. - :vartype error_message: str - :ivar last_transfer_size: Displays the last transfer size. - :vartype last_transfer_size: int - :ivar last_transfer_type: Displays the last transfer type. - :vartype last_transfer_type: str - :ivar total_transfer_bytes: Displays the total bytes transferred. - :vartype total_transfer_bytes: int - :ivar transfer_progress_bytes: Displays the total number of bytes transferred for the ongoing - operation. - :vartype transfer_progress_bytes: int + :ivar access_key: The Access Key that is required along with the Secret Key to access the + bucket. + :vartype access_key: str + :ivar secret_key: The Secret Key that is required along with the Access Key to access the + bucket. + :vartype secret_key: str + :ivar key_pair_expiry: The bucket's Access and Secret key pair expiry date and time (in UTC). + :vartype key_pair_expiry: ~datetime.datetime """ - healthy: Optional[bool] = rest_field(visibility=["read"]) - """Backup health status.""" - relationship_status: Optional[Union[str, "_models.VolumeBackupRelationshipStatus"]] = rest_field( - name="relationshipStatus", visibility=["read"] - ) - """Status of the backup mirror relationship. Known values are: \"Idle\", \"Transferring\", - \"Failed\", and \"Unknown\".""" - mirror_state: Optional[Union[str, "_models.MirrorState"]] = rest_field(name="mirrorState", visibility=["read"]) - """The status of the backup. Known values are: \"Uninitialized\", \"Mirrored\", and \"Broken\".""" - unhealthy_reason: Optional[str] = rest_field(name="unhealthyReason", visibility=["read"]) - """Reason for the unhealthy backup relationship.""" - error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"]) - """Displays error message if the backup is in an error state.""" - last_transfer_size: Optional[int] = rest_field(name="lastTransferSize", visibility=["read"]) - """Displays the last transfer size.""" - last_transfer_type: Optional[str] = rest_field(name="lastTransferType", visibility=["read"]) - """Displays the last transfer type.""" - total_transfer_bytes: Optional[int] = rest_field(name="totalTransferBytes", visibility=["read"]) - """Displays the total bytes transferred.""" - transfer_progress_bytes: Optional[int] = rest_field(name="transferProgressBytes", visibility=["read"]) - """Displays the total number of bytes transferred for the ongoing operation.""" + access_key: Optional[str] = rest_field(name="accessKey", visibility=["read"]) + """The Access Key that is required along with the Secret Key to access the bucket.""" + secret_key: Optional[str] = rest_field(name="secretKey", visibility=["read"]) + """The Secret Key that is required along with the Access Key to access the bucket.""" + key_pair_expiry: Optional[datetime.datetime] = rest_field( + name="keyPairExpiry", visibility=["read"], format="rfc3339" + ) + """The bucket's Access and Secret key pair expiry date and time (in UTC).""" -class BackupVault(TrackedResource): - """Backup Vault information. +class BucketPatch(ProxyResource): + """Bucket resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -1481,28 +1397,22 @@ class BackupVault(TrackedResource): :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: Backup Vault Properties. - :vartype properties: ~azure.mgmt.netapp.models.BackupVaultProperties + :ivar properties: Bucket properties. + :vartype properties: ~azure.mgmt.netapp.models.BucketPatchProperties """ - properties: Optional["_models.BackupVaultProperties"] = rest_field( + properties: Optional["_models.BucketPatchProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Backup Vault Properties.""" + """Bucket properties.""" - __flattened_items = ["provisioning_state"] + __flattened_items = ["file_system_user", "provisioning_state", "server", "permissions", "akv_details"] @overload def __init__( self, *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.BackupVaultProperties"] = None, + properties: Optional["_models.BucketPatchProperties"] = None, ) -> None: ... @overload @@ -1534,21 +1444,82 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class BackupVaultPatch(_Model): - """Backup Vault information. +class BucketPatchProperties(_Model): + """Bucket resource properties for a Patch operation. - :ivar tags: Resource tags. - :vartype tags: dict[str, str] + :ivar file_system_user: 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. + :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState + :ivar server: Properties of the server managing the lifecycle of volume buckets. + :vartype server: ~azure.mgmt.netapp.models.BucketServerPatchProperties + :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. Known + values are: "ReadOnly" and "ReadWrite". + :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPatchPermissions + :ivar akv_details: Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property. + :vartype akv_details: ~azure.mgmt.netapp.models.AzureKeyVaultDetails """ - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" + file_system_user: Optional["_models.FileSystemUser"] = rest_field( + name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", + \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" + server: Optional["_models.BucketServerPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the server managing the lifecycle of volume buckets.""" + permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Access permissions for the bucket. Either ReadOnly or ReadWrite. Known values are: \"ReadOnly\" + and \"ReadWrite\".""" + akv_details: Optional["_models.AzureKeyVaultDetails"] = rest_field( + name="akvDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property.""" @overload def __init__( self, *, - tags: Optional[dict[str, str]] = None, + file_system_user: Optional["_models.FileSystemUser"] = None, + server: Optional["_models.BucketServerPatchProperties"] = None, + permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = None, + akv_details: Optional["_models.AzureKeyVaultDetails"] = None, ) -> None: ... @overload @@ -1562,50 +1533,104 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BackupVaultProperties(_Model): - """Backup Vault properties. +class BucketProperties(_Model): + """Bucket resource properties. - :ivar provisioning_state: Azure lifecycle management. - :vartype provisioning_state: str - """ + :ivar path: The volume path mounted inside the bucket. The default is the root path '/' if no + value is provided when the bucket is created. + :vartype path: str + :ivar file_system_user: 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. + :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState + :ivar status: The bucket credentials status. There states: - provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) - """Azure lifecycle management.""" + "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. Known values are: + "NoCredentialsSet", "CredentialsExpired", and "Active". + :vartype status: str or ~azure.mgmt.netapp.models.CredentialsStatus + :ivar server: Properties of the server managing the lifecycle of volume buckets. + :vartype server: ~azure.mgmt.netapp.models.BucketServerProperties + :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default + is ReadOnly if no value is provided during bucket creation. Known values are: "ReadOnly" and + "ReadWrite". + :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPermissions + :ivar akv_details: Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + Notes: -class BindPasswordAkvConfig(_Model): - """The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is - stored. - :ivar azure_key_vault_uri: The Azure Key Vault URI where the Bind DN user password is stored. - Required. - :vartype azure_key_vault_uri: str - :ivar secret_name: The name of the secret in Azure Key Vault that contains the Bind DN user - password. Required. - :vartype secret_name: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. - :vartype user_assigned_identity: str + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property. + :vartype akv_details: ~azure.mgmt.netapp.models.AzureKeyVaultDetails """ - azure_key_vault_uri: str = rest_field( - name="azureKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] + path: Optional[str] = rest_field(visibility=["read", "create"]) + """The volume path mounted inside the bucket. The default is the root path '/' if no value is + provided when the bucket is created.""" + file_system_user: Optional["_models.FileSystemUser"] = rest_field( + name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"] ) - """The Azure Key Vault URI where the Bind DN user password is stored. Required.""" - secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"]) - """The name of the secret in Azure Key Vault that contains the Bind DN user password. Required.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + """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.""" + provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", + \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" + status: Optional[Union[str, "_models.CredentialsStatus"]] = rest_field(visibility=["read"]) + """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. Known values are: + \"NoCredentialsSet\", \"CredentialsExpired\", and \"Active\".""" + server: Optional["_models.BucketServerProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the server managing the lifecycle of volume buckets.""" + permissions: Optional[Union[str, "_models.BucketPermissions"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no + value is provided during bucket creation. Known values are: \"ReadOnly\" and \"ReadWrite\".""" + akv_details: Optional["_models.AzureKeyVaultDetails"] = rest_field( + name="akvDetails", visibility=["read", "create", "update", "delete", "query"] ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault.""" + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property.""" @overload def __init__( self, *, - azure_key_vault_uri: str, - secret_name: str, - user_assigned_identity: Optional[str] = None, + path: Optional[str] = None, + file_system_user: Optional["_models.FileSystemUser"] = None, + server: Optional["_models.BucketServerProperties"] = None, + permissions: Optional[Union[str, "_models.BucketPermissions"]] = None, + akv_details: Optional["_models.AzureKeyVaultDetails"] = None, ) -> None: ... @overload @@ -1619,40 +1644,45 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BindPasswordAkvConfigPatch(_Model): - """The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is - stored. +class BucketServerPatchProperties(_Model): + """Properties of the server managing the lifecycle of volume buckets. - :ivar azure_key_vault_uri: The Azure Key Vault URI where the Bind DN user password is stored. - :vartype azure_key_vault_uri: str - :ivar secret_name: The name of the secret in Azure Key Vault that contains the Bind DN user - password. - :vartype secret_name: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. - :vartype user_assigned_identity: str + :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by + the server certificate. + :vartype fqdn: str + :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the + bucket server's certificate and private key. It is generated by the end user and allows the + user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault + is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' + properties. + :vartype certificate_object: str + :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. + Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". + :vartype on_certificate_conflict_action: str or + ~azure.mgmt.netapp.models.OnCertificateConflictAction """ - azure_key_vault_uri: Optional[str] = rest_field( - name="azureKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Key Vault URI where the Bind DN user password is stored.""" - secret_name: Optional[str] = rest_field( - name="secretName", visibility=["read", "create", "update", "delete", "query"] - ) - """The name of the secret in Azure Key Vault that contains the Bind DN user password.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server + certificate.""" + certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"]) + """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate + and private key. It is generated by the end user and allows the user to access volume data in a + read-only manner. Note: This is only used when Azure Key Vault is not configured. This property + is mutually exclusive with the Azure Key Vault 'akv' properties.""" + on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = rest_field( + name="onCertificateConflictAction", visibility=["read", "create", "update", "delete", "query"] ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault.""" + """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. + Known values are: \"Update\" and \"Fail\".""" @overload def __init__( self, *, - azure_key_vault_uri: Optional[str] = None, - secret_name: Optional[str] = None, - user_assigned_identity: Optional[str] = None, + fqdn: Optional[str] = None, + certificate_object: Optional[str] = None, + on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = None, ) -> None: ... @overload @@ -1666,62 +1696,60 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BreakFileLocksRequest(_Model): - """Break file locks request. +class BucketServerProperties(_Model): + """Properties of the server managing the lifecycle of volume buckets. - :ivar client_ip: To clear file locks on a volume for a particular client. - :vartype client_ip: str - :ivar confirm_running_disruptive_operation: Break File locks could be a disruptive operation - for application as locks on the volume will be broken, if want to process, set to true. - :vartype confirm_running_disruptive_operation: bool + :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by + the server certificate. + :vartype fqdn: str + :ivar certificate_common_name: Certificate Common Name taken from the certificate installed on + the bucket server. + :vartype certificate_common_name: str + :ivar certificate_expiry_date: The bucket server's certificate expiry date. + :vartype certificate_expiry_date: ~datetime.datetime + :ivar ip_address: The bucket server's IPv4 address. + :vartype ip_address: str + :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the + bucket server's certificate and private key. It is generated by the end user and allows the + user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault + is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' + properties. + :vartype certificate_object: str + :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. + Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". + :vartype on_certificate_conflict_action: str or + ~azure.mgmt.netapp.models.OnCertificateConflictAction """ - client_ip: Optional[str] = rest_field(name="clientIp", visibility=["read", "create", "update", "delete", "query"]) - """To clear file locks on a volume for a particular client.""" - confirm_running_disruptive_operation: Optional[bool] = rest_field( - name="confirmRunningDisruptiveOperation", visibility=["read", "create", "update", "delete", "query"] + fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server + certificate.""" + certificate_common_name: Optional[str] = rest_field(name="certificateCommonName", visibility=["read"]) + """Certificate Common Name taken from the certificate installed on the bucket server.""" + certificate_expiry_date: Optional[datetime.datetime] = rest_field( + name="certificateExpiryDate", visibility=["read"], format="rfc3339" ) - """Break File locks could be a disruptive operation for application as locks on the volume will be - broken, if want to process, set to true.""" - - @overload - def __init__( - self, - *, - client_ip: Optional[str] = None, - confirm_running_disruptive_operation: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class BreakReplicationRequest(_Model): - """Break replication request. - - :ivar force_break_replication: If replication is in status transferring and you want to force - break the replication, set to true. - :vartype force_break_replication: bool - """ - - force_break_replication: Optional[bool] = rest_field( - name="forceBreakReplication", visibility=["read", "create", "update", "delete", "query"] + """The bucket server's certificate expiry date.""" + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) + """The bucket server's IPv4 address.""" + certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"]) + """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate + and private key. It is generated by the end user and allows the user to access volume data in a + read-only manner. Note: This is only used when Azure Key Vault is not configured. This property + is mutually exclusive with the Azure Key Vault 'akv' properties.""" + on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = rest_field( + name="onCertificateConflictAction", visibility=["read", "create", "update", "delete", "query"] ) - """If replication is in status transferring and you want to force break the replication, set to - true.""" + """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. + Known values are: \"Update\" and \"Fail\".""" @overload def __init__( self, *, - force_break_replication: Optional[bool] = None, + fqdn: Optional[str] = None, + certificate_object: Optional[str] = None, + on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = None, ) -> None: ... @overload @@ -1735,8 +1763,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Bucket(ProxyResource): - """Bucket resource. +class Cache(TrackedResource): + """Cache resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -1749,79 +1777,39 @@ class Bucket(ProxyResource): :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar properties: Bucket properties. - :vartype properties: ~azure.mgmt.netapp.models.BucketProperties - """ - - properties: Optional["_models.BucketProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Bucket properties.""" - - __flattened_items = [ - "path", - "file_system_user", - "provisioning_state", - "status", - "server", - "permissions", - "akv_details", - ] - - @overload - def __init__( - self, - *, - properties: Optional["_models.BucketProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) - - -class BucketCredentialsExpiry(_Model): - """The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. - - :ivar key_pair_expiry_days: The number of days from now until the newly generated Access and - Secret key pair will expire. - :vartype key_pair_expiry_days: int + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Cache properties. Required. + :vartype properties: ~azure.mgmt.netapp.models.CacheProperties + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + :ivar zones: The availability zones. + :vartype zones: list[str] """ - key_pair_expiry_days: Optional[int] = rest_field( - name="keyPairExpiryDays", visibility=["read", "create", "update", "delete", "query"] - ) - """The number of days from now until the newly generated Access and Secret key pair will expire.""" + properties: "_models.CacheProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Cache properties. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create"]) + """The availability zones.""" @overload def __init__( self, *, - key_pair_expiry_days: Optional[int] = None, + location: str, + properties: "_models.CacheProperties", + tags: Optional[dict[str, str]] = None, + zones: Optional[list[str]] = None, ) -> None: ... @overload @@ -1835,3032 +1823,238 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BucketGenerateCredentials(_Model): - """Bucket Access Key, Secret Key, and Expiry date and time of the key pair. - - :ivar access_key: The Access Key that is required along with the Secret Key to access the - bucket. - :vartype access_key: str - :ivar secret_key: The Secret Key that is required along with the Access Key to access the - bucket. - :vartype secret_key: str - :ivar key_pair_expiry: The bucket's Access and Secret key pair expiry date and time (in UTC). - :vartype key_pair_expiry: ~datetime.datetime - """ - - access_key: Optional[str] = rest_field(name="accessKey", visibility=["read"]) - """The Access Key that is required along with the Secret Key to access the bucket.""" - secret_key: Optional[str] = rest_field(name="secretKey", visibility=["read"]) - """The Secret Key that is required along with the Access Key to access the bucket.""" - key_pair_expiry: Optional[datetime.datetime] = rest_field( - name="keyPairExpiry", visibility=["read"], format="rfc3339" - ) - """The bucket's Access and Secret key pair expiry date and time (in UTC).""" - - -class BucketPatch(ProxyResource): - """Bucket resource. +class CacheMountTargetProperties(_Model): + """Contains all the information needed to mount a cache. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar properties: Bucket properties. - :vartype properties: ~azure.mgmt.netapp.models.BucketPatchProperties + :ivar mount_target_id: UUID v4 used to identify the MountTarget. + :vartype mount_target_id: str + :ivar ip_address: The mount target's IPv4 address, used to mount the cache. + :vartype ip_address: str + :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN. + :vartype smb_server_fqdn: str """ - properties: Optional["_models.BucketPatchProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Bucket properties.""" + mount_target_id: Optional[str] = rest_field(name="mountTargetId", visibility=["read"]) + """UUID v4 used to identify the MountTarget.""" + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) + """The mount target's IPv4 address, used to mount the cache.""" + smb_server_fqdn: Optional[str] = rest_field(name="smbServerFqdn", visibility=["read"]) + """The SMB server's Fully Qualified Domain Name, FQDN.""" - __flattened_items = ["file_system_user", "provisioning_state", "server", "permissions", "akv_details"] - @overload - def __init__( - self, - *, - properties: Optional["_models.BucketPatchProperties"] = None, - ) -> None: ... +class CacheProperties(_Model): + """Cache resource properties. - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) - - -class BucketPatchProperties(_Model): - """Bucket resource properties for a Patch operation. - - :ivar file_system_user: 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. - :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar server: Properties of the server managing the lifecycle of volume buckets. - :vartype server: ~azure.mgmt.netapp.models.BucketServerPatchProperties - :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. Known - values are: "ReadOnly" and "ReadWrite". - :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPatchPermissions - :ivar akv_details: Specifies the Azure Key Vault settings. These are used when - a) retrieving the bucket server certificate, and - b) storing the bucket credentials - - Notes: - - - - 1. If a bucket certificate was previously provided directly using the certificateObject - property, it is possible to subsequently use the Azure Key Vault for certificate management by - using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no - longer possible to provide the certificate directly via the certificateObject property. - 2. These properties are mutually exclusive with the server.certificateObject property. - :vartype akv_details: ~azure.mgmt.netapp.models.AzureKeyVaultDetails - """ - - file_system_user: Optional["_models.FileSystemUser"] = rest_field( - name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"] - ) - """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.""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - server: Optional["_models.BucketServerPatchProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Properties of the server managing the lifecycle of volume buckets.""" - permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Access permissions for the bucket. Either ReadOnly or ReadWrite. Known values are: \"ReadOnly\" - and \"ReadWrite\".""" - akv_details: Optional["_models.AzureKeyVaultDetails"] = rest_field( - name="akvDetails", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the Azure Key Vault settings. These are used when - a) retrieving the bucket server certificate, and - b) storing the bucket credentials - - Notes: - - - - 1. If a bucket certificate was previously provided directly using the certificateObject - property, it is possible to subsequently use the Azure Key Vault for certificate management by - using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no - longer possible to provide the certificate directly via the certificateObject property. - 2. These properties are mutually exclusive with the server.certificateObject property.""" - - @overload - def __init__( - self, - *, - file_system_user: Optional["_models.FileSystemUser"] = None, - server: Optional["_models.BucketServerPatchProperties"] = None, - permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = None, - akv_details: Optional["_models.AzureKeyVaultDetails"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class BucketProperties(_Model): - """Bucket resource properties. - - :ivar path: The volume path mounted inside the bucket. The default is the root path '/' if no - value is provided when the bucket is created. - :vartype path: str - :ivar file_system_user: 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. - :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar status: 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. Known values are: - "NoCredentialsSet", "CredentialsExpired", and "Active". - :vartype status: str or ~azure.mgmt.netapp.models.CredentialsStatus - :ivar server: Properties of the server managing the lifecycle of volume buckets. - :vartype server: ~azure.mgmt.netapp.models.BucketServerProperties - :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default - is ReadOnly if no value is provided during bucket creation. Known values are: "ReadOnly" and - "ReadWrite". - :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPermissions - :ivar akv_details: Specifies the Azure Key Vault settings. These are used when - a) retrieving the bucket server certificate, and - b) storing the bucket credentials - - Notes: - - - - 1. If a bucket certificate was previously provided directly using the certificateObject - property, it is possible to subsequently use the Azure Key Vault for certificate management by - using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no - longer possible to provide the certificate directly via the certificateObject property. - 2. These properties are mutually exclusive with the server.certificateObject property. - :vartype akv_details: ~azure.mgmt.netapp.models.AzureKeyVaultDetails - """ - - path: Optional[str] = rest_field(visibility=["read", "create"]) - """The volume path mounted inside the bucket. The default is the root path '/' if no value is - provided when the bucket is created.""" - file_system_user: Optional["_models.FileSystemUser"] = rest_field( - name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"] - ) - """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.""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - status: Optional[Union[str, "_models.CredentialsStatus"]] = rest_field(visibility=["read"]) - """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. Known values are: - \"NoCredentialsSet\", \"CredentialsExpired\", and \"Active\".""" - server: Optional["_models.BucketServerProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Properties of the server managing the lifecycle of volume buckets.""" - permissions: Optional[Union[str, "_models.BucketPermissions"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no - value is provided during bucket creation. Known values are: \"ReadOnly\" and \"ReadWrite\".""" - akv_details: Optional["_models.AzureKeyVaultDetails"] = rest_field( - name="akvDetails", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the Azure Key Vault settings. These are used when - a) retrieving the bucket server certificate, and - b) storing the bucket credentials - - Notes: - - - - 1. If a bucket certificate was previously provided directly using the certificateObject - property, it is possible to subsequently use the Azure Key Vault for certificate management by - using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no - longer possible to provide the certificate directly via the certificateObject property. - 2. These properties are mutually exclusive with the server.certificateObject property.""" - - @overload - def __init__( - self, - *, - path: Optional[str] = None, - file_system_user: Optional["_models.FileSystemUser"] = None, - server: Optional["_models.BucketServerProperties"] = None, - permissions: Optional[Union[str, "_models.BucketPermissions"]] = None, - akv_details: Optional["_models.AzureKeyVaultDetails"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class BucketServerPatchProperties(_Model): - """Properties of the server managing the lifecycle of volume buckets. - - :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by - the server certificate. - :vartype fqdn: str - :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the - bucket server's certificate and private key. It is generated by the end user and allows the - user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault - is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' - properties. - :vartype certificate_object: str - :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. - Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". - :vartype on_certificate_conflict_action: str or - ~azure.mgmt.netapp.models.OnCertificateConflictAction - """ - - fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server - certificate.""" - certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"]) - """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate - and private key. It is generated by the end user and allows the user to access volume data in a - read-only manner. Note: This is only used when Azure Key Vault is not configured. This property - is mutually exclusive with the Azure Key Vault 'akv' properties.""" - on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = rest_field( - name="onCertificateConflictAction", visibility=["read", "create", "update", "delete", "query"] - ) - """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. - Known values are: \"Update\" and \"Fail\".""" - - @overload - def __init__( - self, - *, - fqdn: Optional[str] = None, - certificate_object: Optional[str] = None, - on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class BucketServerProperties(_Model): - """Properties of the server managing the lifecycle of volume buckets. - - :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by - the server certificate. - :vartype fqdn: str - :ivar certificate_common_name: Certificate Common Name taken from the certificate installed on - the bucket server. - :vartype certificate_common_name: str - :ivar certificate_expiry_date: The bucket server's certificate expiry date. - :vartype certificate_expiry_date: ~datetime.datetime - :ivar ip_address: The bucket server's IPv4 address. - :vartype ip_address: str - :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the - bucket server's certificate and private key. It is generated by the end user and allows the - user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault - is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' - properties. - :vartype certificate_object: str - :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. - Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". - :vartype on_certificate_conflict_action: str or - ~azure.mgmt.netapp.models.OnCertificateConflictAction - """ - - fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server - certificate.""" - certificate_common_name: Optional[str] = rest_field(name="certificateCommonName", visibility=["read"]) - """Certificate Common Name taken from the certificate installed on the bucket server.""" - certificate_expiry_date: Optional[datetime.datetime] = rest_field( - name="certificateExpiryDate", visibility=["read"], format="rfc3339" - ) - """The bucket server's certificate expiry date.""" - ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) - """The bucket server's IPv4 address.""" - certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"]) - """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate - and private key. It is generated by the end user and allows the user to access volume data in a - read-only manner. Note: This is only used when Azure Key Vault is not configured. This property - is mutually exclusive with the Azure Key Vault 'akv' properties.""" - on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = rest_field( - name="onCertificateConflictAction", visibility=["read", "create", "update", "delete", "query"] - ) - """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. - Known values are: \"Update\" and \"Fail\".""" - - @overload - def __init__( - self, - *, - fqdn: Optional[str] = None, - certificate_object: Optional[str] = None, - on_certificate_conflict_action: Optional[Union[str, "_models.OnCertificateConflictAction"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class Cache(TrackedResource): - """Cache resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: Cache properties. Required. - :vartype properties: ~azure.mgmt.netapp.models.CacheProperties - :ivar etag: "If etag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). - :vartype etag: str - :ivar zones: The availability zones. - :vartype zones: list[str] - """ - - properties: "_models.CacheProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Cache properties. Required.""" - etag: Optional[str] = rest_field(visibility=["read"]) - """\"If etag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" - zones: Optional[list[str]] = rest_field(visibility=["read", "create"]) - """The availability zones.""" - - @overload - def __init__( - self, - *, - location: str, - properties: "_models.CacheProperties", - tags: Optional[dict[str, str]] = None, - zones: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CacheMountTargetProperties(_Model): - """Contains all the information needed to mount a cache. - - :ivar mount_target_id: UUID v4 used to identify the MountTarget. - :vartype mount_target_id: str - :ivar ip_address: The mount target's IPv4 address, used to mount the cache. - :vartype ip_address: str - :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN. - :vartype smb_server_fqdn: str - """ - - mount_target_id: Optional[str] = rest_field(name="mountTargetId", visibility=["read"]) - """UUID v4 used to identify the MountTarget.""" - ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) - """The mount target's IPv4 address, used to mount the cache.""" - smb_server_fqdn: Optional[str] = rest_field(name="smbServerFqdn", visibility=["read"]) - """The SMB server's Fully Qualified Domain Name, FQDN.""" - - -class CacheProperties(_Model): - """Cache resource properties. - - :ivar file_path: The file path of the Cache. Required. - :vartype file_path: str - :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the - range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. Required. - :vartype size: int - :ivar export_policy: Set of export policy rules. - :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy - :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB - protocol. - :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes] - :ivar provisioning_state: Azure lifecycle management. Known values are: "Creating", "Updating", - "Deleting", "Failed", "Succeeded", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.CacheProvisioningState - :ivar cache_state: Azure NetApp Files Cache lifecycle management. Known values are: - "ClusterPeeringOfferSent", "VserverPeeringOfferSent", "Creating", "Succeeded", and "Failed". - :vartype cache_state: str or ~azure.mgmt.netapp.models.CacheLifeCycleState - :ivar cache_subnet_resource_id: The Azure Resource URI for a delegated cache subnet that will - be used to allocate data IPs. Required. - :vartype cache_subnet_resource_id: str - :ivar peering_subnet_resource_id: The Azure Resource URI for a delegated subnet that will be - used for ANF Intercluster Interface IP addresses. Required. - :vartype peering_subnet_resource_id: str - :ivar mount_targets: List of mount targets that can be used to mount this cache. - :vartype mount_targets: list[~azure.mgmt.netapp.models.CacheMountTargetProperties] - :ivar kerberos: Describe if a cache is Kerberos enabled. Known values are: "Disabled" and - "Enabled". - :vartype kerberos: str or ~azure.mgmt.netapp.models.KerberosState - :ivar smb_settings: SMB information for the cache. - :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings - :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume - and this will be accepted as input only for manual qosType cache. - :vartype throughput_mibps: float - :ivar actual_throughput_mibps: Actual throughput in MiB/s for auto qosType volumes calculated - based on size and serviceLevel. - :vartype actual_throughput_mibps: float - :ivar encryption_key_source: Source of key used to encrypt data in the cache. Applicable if - NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values - (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: - "Microsoft.NetApp" and "Microsoft.KeyVault". - :vartype encryption_key_source: str or ~azure.mgmt.netapp.models.EncryptionKeySource - :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. - It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = - 'Microsoft.KeyVault'. - :vartype key_vault_private_endpoint_resource_id: str - :ivar maximum_number_of_files: Maximum number of files allowed. - :vartype maximum_number_of_files: int - :ivar encryption: Specifies if the cache is encryption or not. Known values are: "Disabled" and - "Enabled". - :vartype encryption: str or ~azure.mgmt.netapp.models.EncryptionState - :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", - "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", - "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", - "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", - "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", - "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", - "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", - "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", - "tr", "tr.utf-8", "en-us", and "en-us.utf-8". - :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage - :ivar ldap: Specifies whether LDAP is enabled or not for flexcache volume. Known values are: - "Disabled" and "Enabled". - :vartype ldap: str or ~azure.mgmt.netapp.models.LdapState - :ivar ldap_server_type: Specifies the type of LDAP server for flexcache volume. Known values - are: "ActiveDirectory" and "OpenLDAP". - :vartype ldap_server_type: str or ~azure.mgmt.netapp.models.LdapServerType - :ivar origin_cluster_information: Origin cluster information. Required. - :vartype origin_cluster_information: ~azure.mgmt.netapp.models.OriginClusterInformation - :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled - for the cache. Known values are: "Disabled" and "Enabled". - :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState - :ivar global_file_locking: Flag indicating whether the global file lock is enabled for the - cache. Known values are: "Disabled" and "Enabled". - :vartype global_file_locking: str or ~azure.mgmt.netapp.models.GlobalFileLockingState - :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: - "Disabled" and "Enabled". - :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState - :ivar file_access_logs: Flag indicating whether file access logs are enabled for the Cache, - based on active diagnostic settings present on the Cache. Known values are: "Enabled" and - "Disabled". - :vartype file_access_logs: str or ~azure.mgmt.netapp.models.CacheFileAccessLogs - """ - - file_path: str = rest_field(name="filePath", visibility=["read", "create"]) - """The file path of the Cache. Required.""" - size: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB - to 1PiB. Values expressed in bytes as multiples of 1GiB. Required.""" - export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field( - name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of export policy rules.""" - protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field( - name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" - provisioning_state: Optional[Union[str, "_models.CacheProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Creating\", \"Updating\", \"Deleting\", - \"Failed\", \"Succeeded\", and \"Canceled\".""" - cache_state: Optional[Union[str, "_models.CacheLifeCycleState"]] = rest_field( - name="cacheState", visibility=["read"] - ) - """Azure NetApp Files Cache lifecycle management. Known values are: \"ClusterPeeringOfferSent\", - \"VserverPeeringOfferSent\", \"Creating\", \"Succeeded\", and \"Failed\".""" - cache_subnet_resource_id: str = rest_field(name="cacheSubnetResourceId", visibility=["read", "create"]) - """The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. - Required.""" - peering_subnet_resource_id: str = rest_field(name="peeringSubnetResourceId", visibility=["read", "create"]) - """The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface - IP addresses. Required.""" - mount_targets: Optional[list["_models.CacheMountTargetProperties"]] = rest_field( - name="mountTargets", visibility=["read"] - ) - """List of mount targets that can be used to mount this cache.""" - kerberos: Optional[Union[str, "_models.KerberosState"]] = rest_field(visibility=["read", "create"]) - """Describe if a cache is Kerberos enabled. Known values are: \"Disabled\" and \"Enabled\".""" - smb_settings: Optional["_models.SmbSettings"] = rest_field( - name="smbSettings", visibility=["read", "create", "update", "delete", "query"] - ) - """SMB information for the cache.""" - throughput_mibps: Optional[float] = rest_field( - name="throughputMibps", visibility=["read", "create", "update", "delete", "query"] - ) - """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted - as input only for manual qosType cache.""" - actual_throughput_mibps: Optional[float] = rest_field(name="actualThroughputMibps", visibility=["read"]) - """Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel.""" - encryption_key_source: Union[str, "_models.EncryptionKeySource"] = rest_field( - name="encryptionKeySource", visibility=["read", "create"] - ) - """Source of key used to encrypt data in the cache. Applicable if NetApp account has - encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: - 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: \"Microsoft.NetApp\" and - \"Microsoft.KeyVault\".""" - key_vault_private_endpoint_resource_id: Optional[str] = rest_field( - name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the - volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" - maximum_number_of_files: Optional[int] = rest_field(name="maximumNumberOfFiles", visibility=["read"]) - """Maximum number of files allowed.""" - encryption: Optional[Union[str, "_models.EncryptionState"]] = rest_field(visibility=["read"]) - """Specifies if the cache is encryption or not. Known values are: \"Disabled\" and \"Enabled\".""" - language: Optional[Union[str, "_models.VolumeLanguage"]] = rest_field(visibility=["read"]) - """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\", - \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\", - \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\", - \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\", - \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\", - \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\", - \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\", - \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\", - \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\", - \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and - \"en-us.utf-8\".""" - ldap: Optional[Union[str, "_models.LdapState"]] = rest_field(visibility=["read", "create"]) - """Specifies whether LDAP is enabled or not for flexcache volume. Known values are: \"Disabled\" - and \"Enabled\".""" - ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = rest_field( - name="ldapServerType", visibility=["read", "create"] - ) - """Specifies the type of LDAP server for flexcache volume. Known values are: \"ActiveDirectory\" - and \"OpenLDAP\".""" - origin_cluster_information: "_models.OriginClusterInformation" = rest_field( - name="originClusterInformation", visibility=["read", "create"] - ) - """Origin cluster information. Required.""" - cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field( - name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"] - ) - """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: - \"Disabled\" and \"Enabled\".""" - global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = rest_field( - name="globalFileLocking", visibility=["read", "create"] - ) - """Flag indicating whether the global file lock is enabled for the cache. Known values are: - \"Disabled\" and \"Enabled\".""" - write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field( - name="writeBack", visibility=["read", "create", "update", "delete", "query"] - ) - """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and - \"Enabled\".""" - file_access_logs: Optional[Union[str, "_models.CacheFileAccessLogs"]] = rest_field( - name="fileAccessLogs", visibility=["read"] - ) - """Flag indicating whether file access logs are enabled for the Cache, based on active diagnostic - settings present on the Cache. Known values are: \"Enabled\" and \"Disabled\".""" - - @overload - def __init__( - self, - *, - file_path: str, - size: int, - cache_subnet_resource_id: str, - peering_subnet_resource_id: str, - encryption_key_source: Union[str, "_models.EncryptionKeySource"], - origin_cluster_information: "_models.OriginClusterInformation", - export_policy: Optional["_models.CachePropertiesExportPolicy"] = None, - protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None, - kerberos: Optional[Union[str, "_models.KerberosState"]] = None, - smb_settings: Optional["_models.SmbSettings"] = None, - throughput_mibps: Optional[float] = None, - key_vault_private_endpoint_resource_id: Optional[str] = None, - ldap: Optional[Union[str, "_models.LdapState"]] = None, - ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = None, - cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None, - global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = None, - write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CachePropertiesExportPolicy(_Model): - """Set of export policy rules. - - :ivar rules: Export policy rule. - :vartype rules: list[~azure.mgmt.netapp.models.ExportPolicyRule] - """ - - rules: Optional[list["_models.ExportPolicyRule"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Export policy rule.""" - - @overload - def __init__( - self, - *, - rules: Optional[list["_models.ExportPolicyRule"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CacheUpdate(_Model): - """The type used for update operations of the Cache. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.CacheUpdateProperties - """ - - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.CacheUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.CacheUpdateProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CacheUpdateProperties(_Model): - """The updatable properties of the Cache. - - :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the - range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. - :vartype size: int - :ivar export_policy: Set of export policy rules. - :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy - :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB - protocol. - :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes] - :ivar smb_settings: SMB information for the cache. - :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings - :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume - and this will be accepted as input only for manual qosType cache. - :vartype throughput_mibps: float - :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. - It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = - 'Microsoft.KeyVault'. - :vartype key_vault_private_endpoint_resource_id: str - :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled - for the cache. Known values are: "Disabled" and "Enabled". - :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState - :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: - "Disabled" and "Enabled". - :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState - """ - - size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB - to 1PiB. Values expressed in bytes as multiples of 1GiB.""" - export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field( - name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of export policy rules.""" - protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field( - name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" - smb_settings: Optional["_models.SmbSettings"] = rest_field( - name="smbSettings", visibility=["read", "create", "update", "delete", "query"] - ) - """SMB information for the cache.""" - throughput_mibps: Optional[float] = rest_field( - name="throughputMibps", visibility=["read", "create", "update", "delete", "query"] - ) - """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted - as input only for manual qosType cache.""" - key_vault_private_endpoint_resource_id: Optional[str] = rest_field( - name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the - volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" - cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field( - name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"] - ) - """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: - \"Disabled\" and \"Enabled\".""" - write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field( - name="writeBack", visibility=["read", "create", "update", "delete", "query"] - ) - """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and - \"Enabled\".""" - - @overload - def __init__( - self, - *, - size: Optional[int] = None, - export_policy: Optional["_models.CachePropertiesExportPolicy"] = None, - protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None, - smb_settings: Optional["_models.SmbSettings"] = None, - throughput_mibps: Optional[float] = None, - key_vault_private_endpoint_resource_id: Optional[str] = None, - cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None, - write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CapacityPool(TrackedResource): - """Capacity pool resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: Capacity pool properties. Required. - :vartype properties: ~azure.mgmt.netapp.models.PoolProperties - :ivar etag: "If etag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). - :vartype etag: str - """ - - properties: "_models.PoolProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Capacity pool properties. Required.""" - etag: Optional[str] = rest_field(visibility=["read"]) - """\"If etag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" - - __flattened_items = [ - "pool_id", - "size", - "service_level", - "provisioning_state", - "total_throughput_mibps", - "utilized_throughput_mibps", - "custom_throughput_mibps", - "qos_type", - "cool_access", - "encryption_type", - ] - - @overload - def __init__( - self, - *, - location: str, - properties: "_models.PoolProperties", - tags: Optional[dict[str, str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) - - -class CapacityPoolPatch(_Model): - """Capacity pool patch resource. - - :ivar location: Resource location. - :vartype location: str - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: Capacity pool properties. - :vartype properties: ~azure.mgmt.netapp.models.PoolPatchProperties - """ - - location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource location.""" - id: Optional[str] = rest_field(visibility=["read"]) - """Resource Id.""" - name: Optional[str] = rest_field(visibility=["read"]) - """Resource name.""" - type: Optional[str] = rest_field(visibility=["read"]) - """Resource type.""" - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.PoolPatchProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Capacity pool properties.""" - - __flattened_items = ["size", "qos_type", "cool_access", "custom_throughput_mibps"] - - @overload - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.PoolPatchProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) - - -class CertificateAkvDetails(_Model): - """Specifies the Azure Key Vault settings for retrieving the bucket server certificate. - - :ivar certificate_key_vault_uri: The base URI of the Azure Key Vault that is used when - retrieving the bucket certificate. - :vartype certificate_key_vault_uri: str - :ivar certificate_name: The name of the bucket server certificate stored in the Azure Key - Vault. - :vartype certificate_name: str - :ivar user_assigned_identity: Optional resource ID of the managed identity that has access to - the Azure Key Vault (AKV) secret. If a value is provided, it is used to find a matching entry - in the account's collection of user-assigned managed identities. If no match is found, an - exception is thrown. If no value is provided, the system-assigned managed identity is used. - :vartype user_assigned_identity: str - """ - - certificate_key_vault_uri: Optional[str] = rest_field( - name="certificateKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] - ) - """The base URI of the Azure Key Vault that is used when retrieving the bucket certificate.""" - certificate_name: Optional[str] = rest_field( - name="certificateName", visibility=["read", "create", "update", "delete", "query"] - ) - """The name of the bucket server certificate stored in the Azure Key Vault.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] - ) - """Optional resource ID of the managed identity that has access to the Azure Key Vault (AKV) - secret. If a value is provided, it is used to find a matching entry in the account's collection - of user-assigned managed identities. If no match is found, an exception is thrown. If no value - is provided, the system-assigned managed identity is used.""" - - @overload - def __init__( - self, - *, - certificate_key_vault_uri: Optional[str] = None, - certificate_name: Optional[str] = None, - user_assigned_identity: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ChangeKeyVault(_Model): - """Change key vault request. - - :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption. - Required. - :vartype key_vault_uri: str - :ivar key_name: The name of the key that should be used for encryption. Required. - :vartype key_name: str - :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used - for encryption. - :vartype key_vault_resource_id: str - :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every - virtual network that has volumes encrypted with customer-managed keys needs its own key vault - private endpoint. Required. - :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] - """ - - key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]) - """The URI of the key vault/managed HSM that should be used for encryption. Required.""" - key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"]) - """The name of the key that should be used for encryption. Required.""" - key_vault_resource_id: Optional[str] = rest_field( - name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """Azure resource ID of the key vault/managed HSM that should be used for encryption.""" - key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"] = rest_field( - name="keyVaultPrivateEndpoints", visibility=["read", "create", "update", "delete", "query"] - ) - """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes - encrypted with customer-managed keys needs its own key vault private endpoint. Required.""" - - @overload - def __init__( - self, - *, - key_vault_uri: str, - key_name: str, - key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"], - key_vault_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ChangeZoneRequest(_Model): - """Changes the zone for the Zone Redundant elastic capacity pool. - - :ivar new_zone: Availability zone to move Zone Redundant elastic capacity pool to. Required. - :vartype new_zone: str - """ - - new_zone: str = rest_field(name="newZone", visibility=["read", "create", "update", "delete", "query"]) - """Availability zone to move Zone Redundant elastic capacity pool to. Required.""" - - @overload - def __init__( - self, - *, - new_zone: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CheckAvailabilityResponse(_Model): - """Information regarding availability of a resource. - - :ivar is_available: true indicates name is valid and available. false - indicates the name is invalid, unavailable, or both. - :vartype is_available: bool - :ivar reason: Invalid indicates the name provided does not match Azure App Service - naming requirements. AlreadyExists indicates that the name is already in use and - is therefore unavailable. Known values are: "Invalid" and "AlreadyExists". - :vartype reason: str or ~azure.mgmt.netapp.models.InAvailabilityReasonType - :ivar message: If reason == invalid, provide the user with the reason why the given name is - invalid, and provide the resource naming requirements so that the user can select a valid name. - If reason == AlreadyExists, explain that resource name is already in use, and direct them to - select a different name. - :vartype message: str - """ - - is_available: Optional[bool] = rest_field( - name="isAvailable", visibility=["read", "create", "update", "delete", "query"] - ) - """true indicates name is valid and available. false indicates the name - is invalid, unavailable, or both.""" - reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Invalid indicates the name provided does not match Azure App Service naming - requirements. AlreadyExists indicates that the name is already in use and is - therefore unavailable. Known values are: \"Invalid\" and \"AlreadyExists\".""" - message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """If reason == invalid, provide the user with the reason why the given name is invalid, and - provide the resource naming requirements so that the user can select a valid name. If reason == - AlreadyExists, explain that resource name is already in use, and direct them to select a - different name.""" - - @overload - def __init__( - self, - *, - is_available: Optional[bool] = None, - reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = None, - message: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CheckElasticResourceAvailabilityResponse(_Model): - """Information regarding availability of a resource. - - :ivar is_available: True indicates name is valid and available. False indicates the name is - invalid, unavailable, or both. Known values are: "True" and "False". - :vartype is_available: str or ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityStatus - :ivar reason: Invalid indicates the name provided does not match Azure NetApp Files naming - requirements. AlreadyExists indicates that the name is already in use and is therefore - unavailable. Known values are: "Invalid" and "AlreadyExists". - :vartype reason: str or ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityReason - :ivar message: If reason == invalid, provide the user with the reason why the given name is - invalid, and provide the resource naming requirements so that the user can select a valid name. - If reason == AlreadyExists, explain that resource name is already in use, and direct them to - select a different name. - :vartype message: str - """ - - is_available: Optional[Union[str, "_models.CheckElasticResourceAvailabilityStatus"]] = rest_field( - name="isAvailable", visibility=["read", "create", "update", "delete", "query"] - ) - """True indicates name is valid and available. False indicates the name is invalid, unavailable, - or both. Known values are: \"True\" and \"False\".""" - reason: Optional[Union[str, "_models.CheckElasticResourceAvailabilityReason"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Invalid indicates the name provided does not match Azure NetApp Files naming requirements. - AlreadyExists indicates that the name is already in use and is therefore unavailable. Known - values are: \"Invalid\" and \"AlreadyExists\".""" - message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """If reason == invalid, provide the user with the reason why the given name is invalid, and - provide the resource naming requirements so that the user can select a valid name. If reason == - AlreadyExists, explain that resource name is already in use, and direct them to select a - different name.""" - - @overload - def __init__( - self, - *, - is_available: Optional[Union[str, "_models.CheckElasticResourceAvailabilityStatus"]] = None, - reason: Optional[Union[str, "_models.CheckElasticResourceAvailabilityReason"]] = None, - message: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CheckElasticVolumeFilePathAvailabilityRequest(_Model): # pylint: disable=name-too-long - """File path availability request content - availability is based on the elastic volume filePath - within the given elastic capacityPool. - - :ivar file_path: A unique file path for the volume. Used when creating mount targets. This - needs to be unique within the elastic capacity pool. Required. - :vartype file_path: str - """ - - file_path: str = rest_field(name="filePath", visibility=["read", "create", "update", "delete", "query"]) - """A unique file path for the volume. Used when creating mount targets. This needs to be unique - within the elastic capacity pool. Required.""" - - @overload - def __init__( - self, - *, - file_path: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CifsUser(_Model): - """The effective CIFS username when accessing the volume data. - - :ivar username: The CIFS user's username. - :vartype username: str - """ - - username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The CIFS user's username.""" - - @overload - def __init__( - self, - *, - username: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ClusterPeerCommandResponse(_Model): - """Information about cluster peering process. - - :ivar properties: Represents the properties of the cluster peer command response. - :vartype properties: ~azure.mgmt.netapp.models.ClusterPeerCommandResponseProperties - """ - - properties: Optional["_models.ClusterPeerCommandResponseProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Represents the properties of the cluster peer command response.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.ClusterPeerCommandResponseProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ClusterPeerCommandResponseProperties(_Model): - """Properties of the cluster peer command response. - - :ivar cluster_peering_command: ClusterPeeringCommand to run to accept cluster peer. Will only - be present if clusterPeeringStatus is pending. - :vartype cluster_peering_command: str - :ivar passphrase: Passphrase for use with cluster peer command. - :vartype passphrase: str - """ - - cluster_peering_command: Optional[str] = rest_field( - name="clusterPeeringCommand", visibility=["read", "create", "update", "delete", "query"] - ) - """ClusterPeeringCommand to run to accept cluster peer. Will only be present if - clusterPeeringStatus is pending.""" - passphrase: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Passphrase for use with cluster peer command.""" - - @overload - def __init__( - self, - *, - cluster_peering_command: Optional[str] = None, - passphrase: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class CredentialsAkvDetails(_Model): - """Specifies the Azure Key Vault settings for storing the bucket credentials. - - :ivar credentials_key_vault_uri: The base URI of the Azure Key Vault that is used when storing - the bucket credentials. - :vartype credentials_key_vault_uri: str - :ivar secret_name: The name of the secret stored in Azure Key Vault. The associated key pair - has the following structure: - - { - "access_key_id": "", - "secret_access_key": "" - }. - :vartype secret_name: str - :ivar user_assigned_identity: Optional resource ID of the managed identity that has access to - the Azure Key Vault (AKV) secret. If a value is provided, it is used to find a matching entry - in the account's collection of user-assigned managed identities. If no match is found, an - exception is thrown. If no value is provided, the system-assigned managed identity is used. - :vartype user_assigned_identity: str - """ - - credentials_key_vault_uri: Optional[str] = rest_field( - name="credentialsKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] - ) - """The base URI of the Azure Key Vault that is used when storing the bucket credentials.""" - secret_name: Optional[str] = rest_field( - name="secretName", visibility=["read", "create", "update", "delete", "query"] - ) - """The name of the secret stored in Azure Key Vault. The associated key pair has the following - structure: - - { - \"access_key_id\": \"\", - \"secret_access_key\": \"\" - }.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] - ) - """Optional resource ID of the managed identity that has access to the Azure Key Vault (AKV) - secret. If a value is provided, it is used to find a matching entry in the account's collection - of user-assigned managed identities. If no match is found, an exception is thrown. If no value - is provided, the system-assigned managed identity is used.""" - - @overload - def __init__( - self, - *, - credentials_key_vault_uri: Optional[str] = None, - secret_name: Optional[str] = None, - user_assigned_identity: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class DailySchedule(_Model): - """Daily Schedule properties. - - :ivar snapshots_to_keep: Daily snapshot count to keep. - :vartype snapshots_to_keep: int - :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. - :vartype hour: int - :ivar minute: Indicates which minute snapshot should be taken. - :vartype minute: int - :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. - :vartype used_bytes: int - """ - - snapshots_to_keep: Optional[int] = rest_field( - name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Daily snapshot count to keep.""" - hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which hour in UTC timezone a snapshot should be taken.""" - minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which minute snapshot should be taken.""" - used_bytes: Optional[int] = rest_field(name="usedBytes", visibility=["read", "create", "update", "delete", "query"]) - """Resource size in bytes, current storage usage for the volume in bytes.""" - - @overload - def __init__( - self, - *, - snapshots_to_keep: Optional[int] = None, - hour: Optional[int] = None, - minute: Optional[int] = None, - used_bytes: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class DestinationReplication(_Model): - """Destination replication properties. - - :ivar resource_id: The resource ID of the remote volume. - :vartype resource_id: str - :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known - values are: "CrossRegionReplication" and "CrossZoneReplication". - :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType - :ivar region: The remote region for the destination volume. - :vartype region: str - :ivar zone: The remote zone for the destination volume. - :vartype zone: str - """ - - resource_id: Optional[str] = rest_field( - name="resourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The resource ID of the remote volume.""" - replication_type: Optional[Union[str, "_models.ReplicationType"]] = rest_field( - name="replicationType", visibility=["read", "create", "update", "delete", "query"] - ) - """Indicates whether the replication is cross zone or cross region. Known values are: - \"CrossRegionReplication\" and \"CrossZoneReplication\".""" - region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The remote region for the destination volume.""" - zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The remote zone for the destination volume.""" - - @overload - def __init__( - self, - *, - resource_id: Optional[str] = None, - replication_type: Optional[Union[str, "_models.ReplicationType"]] = None, - region: Optional[str] = None, - zone: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class Dimension(_Model): - """Dimension of blobs, possibly be blob type or access tier. - - :ivar name: Display name of dimension. - :vartype name: str - :ivar display_name: Display name of dimension. - :vartype display_name: str - """ - - name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Display name of dimension.""" - display_name: Optional[str] = rest_field( - name="displayName", visibility=["read", "create", "update", "delete", "query"] - ) - """Display name of dimension.""" - - @overload - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticAccount(TrackedResource): - """NetApp elastic account resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticAccountProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity - """ - - properties: Optional["_models.ElasticAccountProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - identity: Optional["_models.ManagedServiceIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The managed service identities assigned to this resource.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticAccountProperties"] = None, - identity: Optional["_models.ManagedServiceIdentity"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticAccountProperties(_Model): - """NetApp elastic account properties. - - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar encryption: Encryption settings. - :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryption - """ - - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - encryption: Optional["_models.ElasticEncryption"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Encryption settings.""" - - @overload - def __init__( - self, - *, - encryption: Optional["_models.ElasticEncryption"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticAccountUpdate(_Model): - """The type used for update operations of the ElasticAccount. - - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticAccountUpdateProperties - """ - - identity: Optional["_models.ManagedServiceIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The managed service identities assigned to this resource.""" - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.ElasticAccountUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - identity: Optional["_models.ManagedServiceIdentity"] = None, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticAccountUpdateProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticAccountUpdateProperties(_Model): - """The updatable properties of the ElasticAccount. - - :ivar encryption: Encryption settings. - :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryption - """ - - encryption: Optional["_models.ElasticEncryption"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Encryption settings.""" - - @overload - def __init__( - self, - *, - encryption: Optional["_models.ElasticEncryption"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackup(ProxyResource): - """NetApp Elastic Backup under an elastic Backup Vault. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupProperties - """ - - properties: Optional["_models.ElasticBackupProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.ElasticBackupProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupPolicy(TrackedResource): - """NetApp Elastic Backup Policy resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupPolicyProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - """ - - properties: Optional["_models.ElasticBackupPolicyProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticBackupPolicyProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupPolicyProperties(_Model): - """Elastic Backup Policy properties. - - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar daily_backups_to_keep: Daily backups count to keep. - :vartype daily_backups_to_keep: int - :ivar weekly_backups_to_keep: Weekly backups count to keep. - :vartype weekly_backups_to_keep: int - :ivar monthly_backups_to_keep: Monthly backups count to keep. - :vartype monthly_backups_to_keep: int - :ivar assigned_volumes_count: The number of volumes currently using this Backup Policy. - :vartype assigned_volumes_count: int - :ivar policy_state: The property to identify whether Backup Policy is enabled or not. Known - values are: "Enabled" and "Disabled". - :vartype policy_state: str or ~azure.mgmt.netapp.models.ElasticBackupPolicyState - """ - - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - daily_backups_to_keep: Optional[int] = rest_field( - name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Daily backups count to keep.""" - weekly_backups_to_keep: Optional[int] = rest_field( - name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Weekly backups count to keep.""" - monthly_backups_to_keep: Optional[int] = rest_field( - name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Monthly backups count to keep.""" - assigned_volumes_count: Optional[int] = rest_field(name="assignedVolumesCount", visibility=["read"]) - """The number of volumes currently using this Backup Policy.""" - policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = rest_field( - name="policyState", visibility=["read", "create", "update", "delete", "query"] - ) - """The property to identify whether Backup Policy is enabled or not. Known values are: \"Enabled\" - and \"Disabled\".""" - - @overload - def __init__( - self, - *, - daily_backups_to_keep: Optional[int] = None, - weekly_backups_to_keep: Optional[int] = None, - monthly_backups_to_keep: Optional[int] = None, - policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupPolicyUpdate(_Model): - """The type used for update operations of the ElasticBackupPolicy. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdateProperties - """ - - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.ElasticBackupPolicyUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticBackupPolicyUpdateProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupPolicyUpdateProperties(_Model): - """The updatable properties of the ElasticBackupPolicy. - - :ivar daily_backups_to_keep: Daily backups count to keep. - :vartype daily_backups_to_keep: int - :ivar weekly_backups_to_keep: Weekly backups count to keep. - :vartype weekly_backups_to_keep: int - :ivar monthly_backups_to_keep: Monthly backups count to keep. - :vartype monthly_backups_to_keep: int - :ivar policy_state: The property to identify whether Backup Policy is enabled or not. Known - values are: "Enabled" and "Disabled". - :vartype policy_state: str or ~azure.mgmt.netapp.models.ElasticBackupPolicyState - """ - - daily_backups_to_keep: Optional[int] = rest_field( - name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Daily backups count to keep.""" - weekly_backups_to_keep: Optional[int] = rest_field( - name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Weekly backups count to keep.""" - monthly_backups_to_keep: Optional[int] = rest_field( - name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"] - ) - """Monthly backups count to keep.""" - policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = rest_field( - name="policyState", visibility=["read", "create", "update", "delete", "query"] - ) - """The property to identify whether Backup Policy is enabled or not. Known values are: \"Enabled\" - and \"Disabled\".""" - - @overload - def __init__( - self, - *, - daily_backups_to_keep: Optional[int] = None, - weekly_backups_to_keep: Optional[int] = None, - monthly_backups_to_keep: Optional[int] = None, - policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupProperties(_Model): - """Elastic Backup properties. - - :ivar creation_date: The creation date of the backup. - :vartype creation_date: ~datetime.datetime - :ivar snapshot_creation_date: The snapshot creation date of the backup. - :vartype snapshot_creation_date: ~datetime.datetime - :ivar completion_date: The completion date of the backup. - :vartype completion_date: ~datetime.datetime - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar size: Size of backup in bytes. - :vartype size: int - :ivar label: Label for backup. - :vartype label: str - :ivar backup_type: Type of backup Manual or Scheduled. Known values are: "Manual" and - "Scheduled". - :vartype backup_type: str or ~azure.mgmt.netapp.models.ElasticBackupType - :ivar failure_reason: Failure reason. - :vartype failure_reason: str - :ivar elastic_volume_resource_id: ResourceId used to identify the Elastic Volume. Required. - :vartype elastic_volume_resource_id: str - :ivar snapshot_usage: Manual backup using an already existing snapshot. This will always be - CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual - backups. Known values are: "UseExistingSnapshot" and "CreateNewSnapshot". - :vartype snapshot_usage: str or ~azure.mgmt.netapp.models.SnapshotUsage - :ivar elastic_snapshot_resource_id: ResourceId used to identify the elastic snapshot resource. - This is required when an existing snapshot needs to be used for creating a manual backup. - :vartype elastic_snapshot_resource_id: str - :ivar elastic_backup_policy_resource_id: ResourceId used to identify the elastic backup policy. - :vartype elastic_backup_policy_resource_id: str - :ivar volume_size: Specifies if the backup is for a large volume. Known values are: "Large" and - "Regular". - :vartype volume_size: str or ~azure.mgmt.netapp.models.VolumeSize - """ - - creation_date: Optional[datetime.datetime] = rest_field(name="creationDate", visibility=["read"], format="rfc3339") - """The creation date of the backup.""" - snapshot_creation_date: Optional[datetime.datetime] = rest_field( - name="snapshotCreationDate", visibility=["read"], format="rfc3339" - ) - """The snapshot creation date of the backup.""" - completion_date: Optional[datetime.datetime] = rest_field( - name="completionDate", visibility=["read"], format="rfc3339" - ) - """The completion date of the backup.""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - size: Optional[int] = rest_field(visibility=["read"]) - """Size of backup in bytes.""" - label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Label for backup.""" - backup_type: Optional[Union[str, "_models.ElasticBackupType"]] = rest_field(name="backupType", visibility=["read"]) - """Type of backup Manual or Scheduled. Known values are: \"Manual\" and \"Scheduled\".""" - failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"]) - """Failure reason.""" - elastic_volume_resource_id: str = rest_field(name="elasticVolumeResourceId", visibility=["read", "create"]) - """ResourceId used to identify the Elastic Volume. Required.""" - snapshot_usage: Optional[Union[str, "_models.SnapshotUsage"]] = rest_field( - name="snapshotUsage", visibility=["read", "create"] - ) - """Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for - scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. Known values - are: \"UseExistingSnapshot\" and \"CreateNewSnapshot\".""" - elastic_snapshot_resource_id: Optional[str] = rest_field( - name="elasticSnapshotResourceId", visibility=["read", "create"] - ) - """ResourceId used to identify the elastic snapshot resource. This is required when an existing - snapshot needs to be used for creating a manual backup.""" - elastic_backup_policy_resource_id: Optional[str] = rest_field( - name="elasticBackupPolicyResourceId", visibility=["read"] - ) - """ResourceId used to identify the elastic backup policy.""" - volume_size: Optional[Union[str, "_models.VolumeSize"]] = rest_field(name="volumeSize", visibility=["read"]) - """Specifies if the backup is for a large volume. Known values are: \"Large\" and \"Regular\".""" - - @overload - def __init__( - self, - *, - elastic_volume_resource_id: str, - label: Optional[str] = None, - snapshot_usage: Optional[Union[str, "_models.SnapshotUsage"]] = None, - elastic_snapshot_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupVault(TrackedResource): - """NetApp elastic backup vault resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupVaultProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - """ - - properties: Optional["_models.ElasticBackupVaultProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticBackupVaultProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticBackupVaultProperties(_Model): - """Elastic Backup Vault properties. - - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - """ - - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - - -class ElasticBackupVaultUpdate(_Model): - """The type used for update operations of the ElasticBackupVault. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - - @overload - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticCapacityPool(TrackedResource): - """NetApp Elastic Capacity Pool resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticCapacityPoolProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - :ivar zones: The availability zones. - :vartype zones: list[str] - """ - - properties: Optional["_models.ElasticCapacityPoolProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - zones: Optional[list[str]] = rest_field(visibility=["read", "create"]) - """The availability zones.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticCapacityPoolProperties"] = None, - zones: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticCapacityPoolProperties(_Model): - """Elastic capacity pool properties. - - :ivar size: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, - value must be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values - expressed in bytes as multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to - 128TiB. Pool size can't be shrunk once it is created. Required. - :vartype size: int - :ivar service_level: The service level of the elastic capacity pool. Required. "ZoneRedundant" - :vartype service_level: str or ~azure.mgmt.netapp.models.ElasticServiceLevel - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar encryption: Encryption settings. - :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryptionConfiguration - :ivar total_throughput_mibps: Total throughput of the pool in MiB/s. - :vartype total_throughput_mibps: float - :ivar subnet_resource_id: The Azure Resource URI for a delegated subnet. Must have the - delegation Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. - Required. - :vartype subnet_resource_id: str - :ivar current_zone: Indicates the current zone of the pool. This can be changed for - zoneRedundant service level pool with the changeZone action. - :vartype current_zone: str - :ivar availability_status: Current availability status of the resource. Known values are: - "Online" and "Offline". - :vartype availability_status: str or - ~azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus - :ivar active_directory_config_resource_id: The Azure Resource URI for an Active Directory - configuration. This is used by all the SMB volumes within the pool. - :vartype active_directory_config_resource_id: str - """ - - size: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in - the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as - multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be - shrunk once it is created. Required.""" - service_level: Union[str, "_models.ElasticServiceLevel"] = rest_field( - name="serviceLevel", visibility=["read", "create"] - ) - """The service level of the elastic capacity pool. Required. \"ZoneRedundant\"""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - encryption: Optional["_models.ElasticEncryptionConfiguration"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Encryption settings.""" - total_throughput_mibps: Optional[float] = rest_field(name="totalThroughputMibps", visibility=["read"]) - """Total throughput of the pool in MiB/s.""" - subnet_resource_id: str = rest_field(name="subnetResourceId", visibility=["read", "create"]) - """The Azure Resource URI for a delegated subnet. Must have the delegation - Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. Required.""" - current_zone: Optional[str] = rest_field(name="currentZone", visibility=["read"]) - """Indicates the current zone of the pool. This can be changed for zoneRedundant service level - pool with the changeZone action.""" - availability_status: Optional[Union[str, "_models.ElasticResourceAvailabilityStatus"]] = rest_field( - name="availabilityStatus", visibility=["read"] - ) - """Current availability status of the resource. Known values are: \"Online\" and \"Offline\".""" - active_directory_config_resource_id: Optional[str] = rest_field( - name="activeDirectoryConfigResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Resource URI for an Active Directory configuration. This is used by all the SMB - volumes within the pool.""" - - @overload - def __init__( - self, - *, - size: int, - service_level: Union[str, "_models.ElasticServiceLevel"], - subnet_resource_id: str, - encryption: Optional["_models.ElasticEncryptionConfiguration"] = None, - active_directory_config_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticCapacityPoolUpdate(_Model): - """The type used for update operations of the ElasticCapacityPool. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdateProperties - """ - - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.ElasticCapacityPoolUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticCapacityPoolUpdateProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticCapacityPoolUpdateProperties(_Model): - """The updatable properties of the ElasticCapacityPool. - - :ivar size: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, - value must be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values - expressed in bytes as multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to - 128TiB. Pool size can't be shrunk once it is created. + :ivar file_path: The file path of the Cache. Required. + :vartype file_path: str + :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the + range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. Required. :vartype size: int - :ivar encryption: Encryption settings. - :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryptionConfiguration - :ivar active_directory_config_resource_id: The Azure Resource URI for an Active Directory - configuration. This is used by all the SMB volumes within the pool. - :vartype active_directory_config_resource_id: str - """ - - size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in - the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as - multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be - shrunk once it is created.""" - encryption: Optional["_models.ElasticEncryptionConfiguration"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Encryption settings.""" - active_directory_config_resource_id: Optional[str] = rest_field( - name="activeDirectoryConfigResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Resource URI for an Active Directory configuration. This is used by all the SMB - volumes within the pool.""" - - @overload - def __init__( - self, - *, - size: Optional[int] = None, - encryption: Optional["_models.ElasticEncryptionConfiguration"] = None, - active_directory_config_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticEncryption(_Model): - """Encryption settings. - - :ivar key_source: The encryption keySource (provider). Possible values (case-insensitive): - Microsoft.NetApp, Microsoft.KeyVault. Known values are: "Microsoft.NetApp" and - "Microsoft.KeyVault". - :vartype key_source: str or ~azure.mgmt.netapp.models.KeySource - :ivar key_vault_properties: Properties provided by KeyVault. Applicable if keySource is - 'Microsoft.KeyVault'. - :vartype key_vault_properties: ~azure.mgmt.netapp.models.ElasticKeyVaultProperties - :ivar identity: Identity used to authenticate to KeyVault. Applicable if keySource is - 'Microsoft.KeyVault'. - :vartype identity: ~azure.mgmt.netapp.models.ElasticEncryptionIdentity - """ - - key_source: Optional[Union[str, "_models.KeySource"]] = rest_field( - name="keySource", visibility=["read", "create", "update", "delete", "query"] - ) - """The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, - Microsoft.KeyVault. Known values are: \"Microsoft.NetApp\" and \"Microsoft.KeyVault\".""" - key_vault_properties: Optional["_models.ElasticKeyVaultProperties"] = rest_field( - name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"] - ) - """Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'.""" - identity: Optional["_models.ElasticEncryptionIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'.""" - - @overload - def __init__( - self, - *, - key_source: Optional[Union[str, "_models.KeySource"]] = None, - key_vault_properties: Optional["_models.ElasticKeyVaultProperties"] = None, - identity: Optional["_models.ElasticEncryptionIdentity"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticEncryptionConfiguration(_Model): - """CMK Encryption Configuration. - - :ivar elastic_pool_encryption_key_source: Pool Encryption Key Source. Required. Known values - are: "NetApp" and "KeyVault". - :vartype elastic_pool_encryption_key_source: str or - ~azure.mgmt.netapp.models.ElasticPoolEncryptionKeySource + :ivar export_policy: Set of export policy rules. + :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy + :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB + protocol. + :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes] + :ivar provisioning_state: Azure lifecycle management. Known values are: "Creating", "Updating", + "Deleting", "Failed", "Succeeded", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.netapp.models.CacheProvisioningState + :ivar cache_state: Azure NetApp Files Cache lifecycle management. Known values are: + "ClusterPeeringOfferSent", "VserverPeeringOfferSent", "Creating", "Succeeded", and "Failed". + :vartype cache_state: str or ~azure.mgmt.netapp.models.CacheLifeCycleState + :ivar cache_subnet_resource_id: The Azure Resource URI for a delegated cache subnet that will + be used to allocate data IPs. Required. + :vartype cache_subnet_resource_id: str + :ivar peering_subnet_resource_id: The Azure Resource URI for a delegated subnet that will be + used for ANF Intercluster Interface IP addresses. Required. + :vartype peering_subnet_resource_id: str + :ivar mount_targets: List of mount targets that can be used to mount this cache. + :vartype mount_targets: list[~azure.mgmt.netapp.models.CacheMountTargetProperties] + :ivar kerberos: Describe if a cache is Kerberos enabled. Known values are: "Disabled" and + "Enabled". + :vartype kerberos: str or ~azure.mgmt.netapp.models.KerberosState + :ivar smb_settings: SMB information for the cache. + :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume + and this will be accepted as input only for manual qosType cache. + :vartype throughput_mibps: float + :ivar actual_throughput_mibps: Actual throughput in MiB/s for auto qosType volumes calculated + based on size and serviceLevel. + :vartype actual_throughput_mibps: float + :ivar encryption_key_source: Source of key used to encrypt data in the cache. Applicable if + NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values + (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: + "Microsoft.NetApp" and "Microsoft.KeyVault". + :vartype encryption_key_source: str or ~azure.mgmt.netapp.models.EncryptionKeySource :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = - 'Microsoft.KeyVault'. Required. + 'Microsoft.KeyVault'. :vartype key_vault_private_endpoint_resource_id: str + :ivar maximum_number_of_files: Maximum number of files allowed. + :vartype maximum_number_of_files: int + :ivar encryption: Specifies if the cache is encryption or not. Known values are: "Disabled" and + "Enabled". + :vartype encryption: str or ~azure.mgmt.netapp.models.EncryptionState + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage + :ivar ldap: Specifies whether LDAP is enabled or not for flexcache volume. Known values are: + "Disabled" and "Enabled". + :vartype ldap: str or ~azure.mgmt.netapp.models.LdapState + :ivar ldap_server_type: Specifies the type of LDAP server for flexcache volume. Known values + are: "ActiveDirectory" and "OpenLDAP". + :vartype ldap_server_type: str or ~azure.mgmt.netapp.models.LdapServerType + :ivar origin_cluster_information: Origin cluster information. Required. + :vartype origin_cluster_information: ~azure.mgmt.netapp.models.OriginClusterInformation + :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled + for the cache. Known values are: "Disabled" and "Enabled". + :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState + :ivar global_file_locking: Flag indicating whether the global file lock is enabled for the + cache. Known values are: "Disabled" and "Enabled". + :vartype global_file_locking: str or ~azure.mgmt.netapp.models.GlobalFileLockingState + :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: + "Disabled" and "Enabled". + :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState + :ivar file_access_logs: Flag indicating whether file access logs are enabled for the Cache, + based on active diagnostic settings present on the Cache. Known values are: "Enabled" and + "Disabled". + :vartype file_access_logs: str or ~azure.mgmt.netapp.models.CacheFileAccessLogs """ - elastic_pool_encryption_key_source: Union[str, "_models.ElasticPoolEncryptionKeySource"] = rest_field( - name="elasticPoolEncryptionKeySource", visibility=["read", "create", "update", "delete", "query"] - ) - """Pool Encryption Key Source. Required. Known values are: \"NetApp\" and \"KeyVault\".""" - key_vault_private_endpoint_resource_id: str = rest_field( - name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the - volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. Required.""" - - @overload - def __init__( - self, - *, - elastic_pool_encryption_key_source: Union[str, "_models.ElasticPoolEncryptionKeySource"], - key_vault_private_endpoint_resource_id: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticEncryptionIdentity(_Model): - """Identity used to authenticate with key vault. - - :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key - vault. Read-only. - :vartype principal_id: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match - key of identity.userAssignedIdentities. - :vartype user_assigned_identity: str - :ivar federated_client_id: ClientId of the multi-tenant Entra ID Application. Used to access - cross-tenant keyvaults. - :vartype federated_client_id: str - """ - - principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) - """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] - ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault. - Applicable if identity.type has 'UserAssigned'. It should match key of - identity.userAssignedIdentities.""" - federated_client_id: Optional[str] = rest_field( - name="federatedClientId", visibility=["read", "create", "update", "delete", "query"] - ) - """ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults.""" - - @overload - def __init__( - self, - *, - user_assigned_identity: Optional[str] = None, - federated_client_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticExportPolicy(_Model): - """Set of export policy rules. - - :ivar rules: Export policy rule. - :vartype rules: list[~azure.mgmt.netapp.models.ElasticExportPolicyRule] - """ - - rules: Optional[list["_models.ElasticExportPolicyRule"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Export policy rule.""" - - @overload - def __init__( - self, - *, - rules: Optional[list["_models.ElasticExportPolicyRule"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticExportPolicyRule(_Model): - """Elastic Volume Export Policy Rule. - - :ivar rule_index: Controls the priority of the export policy rule. When connecting to the - volume the rule with the lowest index that applies to the connecting client is used. - :vartype rule_index: int - :ivar unix_access_rule: Specifies the Unix file access level for the volume. It encompasses - both read-only and read-write permissions. Additionally, NoAccess can be set to block all - access to the volume. Known values are: "ReadOnly", "ReadWrite", and "NoAccess". - :vartype unix_access_rule: str or ~azure.mgmt.netapp.models.ElasticUnixAccessRule - :ivar nfsv3: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 - type volumes. Known values are: "Enabled" and "Disabled". - :vartype nfsv3: str or ~azure.mgmt.netapp.models.ElasticNfsv3Access - :ivar nfsv4: Allows clients to access the volume with at least NFSv4.1 protocol. Known values - are: "Enabled" and "Disabled". - :vartype nfsv4: str or ~azure.mgmt.netapp.models.ElasticNfsv4Access - :ivar allowed_clients: Client ingress specification for the export policy as list of IPv4 - CIDRs, IPv4 host addresses and host names. - :vartype allowed_clients: list[str] - :ivar root_access: Indicates whether root access to the volume is granted to clients affected - by this rule. Known values are: "Enabled" and "Disabled". - :vartype root_access: str or ~azure.mgmt.netapp.models.ElasticRootAccess - """ - - rule_index: Optional[int] = rest_field(name="ruleIndex", visibility=["read", "create", "update", "delete", "query"]) - """Controls the priority of the export policy rule. When connecting to the volume the rule with - the lowest index that applies to the connecting client is used.""" - unix_access_rule: Optional[Union[str, "_models.ElasticUnixAccessRule"]] = rest_field( - name="unixAccessRule", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the Unix file access level for the volume. It encompasses both read-only and - read-write permissions. Additionally, NoAccess can be set to block all access to the volume. - Known values are: \"ReadOnly\", \"ReadWrite\", and \"NoAccess\".""" - nfsv3: Optional[Union[str, "_models.ElasticNfsv3Access"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + file_path: str = rest_field(name="filePath", visibility=["read", "create"]) + """The file path of the Cache. Required.""" + size: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB + to 1PiB. Values expressed in bytes as multiples of 1GiB. Required.""" + export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field( + name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type - volumes. Known values are: \"Enabled\" and \"Disabled\".""" - nfsv4: Optional[Union[str, "_models.ElasticNfsv4Access"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Set of export policy rules.""" + protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] ) - """Allows clients to access the volume with at least NFSv4.1 protocol. Known values are: - \"Enabled\" and \"Disabled\".""" - allowed_clients: Optional[list[str]] = rest_field( - name="allowedClients", visibility=["read", "create", "update", "delete", "query"] + """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" + provisioning_state: Optional[Union[str, "_models.CacheProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] ) - """Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses - and host names.""" - root_access: Optional[Union[str, "_models.ElasticRootAccess"]] = rest_field( - name="rootAccess", visibility=["read", "create", "update", "delete", "query"] + """Azure lifecycle management. Known values are: \"Creating\", \"Updating\", \"Deleting\", + \"Failed\", \"Succeeded\", and \"Canceled\".""" + cache_state: Optional[Union[str, "_models.CacheLifeCycleState"]] = rest_field( + name="cacheState", visibility=["read"] ) - """Indicates whether root access to the volume is granted to clients affected by this rule. Known - values are: \"Enabled\" and \"Disabled\".""" - - @overload - def __init__( - self, - *, - rule_index: Optional[int] = None, - unix_access_rule: Optional[Union[str, "_models.ElasticUnixAccessRule"]] = None, - nfsv3: Optional[Union[str, "_models.ElasticNfsv3Access"]] = None, - nfsv4: Optional[Union[str, "_models.ElasticNfsv4Access"]] = None, - allowed_clients: Optional[list[str]] = None, - root_access: Optional[Union[str, "_models.ElasticRootAccess"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticKeyVaultProperties(_Model): - """Properties of key vault. - - :ivar key_vault_uri: The Uri of KeyVault. - :vartype key_vault_uri: str - :ivar key_name: The name of KeyVault key. - :vartype key_name: str - :ivar key_vault_resource_id: The resource ID of KeyVault. - :vartype key_vault_resource_id: str - :ivar status: Status of the KeyVault connection. Known values are: "Created", "InUse", - "Deleted", "Error", and "Updating". - :vartype status: str or ~azure.mgmt.netapp.models.ElasticKeyVaultStatus - """ - - key_vault_uri: Optional[str] = rest_field( - name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"] + """Azure NetApp Files Cache lifecycle management. Known values are: \"ClusterPeeringOfferSent\", + \"VserverPeeringOfferSent\", \"Creating\", \"Succeeded\", and \"Failed\".""" + cache_subnet_resource_id: str = rest_field(name="cacheSubnetResourceId", visibility=["read", "create"]) + """The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + Required.""" + peering_subnet_resource_id: str = rest_field(name="peeringSubnetResourceId", visibility=["read", "create"]) + """The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface + IP addresses. Required.""" + mount_targets: Optional[list["_models.CacheMountTargetProperties"]] = rest_field( + name="mountTargets", visibility=["read"] ) - """The Uri of KeyVault.""" - key_name: Optional[str] = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"]) - """The name of KeyVault key.""" - key_vault_resource_id: Optional[str] = rest_field( - name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"] + """List of mount targets that can be used to mount this cache.""" + kerberos: Optional[Union[str, "_models.KerberosState"]] = rest_field(visibility=["read", "create"]) + """Describe if a cache is Kerberos enabled. Known values are: \"Disabled\" and \"Enabled\".""" + smb_settings: Optional["_models.SmbSettings"] = rest_field( + name="smbSettings", visibility=["read", "create", "update", "delete", "query"] ) - """The resource ID of KeyVault.""" - status: Optional[Union[str, "_models.ElasticKeyVaultStatus"]] = rest_field(visibility=["read"]) - """Status of the KeyVault connection. Known values are: \"Created\", \"InUse\", \"Deleted\", - \"Error\", and \"Updating\".""" - - @overload - def __init__( - self, - *, - key_vault_uri: Optional[str] = None, - key_name: Optional[str] = None, - key_vault_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticMountTargetProperties(_Model): - """Contains all the information needed to mount an elastic volume. - - :ivar ip_address: The mount target's IPv4 address, used to mount the volume. - :vartype ip_address: str - :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN. - :vartype smb_server_fqdn: str - """ - - ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) - """The mount target's IPv4 address, used to mount the volume.""" - smb_server_fqdn: Optional[str] = rest_field(name="smbServerFqdn", visibility=["read"]) - """The SMB server's Fully Qualified Domain Name, FQDN.""" - - -class ElasticSmbPatchProperties(_Model): - """SMB Patch Properties. - - :ivar smb_encryption: Used to enable or disable encryption for in-flight SMB data volume. This - flag can be modified during Elastic volume update operation as well. Only applicable for SMB - protocol Elastic volumes. Known values are: "Enabled" and "Disabled". - :vartype smb_encryption: str or ~azure.mgmt.netapp.models.ElasticSmbEncryption - """ - - smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = rest_field( - name="smbEncryption", visibility=["read", "create", "update", "delete", "query"] + """SMB information for the cache.""" + throughput_mibps: Optional[float] = rest_field( + name="throughputMibps", visibility=["read", "create", "update", "delete", "query"] ) - """Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified - during Elastic volume update operation as well. Only applicable for SMB protocol Elastic - volumes. Known values are: \"Enabled\" and \"Disabled\".""" - - @overload - def __init__( - self, - *, - smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSmbProperties(_Model): - """SMB Properties. - - :ivar smb_encryption: Used to enable or disable encryption for in-flight SMB data volume. This - flag can be modified during Elastic volume update operation as well. Only applicable for SMB - protocol Elastic volumes. Known values are: "Enabled" and "Disabled". - :vartype smb_encryption: str or ~azure.mgmt.netapp.models.ElasticSmbEncryption - """ - - smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = rest_field( - name="smbEncryption", visibility=["read", "create", "update", "delete", "query"] + """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted + as input only for manual qosType cache.""" + actual_throughput_mibps: Optional[float] = rest_field(name="actualThroughputMibps", visibility=["read"]) + """Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel.""" + encryption_key_source: Union[str, "_models.EncryptionKeySource"] = rest_field( + name="encryptionKeySource", visibility=["read", "create"] ) - """Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified - during Elastic volume update operation as well. Only applicable for SMB protocol Elastic - volumes. Known values are: \"Enabled\" and \"Disabled\".""" - - @overload - def __init__( - self, - *, - smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshot(ProxyResource): - """NetApp Elastic Snapshot under an Elastic Volume. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotProperties - """ - - properties: Optional["_models.ElasticSnapshotProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Source of key used to encrypt data in the cache. Applicable if NetApp account has + encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: \"Microsoft.NetApp\" and + \"Microsoft.KeyVault\".""" + key_vault_private_endpoint_resource_id: Optional[str] = rest_field( + name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.ElasticSnapshotProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshotPolicy(TrackedResource): - """NetApp Elastic Snapshot Policy under an Elastic Account. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.netapp.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - """ - - properties: Optional["_models.ElasticSnapshotPolicyProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the + volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" + maximum_number_of_files: Optional[int] = rest_field(name="maximumNumberOfFiles", visibility=["read"]) + """Maximum number of files allowed.""" + encryption: Optional[Union[str, "_models.EncryptionState"]] = rest_field(visibility=["read"]) + """Specifies if the cache is encryption or not. Known values are: \"Disabled\" and \"Enabled\".""" + language: Optional[Union[str, "_models.VolumeLanguage"]] = rest_field(visibility=["read"]) + """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\", + \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\", + \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\", + \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\", + \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\", + \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\", + \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\", + \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\", + \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\", + \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and + \"en-us.utf-8\".""" + ldap: Optional[Union[str, "_models.LdapState"]] = rest_field(visibility=["read", "create"]) + """Specifies whether LDAP is enabled or not for flexcache volume. Known values are: \"Disabled\" + and \"Enabled\".""" + ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = rest_field( + name="ldapServerType", visibility=["read", "create"] ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticSnapshotPolicyProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshotPolicyDailySchedule(_Model): - """Daily Schedule properties used to create NetApp snapshot policy. - - :ivar snapshots_to_keep: Daily snapshot count to keep. - :vartype snapshots_to_keep: int - :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. - :vartype hour: int - :ivar minute: Indicates which minute snapshot should be taken. - :vartype minute: int - """ - - snapshots_to_keep: Optional[int] = rest_field( - name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] + """Specifies the type of LDAP server for flexcache volume. Known values are: \"ActiveDirectory\" + and \"OpenLDAP\".""" + origin_cluster_information: "_models.OriginClusterInformation" = rest_field( + name="originClusterInformation", visibility=["read", "create"] ) - """Daily snapshot count to keep.""" - hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which hour in UTC timezone a snapshot should be taken.""" - minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which minute snapshot should be taken.""" - - @overload - def __init__( - self, - *, - snapshots_to_keep: Optional[int] = None, - hour: Optional[int] = None, - minute: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshotPolicyHourlySchedule(_Model): - """Hourly Schedule properties used to create NetApp snapshot policy. - - :ivar snapshots_to_keep: Hourly snapshot count to keep. - :vartype snapshots_to_keep: int - :ivar minute: Indicates which minute snapshot should be taken. - :vartype minute: int - """ - - snapshots_to_keep: Optional[int] = rest_field( - name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] + """Origin cluster information. Required.""" + cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field( + name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"] ) - """Hourly snapshot count to keep.""" - minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which minute snapshot should be taken.""" - - @overload - def __init__( - self, - *, - snapshots_to_keep: Optional[int] = None, - minute: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshotPolicyMonthlySchedule(_Model): - """Monthly Schedule properties used to create NetApp snapshot policy. - - :ivar snapshots_to_keep: Monthly snapshot count to keep. - :vartype snapshots_to_keep: int - :ivar days_of_month: Indicates which days of the month snapshot (1-31) should be taken, accepts - a list of integers. - :vartype days_of_month: list[int] - :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. - :vartype hour: int - :ivar minute: Indicates which minute snapshot should be taken. - :vartype minute: int - """ - - snapshots_to_keep: Optional[int] = rest_field( - name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] + """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = rest_field( + name="globalFileLocking", visibility=["read", "create"] ) - """Monthly snapshot count to keep.""" - days_of_month: Optional[list[int]] = rest_field( - name="daysOfMonth", visibility=["read", "create", "update", "delete", "query"] + """Flag indicating whether the global file lock is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field( + name="writeBack", visibility=["read", "create", "update", "delete", "query"] ) - """Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers.""" - hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which hour in UTC timezone a snapshot should be taken.""" - minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which minute snapshot should be taken.""" + """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and + \"Enabled\".""" + file_access_logs: Optional[Union[str, "_models.CacheFileAccessLogs"]] = rest_field( + name="fileAccessLogs", visibility=["read"] + ) + """Flag indicating whether file access logs are enabled for the Cache, based on active diagnostic + settings present on the Cache. Known values are: \"Enabled\" and \"Disabled\".""" @overload def __init__( self, *, - snapshots_to_keep: Optional[int] = None, - days_of_month: Optional[list[int]] = None, - hour: Optional[int] = None, - minute: Optional[int] = None, + file_path: str, + size: int, + cache_subnet_resource_id: str, + peering_subnet_resource_id: str, + encryption_key_source: Union[str, "_models.EncryptionKeySource"], + origin_cluster_information: "_models.OriginClusterInformation", + export_policy: Optional["_models.CachePropertiesExportPolicy"] = None, + protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None, + kerberos: Optional[Union[str, "_models.KerberosState"]] = None, + smb_settings: Optional["_models.SmbSettings"] = None, + throughput_mibps: Optional[float] = None, + key_vault_private_endpoint_resource_id: Optional[str] = None, + ldap: Optional[Union[str, "_models.LdapState"]] = None, + ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = None, + cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None, + global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = None, + write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None, ) -> None: ... @overload @@ -4874,61 +2068,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticSnapshotPolicyProperties(_Model): - """Elastic Snapshot policy properties. +class CachePropertiesExportPolicy(_Model): + """Set of export policy rules. - :ivar hourly_schedule: Schedule for hourly snapshots. - :vartype hourly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule - :ivar daily_schedule: Schedule for daily snapshots. - :vartype daily_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule - :ivar weekly_schedule: Schedule for weekly snapshots. - :vartype weekly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule - :ivar monthly_schedule: Schedule for monthly snapshots. - :vartype monthly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule - :ivar policy_status: Configures if the snapshot policy is enabled on the volumes connected to - the policy. Known values are: "Enabled" and "Disabled". - :vartype policy_status: str or ~azure.mgmt.netapp.models.PolicyStatus - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState + :ivar rules: Export policy rule. + :vartype rules: list[~azure.mgmt.netapp.models.ExportPolicyRule] """ - hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = rest_field( - name="hourlySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for hourly snapshots.""" - daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = rest_field( - name="dailySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for daily snapshots.""" - weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = rest_field( - name="weeklySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for weekly snapshots.""" - monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = rest_field( - name="monthlySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for monthly snapshots.""" - policy_status: Optional[Union[str, "_models.PolicyStatus"]] = rest_field( - name="policyStatus", visibility=["read", "create", "update", "delete", "query"] - ) - """Configures if the snapshot policy is enabled on the volumes connected to the policy. Known - values are: \"Enabled\" and \"Disabled\".""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] + rules: Optional[list["_models.ExportPolicyRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" + """Export policy rule.""" @overload def __init__( self, *, - hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = None, - daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = None, - weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = None, - monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = None, - policy_status: Optional[Union[str, "_models.PolicyStatus"]] = None, + rules: Optional[list["_models.ExportPolicyRule"]] = None, ) -> None: ... @overload @@ -4942,18 +2098,18 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticSnapshotPolicyUpdate(_Model): - """The type used for update operations of the ElasticSnapshotPolicy. +class CacheUpdate(_Model): + """The type used for update operations of the Cache. :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdateProperties + :vartype properties: ~azure.mgmt.netapp.models.CacheUpdateProperties """ tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.ElasticSnapshotPolicyUpdateProperties"] = rest_field( + properties: Optional["_models.CacheUpdateProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """The resource-specific properties for this resource.""" @@ -4963,67 +2119,7 @@ def __init__( self, *, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticSnapshotPolicyUpdateProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ElasticSnapshotPolicyUpdateProperties(_Model): - """The updatable properties of the ElasticSnapshotPolicy. - - :ivar hourly_schedule: Schedule for hourly snapshots. - :vartype hourly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule - :ivar daily_schedule: Schedule for daily snapshots. - :vartype daily_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule - :ivar weekly_schedule: Schedule for weekly snapshots. - :vartype weekly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule - :ivar monthly_schedule: Schedule for monthly snapshots. - :vartype monthly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule - :ivar policy_status: Configures if the snapshot policy is enabled on the volumes connected to - the policy. Known values are: "Enabled" and "Disabled". - :vartype policy_status: str or ~azure.mgmt.netapp.models.PolicyStatus - """ - - hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = rest_field( - name="hourlySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for hourly snapshots.""" - daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = rest_field( - name="dailySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for daily snapshots.""" - weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = rest_field( - name="weeklySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for weekly snapshots.""" - monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = rest_field( - name="monthlySchedule", visibility=["read", "create", "update", "delete", "query"] - ) - """Schedule for monthly snapshots.""" - policy_status: Optional[Union[str, "_models.PolicyStatus"]] = rest_field( - name="policyStatus", visibility=["read", "create", "update", "delete", "query"] - ) - """Configures if the snapshot policy is enabled on the volumes connected to the policy. Known - values are: \"Enabled\" and \"Disabled\".""" - - @overload - def __init__( - self, - *, - hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = None, - daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = None, - weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = None, - monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = None, - policy_status: Optional[Union[str, "_models.PolicyStatus"]] = None, + properties: Optional["_models.CacheUpdateProperties"] = None, ) -> None: ... @overload @@ -5037,42 +2133,82 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticSnapshotPolicyWeeklySchedule(_Model): - """Weekly Schedule properties used to create NetApp snapshot policy. +class CacheUpdateProperties(_Model): + """The updatable properties of the Cache. - :ivar snapshots_to_keep: Weekly snapshot count to keep. - :vartype snapshots_to_keep: int - :ivar days: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day - names in english. - :vartype days: list[str or ~azure.mgmt.netapp.models.DayOfWeek] - :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. - :vartype hour: int - :ivar minute: Indicates which minute snapshot should be taken. - :vartype minute: int + :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the + range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + :vartype size: int + :ivar export_policy: Set of export policy rules. + :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy + :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB + protocol. + :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes] + :ivar smb_settings: SMB information for the cache. + :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume + and this will be accepted as input only for manual qosType cache. + :vartype throughput_mibps: float + :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. + It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = + 'Microsoft.KeyVault'. + :vartype key_vault_private_endpoint_resource_id: str + :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled + for the cache. Known values are: "Disabled" and "Enabled". + :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState + :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: + "Disabled" and "Enabled". + :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState """ - snapshots_to_keep: Optional[int] = rest_field( - name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] + size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB + to 1PiB. Values expressed in bytes as multiples of 1GiB.""" + export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field( + name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """Weekly snapshot count to keep.""" - days: Optional[list[Union[str, "_models.DayOfWeek"]]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Set of export policy rules.""" + protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] ) - """Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in - english.""" - hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which hour in UTC timezone a snapshot should be taken.""" - minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates which minute snapshot should be taken.""" + """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" + smb_settings: Optional["_models.SmbSettings"] = rest_field( + name="smbSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """SMB information for the cache.""" + throughput_mibps: Optional[float] = rest_field( + name="throughputMibps", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted + as input only for manual qosType cache.""" + key_vault_private_endpoint_resource_id: Optional[str] = rest_field( + name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the + volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" + cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field( + name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"] + ) + """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field( + name="writeBack", visibility=["read", "create", "update", "delete", "query"] + ) + """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and + \"Enabled\".""" @overload def __init__( self, *, - snapshots_to_keep: Optional[int] = None, - days: Optional[list[Union[str, "_models.DayOfWeek"]]] = None, - hour: Optional[int] = None, - minute: Optional[int] = None, + size: Optional[int] = None, + export_policy: Optional["_models.CachePropertiesExportPolicy"] = None, + protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None, + smb_settings: Optional["_models.SmbSettings"] = None, + throughput_mibps: Optional[float] = None, + key_vault_private_endpoint_resource_id: Optional[str] = None, + cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None, + write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None, ) -> None: ... @overload @@ -5086,23 +2222,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticSnapshotProperties(_Model): - """Elastic Snapshot properties. - - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - """ - - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - - -class ElasticVolume(TrackedResource): - """NetApp Elastic Volume resource. +class CapacityPool(TrackedResource): + """Capacity pool resource. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -5119,37 +2240,43 @@ class ElasticVolume(TrackedResource): :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticVolumeProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per + :ivar properties: Capacity pool properties. Required. + :vartype properties: ~azure.mgmt.netapp.models.PoolProperties + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - :ivar zones: The availability zones. - :vartype zones: list[str] + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str """ - properties: Optional["_models.ElasticVolumeProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal + properties: "_models.PoolProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Capacity pool properties. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """\"If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - zones: Optional[list[str]] = rest_field(visibility=["read", "create"]) - """The availability zones.""" + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + __flattened_items = [ + "pool_id", + "size", + "service_level", + "provisioning_state", + "total_throughput_mibps", + "utilized_throughput_mibps", + "custom_throughput_mibps", + "qos_type", + "cool_access", + "encryption_type", + ] @overload def __init__( self, *, location: str, + properties: "_models.PoolProperties", tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticVolumeProperties"] = None, - zones: Optional[list[str]] = None, ) -> None: ... @overload @@ -5160,80 +2287,68 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") -class ElasticVolumeBackupProperties(_Model): - """Elastic Volume Backup Properties. - - :ivar elastic_backup_policy_resource_id: ResourceId used to identify Elastic Backup Policy. - :vartype elastic_backup_policy_resource_id: str - :ivar policy_enforcement: The property to decide policy is enforced or not on the volume. Known - values are: "Enforced" and "NotEnforced". - :vartype policy_enforcement: str or ~azure.mgmt.netapp.models.ElasticVolumePolicyEnforcement - :ivar elastic_backup_vault_resource_id: ResourceId used to identify Elastic Backup Vault. - :vartype elastic_backup_vault_resource_id: str - """ - - elastic_backup_policy_resource_id: Optional[str] = rest_field( - name="elasticBackupPolicyResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """ResourceId used to identify Elastic Backup Policy.""" - policy_enforcement: Optional[Union[str, "_models.ElasticVolumePolicyEnforcement"]] = rest_field( - name="policyEnforcement", visibility=["read", "create", "update", "delete", "query"] - ) - """The property to decide policy is enforced or not on the volume. Known values are: \"Enforced\" - and \"NotEnforced\".""" - elastic_backup_vault_resource_id: Optional[str] = rest_field( - name="elasticBackupVaultResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """ResourceId used to identify Elastic Backup Vault.""" - - @overload - def __init__( - self, - *, - elastic_backup_policy_resource_id: Optional[str] = None, - policy_enforcement: Optional[Union[str, "_models.ElasticVolumePolicyEnforcement"]] = None, - elastic_backup_vault_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) -class ElasticVolumeDataProtectionPatchProperties(_Model): # pylint: disable=name-too-long - """Data protection configuration option for updating the volume, including snapshot policies and - backup. +class CapacityPoolPatch(_Model): + """Capacity pool patch resource. - :ivar snapshot: Used to apply a snapshot policy to a volume. - :vartype snapshot: ~azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties - :ivar backup: Used to configure backups on an elastic volume. - :vartype backup: ~azure.mgmt.netapp.models.ElasticVolumeBackupProperties + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Capacity pool properties. + :vartype properties: ~azure.mgmt.netapp.models.PoolPatchProperties """ - snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Used to apply a snapshot policy to a volume.""" - backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field( + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Resource Id.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + properties: Optional["_models.PoolPatchProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Used to configure backups on an elastic volume.""" + """Capacity pool properties.""" + + __flattened_items = ["size", "qos_type", "cool_access", "custom_throughput_mibps"] @overload def __init__( self, *, - snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None, - backup: Optional["_models.ElasticVolumeBackupProperties"] = None, + location: Optional[str] = None, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.PoolPatchProperties"] = None, ) -> None: ... @overload @@ -5244,33 +2359,53 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) -class ElasticVolumeDataProtectionProperties(_Model): - """Data protection configuration option for the volume, including snapshot policies and backup. +class CertificateAkvDetails(_Model): + """Specifies the Azure Key Vault settings for retrieving the bucket server certificate. - :ivar snapshot: Used to apply a snapshot policy to a volume. - :vartype snapshot: ~azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties - :ivar backup: Used to configure backups on an elastic volume. - :vartype backup: ~azure.mgmt.netapp.models.ElasticVolumeBackupProperties + :ivar certificate_key_vault_uri: The base URI of the Azure Key Vault that is used when + retrieving the bucket certificate. + :vartype certificate_key_vault_uri: str + :ivar certificate_name: The name of the bucket server certificate stored in the Azure Key + Vault. + :vartype certificate_name: str """ - snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + certificate_key_vault_uri: Optional[str] = rest_field( + name="certificateKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] ) - """Used to apply a snapshot policy to a volume.""" - backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """The base URI of the Azure Key Vault that is used when retrieving the bucket certificate.""" + certificate_name: Optional[str] = rest_field( + name="certificateName", visibility=["read", "create", "update", "delete", "query"] ) - """Used to configure backups on an elastic volume.""" + """The name of the bucket server certificate stored in the Azure Key Vault.""" @overload def __init__( self, *, - snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None, - backup: Optional["_models.ElasticVolumeBackupProperties"] = None, + certificate_key_vault_uri: Optional[str] = None, + certificate_name: Optional[str] = None, ) -> None: ... @overload @@ -5284,110 +2419,45 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticVolumeProperties(_Model): - """Elastic Volume properties. +class ChangeKeyVault(_Model): + """Change key vault request. - :ivar file_path: A unique file path for the volume. Used when creating mount targets. This - needs to be unique within the elastic capacity pool. Required. - :vartype file_path: str - :ivar size: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to - 16TiB. Values expressed in bytes as multiples of 1 GiB. Required. - :vartype size: int - :ivar export_policy: Set of export policy rules. - :vartype export_policy: ~azure.mgmt.netapp.models.ElasticExportPolicy - :ivar protocol_types: Set of support protocol types for the elastic volume. Required. - :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ElasticProtocolType] - :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating", - "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState - :ivar availability_status: Current availability status of the resource. Known values are: - "Online" and "Offline". - :vartype availability_status: str or - ~azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus - :ivar snapshot_resource_id: Resource identifier used to identify the Elastic Snapshot. - :vartype snapshot_resource_id: str - :ivar mount_targets: List of mount targets that can be used to mount this volume. - :vartype mount_targets: list[~azure.mgmt.netapp.models.ElasticMountTargetProperties] - :ivar data_protection: Data protection configuration option for the volume, including snapshot - policies and backup. - :vartype data_protection: ~azure.mgmt.netapp.models.ElasticVolumeDataProtectionProperties - :ivar snapshot_directory_visibility: Controls the visibility of the volume's read-only snapshot - directory, which provides access to each of the volume's snapshots. Known values are: "Hidden" - and "Visible". - :vartype snapshot_directory_visibility: str or - ~azure.mgmt.netapp.models.SnapshotDirectoryVisibility - :ivar smb_properties: SMB Properties. - :vartype smb_properties: ~azure.mgmt.netapp.models.ElasticSmbProperties - :ivar backup_resource_id: Resource identifier used to identify the Elastic Backup. - :vartype backup_resource_id: str - :ivar restoration_state: The current state of the restoration process. Known values are: - "Restoring", "Restored", and "Failed". - :vartype restoration_state: str or ~azure.mgmt.netapp.models.ElasticVolumeRestorationState + :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption. + Required. + :vartype key_vault_uri: str + :ivar key_name: The name of the key that should be used for encryption. Required. + :vartype key_name: str + :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used + for encryption. + :vartype key_vault_resource_id: str + :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every + virtual network that has volumes encrypted with customer-managed keys needs its own key vault + private endpoint. Required. + :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] """ - file_path: str = rest_field(name="filePath", visibility=["read", "create"]) - """A unique file path for the volume. Used when creating mount targets. This needs to be unique - within the elastic capacity pool. Required.""" - size: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values - expressed in bytes as multiples of 1 GiB. Required.""" - export_policy: Optional["_models.ElasticExportPolicy"] = rest_field( - name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of export policy rules.""" - protocol_types: list[Union[str, "_models.ElasticProtocolType"]] = rest_field( - name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of support protocol types for the elastic volume. Required.""" - provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\", - \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" - availability_status: Optional[Union[str, "_models.ElasticResourceAvailabilityStatus"]] = rest_field( - name="availabilityStatus", visibility=["read"] - ) - """Current availability status of the resource. Known values are: \"Online\" and \"Offline\".""" - snapshot_resource_id: Optional[str] = rest_field(name="snapshotResourceId", visibility=["read", "create"]) - """Resource identifier used to identify the Elastic Snapshot.""" - mount_targets: Optional[list["_models.ElasticMountTargetProperties"]] = rest_field( - name="mountTargets", visibility=["read"] - ) - """List of mount targets that can be used to mount this volume.""" - data_protection: Optional["_models.ElasticVolumeDataProtectionProperties"] = rest_field( - name="dataProtection", visibility=["read", "create", "update", "delete", "query"] - ) - """Data protection configuration option for the volume, including snapshot policies and backup.""" - snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = rest_field( - name="snapshotDirectoryVisibility", visibility=["read", "create", "update", "delete", "query"] - ) - """Controls the visibility of the volume's read-only snapshot directory, which provides access to - each of the volume's snapshots. Known values are: \"Hidden\" and \"Visible\".""" - smb_properties: Optional["_models.ElasticSmbProperties"] = rest_field( - name="smbProperties", visibility=["read", "create", "update", "delete", "query"] + key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]) + """The URI of the key vault/managed HSM that should be used for encryption. Required.""" + key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the key that should be used for encryption. Required.""" + key_vault_resource_id: Optional[str] = rest_field( + name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"] ) - """SMB Properties.""" - backup_resource_id: Optional[str] = rest_field(name="backupResourceId", visibility=["read", "create"]) - """Resource identifier used to identify the Elastic Backup.""" - restoration_state: Optional[Union[str, "_models.ElasticVolumeRestorationState"]] = rest_field( - name="restorationState", visibility=["read"] + """Azure resource ID of the key vault/managed HSM that should be used for encryption.""" + key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"] = rest_field( + name="keyVaultPrivateEndpoints", visibility=["read", "create", "update", "delete", "query"] ) - """The current state of the restoration process. Known values are: \"Restoring\", \"Restored\", - and \"Failed\".""" + """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes + encrypted with customer-managed keys needs its own key vault private endpoint. Required.""" @overload def __init__( self, - *, - file_path: str, - size: int, - protocol_types: list[Union[str, "_models.ElasticProtocolType"]], - export_policy: Optional["_models.ElasticExportPolicy"] = None, - snapshot_resource_id: Optional[str] = None, - data_protection: Optional["_models.ElasticVolumeDataProtectionProperties"] = None, - snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = None, - smb_properties: Optional["_models.ElasticSmbProperties"] = None, - backup_resource_id: Optional[str] = None, + *, + key_vault_uri: str, + key_name: str, + key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"], + key_vault_resource_id: Optional[str] = None, ) -> None: ... @overload @@ -5401,21 +2471,47 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticVolumeRevert(_Model): - """Reverts the elastic volume to the specified snapshot. +class CheckAvailabilityResponse(_Model): + """Information regarding availability of a resource. - :ivar snapshot_resource_id: Resource identifier used to identify the Elastic Snapshot. - :vartype snapshot_resource_id: str + :ivar is_available: true indicates name is valid and available. false + indicates the name is invalid, unavailable, or both. + :vartype is_available: bool + :ivar reason: Invalid indicates the name provided does not match Azure App Service + naming requirements. AlreadyExists indicates that the name is already in use and + is therefore unavailable. Known values are: "Invalid" and "AlreadyExists". + :vartype reason: str or ~azure.mgmt.netapp.models.InAvailabilityReasonType + :ivar message: If reason == invalid, provide the user with the reason why the given name is + invalid, and provide the resource naming requirements so that the user can select a valid name. + If reason == AlreadyExists, explain that resource name is already in use, and direct them to + select a different name. + :vartype message: str """ - snapshot_resource_id: Optional[str] = rest_field(name="snapshotResourceId", visibility=["read", "create"]) - """Resource identifier used to identify the Elastic Snapshot.""" + is_available: Optional[bool] = rest_field( + name="isAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """true indicates name is valid and available. false indicates the name + is invalid, unavailable, or both.""" + reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Invalid indicates the name provided does not match Azure App Service naming + requirements. AlreadyExists indicates that the name is already in use and is + therefore unavailable. Known values are: \"Invalid\" and \"AlreadyExists\".""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If reason == invalid, provide the user with the reason why the given name is invalid, and + provide the resource naming requirements so that the user can select a valid name. If reason == + AlreadyExists, explain that resource name is already in use, and direct them to select a + different name.""" @overload def __init__( self, *, - snapshot_resource_id: Optional[str] = None, + is_available: Optional[bool] = None, + reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = None, + message: Optional[str] = None, ) -> None: ... @overload @@ -5429,23 +2525,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticVolumeSnapshotProperties(_Model): - """Elastic Volume Snapshot Properties. +class CifsUser(_Model): + """The effective CIFS username when accessing the volume data. - :ivar snapshot_policy_resource_id: Snapshot Policy ResourceId. - :vartype snapshot_policy_resource_id: str + :ivar username: The CIFS user's username. + :vartype username: str """ - snapshot_policy_resource_id: Optional[str] = rest_field( - name="snapshotPolicyResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """Snapshot Policy ResourceId.""" + username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The CIFS user's username.""" @overload def __init__( self, *, - snapshot_policy_resource_id: Optional[str] = None, + username: Optional[str] = None, ) -> None: ... @overload @@ -5459,28 +2553,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticVolumeUpdate(_Model): - """The type used for update operations of the ElasticVolume. +class ClusterPeerCommandResponse(_Model): + """Information about cluster peering process. - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.netapp.models.ElasticVolumeUpdateProperties + :ivar properties: Represents the properties of the cluster peer command response. + :vartype properties: ~azure.mgmt.netapp.models.ClusterPeerCommandResponseProperties """ - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.ElasticVolumeUpdateProperties"] = rest_field( + properties: Optional["_models.ClusterPeerCommandResponseProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" + """Represents the properties of the cluster peer command response.""" @overload def __init__( self, *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ElasticVolumeUpdateProperties"] = None, + properties: Optional["_models.ClusterPeerCommandResponseProperties"] = None, ) -> None: ... @overload @@ -5494,56 +2583,30 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ElasticVolumeUpdateProperties(_Model): - """The updatable properties of the ElasticVolume. +class ClusterPeerCommandResponseProperties(_Model): + """Properties of the cluster peer command response. - :ivar size: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to - 16TiB. Values expressed in bytes as multiples of 1 GiB. - :vartype size: int - :ivar export_policy: Set of export policy rules. - :vartype export_policy: ~azure.mgmt.netapp.models.ElasticExportPolicy - :ivar data_protection: Data protection configuration option for the volume, including snapshot - policies and backup. - :vartype data_protection: ~azure.mgmt.netapp.models.ElasticVolumeDataProtectionPatchProperties - :ivar snapshot_directory_visibility: Controls the visibility of the volume's read-only snapshot - directory, which provides access to each of the volume's snapshots. Known values are: "Hidden" - and "Visible". - :vartype snapshot_directory_visibility: str or - ~azure.mgmt.netapp.models.SnapshotDirectoryVisibility - :ivar smb_properties: SMB Properties. - :vartype smb_properties: ~azure.mgmt.netapp.models.ElasticSmbPatchProperties + :ivar cluster_peering_command: ClusterPeeringCommand to run to accept cluster peer. Will only + be present if clusterPeeringStatus is pending. + :vartype cluster_peering_command: str + :ivar passphrase: Passphrase for use with cluster peer command. + :vartype passphrase: str """ - size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values - expressed in bytes as multiples of 1 GiB.""" - export_policy: Optional["_models.ElasticExportPolicy"] = rest_field( - name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Set of export policy rules.""" - data_protection: Optional["_models.ElasticVolumeDataProtectionPatchProperties"] = rest_field( - name="dataProtection", visibility=["read", "create", "update", "delete", "query"] - ) - """Data protection configuration option for the volume, including snapshot policies and backup.""" - snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = rest_field( - name="snapshotDirectoryVisibility", visibility=["read", "create", "update", "delete", "query"] - ) - """Controls the visibility of the volume's read-only snapshot directory, which provides access to - each of the volume's snapshots. Known values are: \"Hidden\" and \"Visible\".""" - smb_properties: Optional["_models.ElasticSmbPatchProperties"] = rest_field( - name="smbProperties", visibility=["read", "create", "update", "delete", "query"] + cluster_peering_command: Optional[str] = rest_field( + name="clusterPeeringCommand", visibility=["read", "create", "update", "delete", "query"] ) - """SMB Properties.""" + """ClusterPeeringCommand to run to accept cluster peer. Will only be present if + clusterPeeringStatus is pending.""" + passphrase: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Passphrase for use with cluster peer command.""" @overload def __init__( self, *, - size: Optional[int] = None, - export_policy: Optional["_models.ElasticExportPolicy"] = None, - data_protection: Optional["_models.ElasticVolumeDataProtectionPatchProperties"] = None, - snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = None, - smb_properties: Optional["_models.ElasticSmbPatchProperties"] = None, + cluster_peering_command: Optional[str] = None, + passphrase: Optional[str] = None, ) -> None: ... @overload @@ -5557,40 +2620,43 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EncryptionIdentity(_Model): - """Identity used to authenticate with key vault. +class CredentialsAkvDetails(_Model): + """Specifies the Azure Key Vault settings for storing the bucket credentials. - :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key - vault. Read-only. - :vartype principal_id: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match - key of identity.userAssignedIdentities. - :vartype user_assigned_identity: str - :ivar federated_client_id: ClientId of the multi-tenant Entra ID Application. Used to access - cross-tenant keyvaults. - :vartype federated_client_id: str + :ivar credentials_key_vault_uri: The base URI of the Azure Key Vault that is used when storing + the bucket credentials. + :vartype credentials_key_vault_uri: str + :ivar secret_name: The name of the secret stored in Azure Key Vault. The associated key pair + has the following structure: + + { + "access_key_id": "", + "secret_access_key": "" + }. + :vartype secret_name: str """ - principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) - """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + credentials_key_vault_uri: Optional[str] = rest_field( + name="credentialsKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault. - Applicable if identity.type has 'UserAssigned'. It should match key of - identity.userAssignedIdentities.""" - federated_client_id: Optional[str] = rest_field( - name="federatedClientId", visibility=["read", "create", "update", "delete", "query"] + """The base URI of the Azure Key Vault that is used when storing the bucket credentials.""" + secret_name: Optional[str] = rest_field( + name="secretName", visibility=["read", "create", "update", "delete", "query"] ) - """ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults.""" + """The name of the secret stored in Azure Key Vault. The associated key pair has the following + structure: + + { + \"access_key_id\": \"\", + \"secret_access_key\": \"\" + }.""" @overload def __init__( self, *, - user_assigned_identity: Optional[str] = None, - federated_client_id: Optional[str] = None, + credentials_key_vault_uri: Optional[str] = None, + secret_name: Optional[str] = None, ) -> None: ... @overload @@ -5604,31 +2670,38 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EncryptionTransitionRequest(_Model): - """Encryption transition request. +class DailySchedule(_Model): + """Daily Schedule properties. - :ivar virtual_network_id: Identifier for the virtual network. Required. - :vartype virtual_network_id: str - :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. - Required. - :vartype private_endpoint_id: str + :ivar snapshots_to_keep: Daily snapshot count to keep. + :vartype snapshots_to_keep: int + :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. + :vartype hour: int + :ivar minute: Indicates which minute snapshot should be taken. + :vartype minute: int + :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. + :vartype used_bytes: int """ - virtual_network_id: str = rest_field( - name="virtualNetworkId", visibility=["read", "create", "update", "delete", "query"] - ) - """Identifier for the virtual network. Required.""" - private_endpoint_id: str = rest_field( - name="privateEndpointId", visibility=["read", "create", "update", "delete", "query"] + snapshots_to_keep: Optional[int] = rest_field( + name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"] ) - """Identifier of the private endpoint to reach the Azure Key Vault. Required.""" + """Daily snapshot count to keep.""" + hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Indicates which hour in UTC timezone a snapshot should be taken.""" + minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Indicates which minute snapshot should be taken.""" + used_bytes: Optional[int] = rest_field(name="usedBytes", visibility=["read", "create", "update", "delete", "query"]) + """Resource size in bytes, current storage usage for the volume in bytes.""" @overload def __init__( self, *, - virtual_network_id: str, - private_endpoint_id: str, + snapshots_to_keep: Optional[int] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + used_bytes: Optional[int] = None, ) -> None: ... @overload @@ -5642,41 +2715,42 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EntraIdAkvConfig(_Model): - """Using AKV config, certificate will be fetched, which will contain private key & public - certificate, that correspond to the public certificate which is uploaded on the application - created by customer. This will be used further for authentication. +class DestinationReplication(_Model): + """Destination replication properties. - :ivar azure_key_vault_uri: The Azure Key Vault URI where the Entra ID credentials are stored. - Required. - :vartype azure_key_vault_uri: str - :ivar certificate_name: The name of the certificate in Azure Key Vault. Required. - :vartype certificate_name: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. - :vartype user_assigned_identity: str + :ivar resource_id: The resource ID of the remote volume. + :vartype resource_id: str + :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known + values are: "CrossRegionReplication" and "CrossZoneReplication". + :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType + :ivar region: The remote region for the destination volume. + :vartype region: str + :ivar zone: The remote zone for the destination volume. + :vartype zone: str """ - azure_key_vault_uri: str = rest_field( - name="azureKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Key Vault URI where the Entra ID credentials are stored. Required.""" - certificate_name: str = rest_field( - name="certificateName", visibility=["read", "create", "update", "delete", "query"] + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] ) - """The name of the certificate in Azure Key Vault. Required.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + """The resource ID of the remote volume.""" + replication_type: Optional[Union[str, "_models.ReplicationType"]] = rest_field( + name="replicationType", visibility=["read", "create", "update", "delete", "query"] ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault.""" + """Indicates whether the replication is cross zone or cross region. Known values are: + \"CrossRegionReplication\" and \"CrossZoneReplication\".""" + region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The remote region for the destination volume.""" + zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The remote zone for the destination volume.""" @overload def __init__( self, *, - azure_key_vault_uri: str, - certificate_name: str, - user_assigned_identity: Optional[str] = None, + resource_id: Optional[str] = None, + replication_type: Optional[Union[str, "_models.ReplicationType"]] = None, + region: Optional[str] = None, + zone: Optional[str] = None, ) -> None: ... @overload @@ -5690,38 +2764,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EntraIdAkvConfigPatch(_Model): - """Entra ID Patch configuration for the account. +class Dimension(_Model): + """Dimension of blobs, possibly be blob type or access tier. - :ivar azure_key_vault_uri: The Azure Key Vault URI where the Entra ID credentials are stored. - :vartype azure_key_vault_uri: str - :ivar certificate_name: The name of the certificate in Azure Key Vault. - :vartype certificate_name: str - :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to - authenticate with key vault. - :vartype user_assigned_identity: str + :ivar name: Display name of dimension. + :vartype name: str + :ivar display_name: Display name of dimension. + :vartype display_name: str """ - azure_key_vault_uri: Optional[str] = rest_field( - name="azureKeyVaultUri", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Key Vault URI where the Entra ID credentials are stored.""" - certificate_name: Optional[str] = rest_field( - name="certificateName", visibility=["read", "create", "update", "delete", "query"] - ) - """The name of the certificate in Azure Key Vault.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Display name of dimension.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] ) - """The ARM resource identifier of the user assigned identity used to authenticate with key vault.""" + """Display name of dimension.""" @overload def __init__( self, *, - azure_key_vault_uri: Optional[str] = None, - certificate_name: Optional[str] = None, - user_assigned_identity: Optional[str] = None, + name: Optional[str] = None, + display_name: Optional[str] = None, ) -> None: ... @overload @@ -5735,50 +2799,40 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EntraIdConfig(_Model): - """Entra ID configuration for the account. +class EncryptionIdentity(_Model): + """Identity used to authenticate with key vault. - :ivar application_id: ApplicationId of the app created by customer to provide authentication - and required API permissions for Microsoft Graph endpoint. Required. - :vartype application_id: str - :ivar domain: Domain of the Active directory synced to Entra ID for hybrid identities. - Required. - :vartype domain: str - :ivar server_name_prefix: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be - generated for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. - Required. - :vartype server_name_prefix: str - :ivar entra_id_akv_config: Using AKV config, certificate will be fetched, which will contain - private key & public certificate, that correspond to the public certificate which is uploaded - on the application created by customer. This will be used further for authentication. - :vartype entra_id_akv_config: ~azure.mgmt.netapp.models.EntraIdAkvConfig + :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key + vault. Read-only. + :vartype principal_id: str + :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to + authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match + key of identity.userAssignedIdentities. + :vartype user_assigned_identity: str + :ivar federated_client_id: ClientId of the multi-tenant Entra ID Application. Used to access + cross-tenant keyvaults. + :vartype federated_client_id: str """ - application_id: str = rest_field(name="applicationId", visibility=["read", "create", "update", "delete", "query"]) - """ApplicationId of the app created by customer to provide authentication and required API - permissions for Microsoft Graph endpoint. Required.""" - domain: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Domain of the Active directory synced to Entra ID for hybrid identities. Required.""" - server_name_prefix: str = rest_field( - name="serverNamePrefix", visibility=["read", "create", "update", "delete", "query"] + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only.""" + user_assigned_identity: Optional[str] = rest_field( + name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] ) - """Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated for SMB share, - using this FQDN, SMB Share will be mounted on Entra Joined VM. Required.""" - entra_id_akv_config: Optional["_models.EntraIdAkvConfig"] = rest_field( - name="entraIdAkvConfig", visibility=["read", "create", "update", "delete", "query"] + """The ARM resource identifier of the user assigned identity used to authenticate with key vault. + Applicable if identity.type has 'UserAssigned'. It should match key of + identity.userAssignedIdentities.""" + federated_client_id: Optional[str] = rest_field( + name="federatedClientId", visibility=["read", "create", "update", "delete", "query"] ) - """Using AKV config, certificate will be fetched, which will contain private key & public - certificate, that correspond to the public certificate which is uploaded on the application - created by customer. This will be used further for authentication.""" + """ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults.""" @overload def __init__( self, *, - application_id: str, - domain: str, - server_name_prefix: str, - entra_id_akv_config: Optional["_models.EntraIdAkvConfig"] = None, + user_assigned_identity: Optional[str] = None, + federated_client_id: Optional[str] = None, ) -> None: ... @overload @@ -5792,50 +2846,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EntraIdConfigPatch(_Model): - """Entra ID Patch configuration for the account. +class EncryptionTransitionRequest(_Model): + """Encryption transition request. - :ivar application_id: ApplicationId of the app created by customer to provide authentication - and required API permissions for Microsoft Graph endpoint. - :vartype application_id: str - :ivar domain: Domain of the Active directory synced to Entra ID for hybrid identities. - :vartype domain: str - :ivar server_name_prefix: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be - generated for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. - :vartype server_name_prefix: str - :ivar entra_id_akv_config: Using AKV config, certificate will be fetched, which will contain - private key & public certificate, that correspond to the public certificate which is uploaded - on the application created by customer. This will be used further for authentication. - :vartype entra_id_akv_config: ~azure.mgmt.netapp.models.EntraIdAkvConfigPatch + :ivar virtual_network_id: Identifier for the virtual network. Required. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :vartype private_endpoint_id: str """ - application_id: Optional[str] = rest_field( - name="applicationId", visibility=["read", "create", "update", "delete", "query"] - ) - """ApplicationId of the app created by customer to provide authentication and required API - permissions for Microsoft Graph endpoint.""" - domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Domain of the Active directory synced to Entra ID for hybrid identities.""" - server_name_prefix: Optional[str] = rest_field( - name="serverNamePrefix", visibility=["read", "create", "update", "delete", "query"] + virtual_network_id: str = rest_field( + name="virtualNetworkId", visibility=["read", "create", "update", "delete", "query"] ) - """Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated for SMB share, - using this FQDN, SMB Share will be mounted on Entra Joined VM.""" - entra_id_akv_config: Optional["_models.EntraIdAkvConfigPatch"] = rest_field( - name="entraIdAkvConfig", visibility=["read", "create", "update", "delete", "query"] + """Identifier for the virtual network. Required.""" + private_endpoint_id: str = rest_field( + name="privateEndpointId", visibility=["read", "create", "update", "delete", "query"] ) - """Using AKV config, certificate will be fetched, which will contain private key & public - certificate, that correspond to the public certificate which is uploaded on the application - created by customer. This will be used further for authentication.""" + """Identifier of the private endpoint to reach the Azure Key Vault. Required.""" @overload def __init__( self, *, - application_id: Optional[str] = None, - domain: Optional[str] = None, - server_name_prefix: Optional[str] = None, - entra_id_akv_config: Optional["_models.EntraIdAkvConfigPatch"] = None, + virtual_network_id: str, + private_endpoint_id: str, ) -> None: ... @overload @@ -6427,172 +3462,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class LdapConfiguration(_Model): - """LDAP configuration. - - :ivar domain: Name of the LDAP configuration domain. - :vartype domain: str - :ivar ldap_servers: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. - :vartype ldap_servers: list[str] - :ivar ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. - :vartype ldap_over_tls: bool - :ivar server_ca_certificate: When LDAP over SSL/TLS is enabled, the LDAP client is required to - have base64 encoded ldap servers CA certificate. - :vartype server_ca_certificate: str - :ivar certificate_cn_host: The CN host name used while generating the certificate, LDAP Over - TLS requires the CN host name to create DNS host entry. - :vartype certificate_cn_host: str - :ivar bind_authentication_level: The authentication level to use when binding to the LDAP - server, defaults to Anonymous. Known values are: "Anonymous" and "Simple". - :vartype bind_authentication_level: str or ~azure.mgmt.netapp.models.BindAuthenticationLevel - :ivar bind_dn: The distinguished name (DN) to bind as when performing LDAP operations. - :vartype bind_dn: str - :ivar bind_password_akv_config: The Azure Key Vault configuration where the Bind DN - (Distinguished Name) user password is stored. - :vartype bind_password_akv_config: ~azure.mgmt.netapp.models.BindPasswordAkvConfig - """ - - domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Name of the LDAP configuration domain.""" - ldap_servers: Optional[list[str]] = rest_field( - name="ldapServers", visibility=["read", "create", "update", "delete", "query"] - ) - """List of LDAP server IP addresses (IPv4 only) for the LDAP domain.""" - ldap_over_tls: Optional[bool] = rest_field( - name="ldapOverTLS", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies whether or not the LDAP traffic needs to be secured via TLS.""" - server_ca_certificate: Optional[str] = rest_field( - name="serverCACertificate", visibility=["read", "create", "update", "delete", "query"] - ) - """When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap - servers CA certificate.""" - certificate_cn_host: Optional[str] = rest_field( - name="certificateCNHost", visibility=["read", "create", "update", "delete", "query"] - ) - """The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name - to create DNS host entry.""" - bind_authentication_level: Optional[Union[str, "_models.BindAuthenticationLevel"]] = rest_field( - name="bindAuthenticationLevel", visibility=["read", "create", "update", "delete", "query"] - ) - """The authentication level to use when binding to the LDAP server, defaults to Anonymous. Known - values are: \"Anonymous\" and \"Simple\".""" - bind_dn: Optional[str] = rest_field(name="bindDN", visibility=["read", "create", "update", "delete", "query"]) - """The distinguished name (DN) to bind as when performing LDAP operations.""" - bind_password_akv_config: Optional["_models.BindPasswordAkvConfig"] = rest_field( - name="bindPasswordAkvConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is - stored.""" - - @overload - def __init__( - self, - *, - domain: Optional[str] = None, - ldap_servers: Optional[list[str]] = None, - ldap_over_tls: Optional[bool] = None, - server_ca_certificate: Optional[str] = None, - certificate_cn_host: Optional[str] = None, - bind_authentication_level: Optional[Union[str, "_models.BindAuthenticationLevel"]] = None, - bind_dn: Optional[str] = None, - bind_password_akv_config: Optional["_models.BindPasswordAkvConfig"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LdapConfigurationPatch(_Model): - """LDAP configuration for PATCH operations (no default values). - - :ivar domain: Name of the LDAP configuration domain. - :vartype domain: str - :ivar ldap_servers: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. - :vartype ldap_servers: list[str] - :ivar ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. - :vartype ldap_over_tls: bool - :ivar server_ca_certificate: When LDAP over SSL/TLS is enabled, the LDAP client is required to - have base64 encoded ldap servers CA certificate. - :vartype server_ca_certificate: str - :ivar certificate_cn_host: The CN host name used while generating the certificate, LDAP Over - TLS requires the CN host name to create DNS host entry. - :vartype certificate_cn_host: str - :ivar bind_authentication_level: The authentication level to use when binding to the LDAP - server, defaults to Anonymous. Known values are: "Anonymous" and "Simple". - :vartype bind_authentication_level: str or ~azure.mgmt.netapp.models.BindAuthenticationLevel - :ivar bind_dn: The distinguished name (DN) to bind as when performing LDAP operations. - :vartype bind_dn: str - :ivar bind_password_akv_config: The Azure Key Vault configuration where the Bind DN - (Distinguished Name) user password is stored. - :vartype bind_password_akv_config: ~azure.mgmt.netapp.models.BindPasswordAkvConfigPatch - """ - - domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Name of the LDAP configuration domain.""" - ldap_servers: Optional[list[str]] = rest_field( - name="ldapServers", visibility=["read", "create", "update", "delete", "query"] - ) - """List of LDAP server IP addresses (IPv4 only) for the LDAP domain.""" - ldap_over_tls: Optional[bool] = rest_field( - name="ldapOverTLS", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies whether or not the LDAP traffic needs to be secured via TLS.""" - server_ca_certificate: Optional[str] = rest_field( - name="serverCACertificate", visibility=["read", "create", "update", "delete", "query"] - ) - """When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap - servers CA certificate.""" - certificate_cn_host: Optional[str] = rest_field( - name="certificateCNHost", visibility=["read", "create", "update", "delete", "query"] - ) - """The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name - to create DNS host entry.""" - bind_authentication_level: Optional[Union[str, "_models.BindAuthenticationLevel"]] = rest_field( - name="bindAuthenticationLevel", visibility=["read", "create", "update", "delete", "query"] - ) - """The authentication level to use when binding to the LDAP server, defaults to Anonymous. Known - values are: \"Anonymous\" and \"Simple\".""" - bind_dn: Optional[str] = rest_field(name="bindDN", visibility=["read", "create", "update", "delete", "query"]) - """The distinguished name (DN) to bind as when performing LDAP operations.""" - bind_password_akv_config: Optional["_models.BindPasswordAkvConfigPatch"] = rest_field( - name="bindPasswordAkvConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is - stored.""" - - @overload - def __init__( - self, - *, - domain: Optional[str] = None, - ldap_servers: Optional[list[str]] = None, - ldap_over_tls: Optional[bool] = None, - server_ca_certificate: Optional[str] = None, - certificate_cn_host: Optional[str] = None, - bind_authentication_level: Optional[Union[str, "_models.BindAuthenticationLevel"]] = None, - bind_dn: Optional[str] = None, - bind_password_akv_config: Optional["_models.BindPasswordAkvConfigPatch"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class LdapSearchScopeOpt(_Model): """LDAP search scope. @@ -7088,12 +3957,10 @@ class NetAppAccount(TrackedResource): __flattened_items = [ "provisioning_state", "active_directories", - "entra_id_config", "encryption", "disable_showmount", "nfs_v4_id_domain", "multi_ad_status", - "ldap_configuration", ] @overload @@ -7138,40 +4005,58 @@ def __setattr__(self, key: str, value: Any) -> None: class NetAppAccountPatch(_Model): """NetApp account patch resource. - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar properties: NetApp Account properties. - :vartype properties: ~azure.mgmt.netapp.models.AccountPropertiesPatch + :vartype properties: ~azure.mgmt.netapp.models.AccountProperties + :ivar identity: The identity used for the resource. + :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity """ - identity: Optional["_models.ManagedServiceIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The managed service identities assigned to this resource.""" + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Resource Id.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.AccountPropertiesPatch"] = rest_field( + properties: Optional["_models.AccountProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """NetApp Account properties.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The identity used for the resource.""" __flattened_items = [ + "provisioning_state", "active_directories", "encryption", + "disable_showmount", "nfs_v4_id_domain", - "entra_id_config", - "ldap_configuration", + "multi_ad_status", ] @overload def __init__( self, *, - identity: Optional["_models.ManagedServiceIdentity"] = None, + location: Optional[str] = None, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.AccountPropertiesPatch"] = None, + properties: Optional["_models.AccountProperties"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, ) -> None: ... @overload @@ -7688,8 +4573,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class PoolPatchProperties(_Model): """Patchable pool properties. - :ivar size: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 - bytes) or in 1TiB chunks (value must be multiple of 1099511627776). + :ivar size: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value + must be multiple of 1099511627776). :vartype size: int :ivar qos_type: The qos type of the pool. Known values are: "Auto" and "Manual". :vartype qos_type: str or ~azure.mgmt.netapp.models.QosType @@ -7701,8 +4586,8 @@ class PoolPatchProperties(_Model): """ size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in - 1TiB chunks (value must be multiple of 1099511627776).""" + """Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + multiple of 1099511627776).""" qos_type: Optional[Union[str, "_models.QosType"]] = rest_field( name="qosType", visibility=["read", "create", "update", "delete", "query"] ) @@ -7743,8 +4628,8 @@ class PoolProperties(_Model): :ivar pool_id: UUID v4 used to identify the Pool. :vartype pool_id: str - :ivar size: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 - bytes) or in 1TiB chunks (value must be multiple of 1099511627776). Required. + :ivar size: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value + must be multiple of 1099511627776). Required. :vartype size: int :ivar service_level: The service level of the file system. Required. Known values are: "Standard", "Premium", "Ultra", "StandardZRS", and "Flexible". @@ -7771,8 +4656,8 @@ class PoolProperties(_Model): pool_id: Optional[str] = rest_field(name="poolId", visibility=["read"]) """UUID v4 used to identify the Pool.""" size: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in - 1TiB chunks (value must be multiple of 1099511627776). Required.""" + """Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + multiple of 1099511627776). Required.""" service_level: Union[str, "_models.ServiceLevel"] = rest_field( name="serviceLevel", visibility=["read", "create", "update", "delete", "query"] ) @@ -8941,116 +5826,6 @@ class RestoreStatus(_Model): """Displays the total bytes transferred.""" -class SecretPassword(_Model): - """Access password from Azure KeyVault Secrets to connect Active Directory. - - :ivar key_vault_properties: Properties provided by KeyVault. - :vartype key_vault_properties: ~azure.mgmt.netapp.models.SecretPasswordKeyVaultProperties - :ivar identity: Identity used to authenticate to KeyVault. Applicable if keySource is - 'Microsoft.KeyVault'. - :vartype identity: ~azure.mgmt.netapp.models.SecretPasswordIdentity - """ - - key_vault_properties: Optional["_models.SecretPasswordKeyVaultProperties"] = rest_field( - name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"] - ) - """Properties provided by KeyVault.""" - identity: Optional["_models.SecretPasswordIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'.""" - - @overload - def __init__( - self, - *, - key_vault_properties: Optional["_models.SecretPasswordKeyVaultProperties"] = None, - identity: Optional["_models.SecretPasswordIdentity"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class SecretPasswordIdentity(_Model): - """Identity used to authenticate with key vault. - - :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key - vault. Read-only. - :vartype principal_id: str - :ivar user_assigned_identity: The Azure resource identifier of the user assigned identity used - to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match - key of identity.userAssignedIdentities. - :vartype user_assigned_identity: str - """ - - principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) - """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only.""" - user_assigned_identity: Optional[str] = rest_field( - name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] - ) - """The Azure resource identifier of the user assigned identity used to authenticate with key - vault. Applicable if identity.type has 'UserAssigned'. It should match key of - identity.userAssignedIdentities.""" - - @overload - def __init__( - self, - *, - user_assigned_identity: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class SecretPasswordKeyVaultProperties(_Model): - """Properties of key vault to get the secrets for password. - - :ivar key_vault_uri: The Uri of KeyVault. Required. - :vartype key_vault_uri: str - :ivar secret_name: The name of KeyVault password secret. Required. - :vartype secret_name: str - """ - - key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]) - """The Uri of KeyVault. Required.""" - secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"]) - """The name of KeyVault password secret. Required.""" - - @overload - def __init__( - self, - *, - key_vault_uri: str, - secret_name: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ServiceSpecification(_Model): """One property of operation, include metric specifications. @@ -9521,7 +6296,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class SubvolumeInfo(ProxyResource): - """Subvolume Information properties. + """Subvolume Information properties Deprecated. This resource type will be removed in a future API + version. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -10272,7 +7048,6 @@ class Volume(TrackedResource): "encryption_key_source", "key_vault_private_endpoint_resource_id", "ldap_enabled", - "ldap_server_type", "cool_access", "coolness_period", "cool_access_retrieval_policy", @@ -10296,10 +7071,9 @@ class Volume(TrackedResource): "enable_subvolumes", "provisioned_availability_zone", "is_large_volume", - "large_volume_type", "originating_resource_id", "inherited_size_in_bytes", - "language", + "breakthrough_mode_old", "breakthrough_mode", ] @@ -10764,7 +7538,6 @@ class VolumeGroupVolumeProperties(_Model): "encryption_key_source", "key_vault_private_endpoint_resource_id", "ldap_enabled", - "ldap_server_type", "cool_access", "coolness_period", "cool_access_retrieval_policy", @@ -10788,10 +7561,9 @@ class VolumeGroupVolumeProperties(_Model): "enable_subvolumes", "provisioned_availability_zone", "is_large_volume", - "large_volume_type", "originating_resource_id", "inherited_size_in_bytes", - "language", + "breakthrough_mode_old", "breakthrough_mode", ] @@ -10933,8 +7705,7 @@ class VolumePatchProperties(_Model): :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. For extra large volumes, valid values are in the - range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :vartype usage_threshold: int :ivar export_policy: Set of export policy rules. :vartype export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy @@ -11006,8 +7777,7 @@ class VolumePatchProperties(_Model): """Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - 2400GiB to 2400TiB. For extra large volumes, valid values are in the range 2400GiB to 7200TiB. - Values expressed in bytes as multiples of 1 GiB.""" + 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.""" export_policy: Optional["_models.VolumePatchPropertiesExportPolicy"] = rest_field( name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] ) @@ -11210,8 +7980,8 @@ class VolumeProperties(_Model): :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. For extra large volumes, valid values are in the - range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. Required. + exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + Required. :vartype usage_threshold: int :ivar export_policy: Set of export policy rules. :vartype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy @@ -11303,9 +8073,6 @@ class VolumeProperties(_Model): :vartype key_vault_private_endpoint_resource_id: str :ivar ldap_enabled: Specifies whether LDAP is enabled or not for a given NFS volume. :vartype ldap_enabled: bool - :ivar ldap_server_type: Specifies the type of LDAP server for a given NFS volume. Known values - are: "ActiveDirectory" and "OpenLDAP". - :vartype ldap_server_type: str or ~azure.mgmt.netapp.models.LdapServerType :ivar cool_access: Specifies whether Cool Access(tiering) is enabled for the volume. :vartype cool_access: bool :ivar coolness_period: Specifies the number of days after which data that is not accessed by @@ -11376,35 +8143,23 @@ class VolumeProperties(_Model): :vartype encrypted: bool :ivar placement_rules: Application specific placement rules for the particular volume. :vartype placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] - :ivar enable_subvolumes: Flag indicating whether subvolume operations are enabled on the - volume. Known values are: "Enabled" and "Disabled". + :ivar enable_subvolumes: Flag indicating whether subvolume operations are enabled on the volume + Deprecated. Subvolume operations and this flag will be removed in a future API version. Known + values are: "Enabled" and "Disabled". :vartype enable_subvolumes: str or ~azure.mgmt.netapp.models.EnableSubvolumes :ivar provisioned_availability_zone: The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. :vartype provisioned_availability_zone: str :ivar is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. :vartype is_large_volume: bool - :ivar large_volume_type: Specifies the type of the Large Volume. When set to 'LargeVolume', the - large volume is created with standard configuration. If it is set to - 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB - with cool access enabled, delivering higher capacity limit with lower costs. Known values are: - "LargeVolume" and "PremExtraLargeVolume7Dot2PiB". - :vartype large_volume_type: str or ~azure.mgmt.netapp.models.LargeVolumeType :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. :vartype originating_resource_id: str :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in bytes. :vartype inherited_size_in_bytes: int - :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", - "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", - "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", - "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", - "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", - "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", - "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", - "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", - "tr", "tr.utf-8", "en-us", and "en-us.utf-8". - :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage + :ivar breakthrough_mode_old: Specifies whether the volume operates in Breakthrough Mode. Known + values are: "Enabled" and "Disabled". + :vartype breakthrough_mode_old: str or ~azure.mgmt.netapp.models.BreakthroughMode :ivar breakthrough_mode: Specifies whether the volume operates in Breakthrough Mode. Known values are: "Enabled" and "Disabled". :vartype breakthrough_mode: str or ~azure.mgmt.netapp.models.BreakthroughMode @@ -11423,8 +8178,7 @@ class VolumeProperties(_Model): """Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - 2400GiB to 2400TiB. For extra large volumes, valid values are in the range 2400GiB to 7200TiB. - Values expressed in bytes as multiples of 1 GiB. Required.""" + 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. Required.""" export_policy: Optional["_models.VolumePropertiesExportPolicy"] = rest_field( name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] ) @@ -11539,11 +8293,6 @@ class VolumeProperties(_Model): volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" ldap_enabled: Optional[bool] = rest_field(name="ldapEnabled", visibility=["read", "create"]) """Specifies whether LDAP is enabled or not for a given NFS volume.""" - ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = rest_field( - name="ldapServerType", visibility=["read", "create"] - ) - """Specifies the type of LDAP server for a given NFS volume. Known values are: \"ActiveDirectory\" - and \"OpenLDAP\".""" cool_access: Optional[bool] = rest_field( name="coolAccess", visibility=["read", "create", "update", "delete", "query"] ) @@ -11637,39 +8386,23 @@ class VolumeProperties(_Model): enable_subvolumes: Optional[Union[str, "_models.EnableSubvolumes"]] = rest_field( name="enableSubvolumes", visibility=["read", "create", "update", "delete", "query"] ) - """Flag indicating whether subvolume operations are enabled on the volume. Known values are: - \"Enabled\" and \"Disabled\".""" + """Flag indicating whether subvolume operations are enabled on the volume Deprecated. Subvolume + operations and this flag will be removed in a future API version. Known values are: \"Enabled\" + and \"Disabled\".""" provisioned_availability_zone: Optional[str] = rest_field(name="provisionedAvailabilityZone", visibility=["read"]) """The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides.""" is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read", "create"]) """Specifies whether volume is a Large Volume or Regular Volume.""" - large_volume_type: Optional[Union[str, "_models.LargeVolumeType"]] = rest_field( - name="largeVolumeType", visibility=["read", "create"] - ) - """Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created - with standard configuration. If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume - is created with higher capacity limit 7.2PiB with cool access enabled, delivering higher - capacity limit with lower costs. Known values are: \"LargeVolume\" and - \"PremExtraLargeVolume7Dot2PiB\".""" originating_resource_id: Optional[str] = rest_field(name="originatingResourceId", visibility=["read"]) """Id of the snapshot or backup that the volume is restored from.""" inherited_size_in_bytes: Optional[int] = rest_field(name="inheritedSizeInBytes", visibility=["read"]) """Space shared by short term clone volume with parent volume in bytes.""" - language: Optional[Union[str, "_models.VolumeLanguage"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + breakthrough_mode_old: Optional[Union[str, "_models.BreakthroughMode"]] = rest_field( + name="breakthroughModeOld", visibility=["read", "create", "update", "delete", "query"] ) - """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\", - \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\", - \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\", - \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\", - \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\", - \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\", - \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\", - \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\", - \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\", - \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and - \"en-us.utf-8\".""" + """Specifies whether the volume operates in Breakthrough Mode. Known values are: \"Enabled\" and + \"Disabled\".""" breakthrough_mode: Optional[Union[str, "_models.BreakthroughMode"]] = rest_field( name="breakthroughMode", visibility=["read", "create"] ) @@ -11706,7 +8439,6 @@ def __init__( # pylint: disable=too-many-locals encryption_key_source: Optional[Union[str, "_models.EncryptionKeySource"]] = None, key_vault_private_endpoint_resource_id: Optional[str] = None, ldap_enabled: Optional[bool] = None, - ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = None, cool_access: Optional[bool] = None, coolness_period: Optional[int] = None, cool_access_retrieval_policy: Optional[Union[str, "_models.CoolAccessRetrievalPolicy"]] = None, @@ -11722,8 +8454,7 @@ def __init__( # pylint: disable=too-many-locals placement_rules: Optional[list["_models.PlacementKeyValuePairs"]] = None, enable_subvolumes: Optional[Union[str, "_models.EnableSubvolumes"]] = None, is_large_volume: Optional[bool] = None, - large_volume_type: Optional[Union[str, "_models.LargeVolumeType"]] = None, - language: Optional[Union[str, "_models.VolumeLanguage"]] = None, + breakthrough_mode_old: Optional[Union[str, "_models.BreakthroughMode"]] = None, breakthrough_mode: Optional[Union[str, "_models.BreakthroughMode"]] = None, ) -> None: ... diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py index dc8916780c55..4edfa8469e9a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py @@ -25,15 +25,6 @@ from ._operations import BackupVaultsOperations # type: ignore from ._operations import BucketsOperations # type: ignore from ._operations import CachesOperations # type: ignore -from ._operations import ElasticAccountsOperations # type: ignore -from ._operations import ElasticCapacityPoolsOperations # type: ignore -from ._operations import ElasticVolumesOperations # type: ignore -from ._operations import ElasticSnapshotsOperations # type: ignore -from ._operations import ElasticSnapshotPoliciesOperations # type: ignore -from ._operations import ElasticBackupVaultsOperations # type: ignore -from ._operations import ElasticBackupPoliciesOperations # type: ignore -from ._operations import ElasticBackupsOperations # type: ignore -from ._operations import ActiveDirectoryConfigsOperations # type: ignore from ._operations import NetAppResourceQuotaLimitsOperations # type: ignore from ._operations import NetAppResourceRegionInfosOperations # type: ignore from ._operations import AccountsOperations # type: ignore @@ -63,15 +54,6 @@ "BackupVaultsOperations", "BucketsOperations", "CachesOperations", - "ElasticAccountsOperations", - "ElasticCapacityPoolsOperations", - "ElasticVolumesOperations", - "ElasticSnapshotsOperations", - "ElasticSnapshotPoliciesOperations", - "ElasticBackupVaultsOperations", - "ElasticBackupPoliciesOperations", - "ElasticBackupsOperations", - "ActiveDirectoryConfigsOperations", "NetAppResourceQuotaLimitsOperations", "NetAppResourceRegionInfosOperations", "AccountsOperations", diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index 06d9fb96a436..deba723024ac 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py @@ -32,7 +32,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models as _models +from .. import models as _models, types as _types from .._configuration import NetAppManagementClientConfiguration from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer @@ -40,7 +40,6 @@ T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() @@ -51,7 +50,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +71,7 @@ def build_net_app_resource_quota_limits_account_get_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +100,7 @@ def build_net_app_resource_quota_limits_account_list_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,7 +128,7 @@ def build_volume_groups_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -159,7 +158,7 @@ def build_volume_groups_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +188,7 @@ def build_volume_groups_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" path_format_arguments = { @@ -213,7 +212,7 @@ def build_volume_groups_list_by_net_app_account_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -246,7 +245,7 @@ def build_backups_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -282,7 +281,7 @@ def build_backups_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,7 +319,7 @@ def build_backups_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -356,7 +355,7 @@ def build_backups_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}" path_format_arguments = { @@ -387,7 +386,7 @@ def build_backups_list_by_vault_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -418,7 +417,7 @@ def build_backups_get_latest_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -448,7 +447,7 @@ def build_backups_get_volume_latest_restore_status_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -478,7 +477,7 @@ def build_volumes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -509,7 +508,7 @@ def build_volumes_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -542,7 +541,7 @@ def build_volumes_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -580,7 +579,7 @@ def build_volumes_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" path_format_arguments = { @@ -607,7 +606,7 @@ def build_volumes_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -636,7 +635,7 @@ def build_volumes_populate_availability_zone_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -667,7 +666,7 @@ def build_volumes_revert_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert" path_format_arguments = { @@ -695,7 +694,7 @@ def build_volumes_reset_cifs_password_request( # pylint: disable=name-too-long ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword" path_format_arguments = { @@ -720,7 +719,7 @@ def build_volumes_split_clone_from_parent_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -751,7 +750,7 @@ def build_volumes_break_file_locks_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakFileLocks" path_format_arguments = { @@ -781,7 +780,7 @@ def build_volumes_list_get_group_id_list_for_ldap_user_request( # pylint: disab _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -814,7 +813,7 @@ def build_volumes_break_replication_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication" path_format_arguments = { @@ -844,7 +843,7 @@ def build_volumes_reestablish_replication_request( # pylint: disable=name-too-l _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reestablishReplication" path_format_arguments = { @@ -873,7 +872,7 @@ def build_volumes_replication_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -904,7 +903,7 @@ def build_volumes_list_replications_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -935,7 +934,7 @@ def build_volumes_resync_replication_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication" path_format_arguments = { @@ -959,7 +958,7 @@ def build_volumes_delete_replication_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication" path_format_arguments = { @@ -985,7 +984,7 @@ def build_volumes_authorize_replication_request( # pylint: disable=name-too-lon _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication" path_format_arguments = { @@ -1013,7 +1012,7 @@ def build_volumes_re_initialize_replication_request( # pylint: disable=name-too ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication" path_format_arguments = { @@ -1039,7 +1038,7 @@ def build_volumes_peer_external_cluster_request( # pylint: disable=name-too-lon _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1071,7 +1070,7 @@ def build_volumes_authorize_external_replication_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1100,7 +1099,7 @@ def build_volumes_finalize_external_replication_request( # pylint: disable=name ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication" path_format_arguments = { @@ -1124,7 +1123,7 @@ def build_volumes_perform_replication_transfer_request( # pylint: disable=name- ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer" path_format_arguments = { @@ -1150,7 +1149,7 @@ def build_volumes_pool_change_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange" path_format_arguments = { @@ -1180,7 +1179,7 @@ def build_volumes_relocate_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate" path_format_arguments = { @@ -1208,7 +1207,7 @@ def build_volumes_finalize_relocation_request( # pylint: disable=name-too-long ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation" path_format_arguments = { @@ -1232,7 +1231,7 @@ def build_volumes_revert_relocation_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation" path_format_arguments = { @@ -1258,7 +1257,7 @@ def build_volumes_list_quota_report_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1296,7 +1295,7 @@ def build_snapshots_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1334,7 +1333,7 @@ def build_snapshots_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1374,7 +1373,7 @@ def build_snapshots_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1412,7 +1411,7 @@ def build_snapshots_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" path_format_arguments = { @@ -1438,7 +1437,7 @@ def build_snapshots_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1475,7 +1474,7 @@ def build_snapshots_restore_files_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles" path_format_arguments = { @@ -1505,7 +1504,7 @@ def build_snapshot_policies_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1535,7 +1534,7 @@ def build_snapshot_policies_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1567,7 +1566,7 @@ def build_snapshot_policies_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1597,7 +1596,7 @@ def build_snapshot_policies_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" path_format_arguments = { @@ -1621,7 +1620,7 @@ def build_snapshot_policies_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1649,7 +1648,7 @@ def build_snapshot_policies_list_volumes_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1678,7 +1677,7 @@ def build_backup_policies_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1708,7 +1707,7 @@ def build_backup_policies_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1740,7 +1739,7 @@ def build_backup_policies_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1770,7 +1769,7 @@ def build_backup_policies_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" path_format_arguments = { @@ -1794,7 +1793,7 @@ def build_backup_policies_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1828,7 +1827,7 @@ def build_volume_quota_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1866,7 +1865,7 @@ def build_volume_quota_rules_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1906,7 +1905,7 @@ def build_volume_quota_rules_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1944,7 +1943,7 @@ def build_volume_quota_rules_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}" path_format_arguments = { @@ -1970,7 +1969,7 @@ def build_volume_quota_rules_list_by_volume_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2006,7 +2005,7 @@ def build_ransomware_reports_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2037,7 +2036,7 @@ def build_ransomware_reports_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2074,7 +2073,7 @@ def build_ransomware_reports_clear_suspects_request( # pylint: disable=name-too _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects" path_format_arguments = { @@ -2104,7 +2103,7 @@ def build_backup_vaults_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2134,7 +2133,7 @@ def build_backup_vaults_create_or_update_request( # pylint: disable=name-too-lo _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2166,7 +2165,7 @@ def build_backup_vaults_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2196,7 +2195,7 @@ def build_backup_vaults_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}" path_format_arguments = { @@ -2220,7 +2219,7 @@ def build_backup_vaults_list_by_net_app_account_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2254,7 +2253,7 @@ def build_buckets_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2292,7 +2291,7 @@ def build_buckets_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2332,7 +2331,7 @@ def build_buckets_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2370,7 +2369,7 @@ def build_buckets_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}" path_format_arguments = { @@ -2396,7 +2395,7 @@ def build_buckets_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2433,7 +2432,7 @@ def build_buckets_generate_credentials_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2473,7 +2472,7 @@ def build_buckets_generate_akv_credentials_request( # pylint: disable=name-too- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateAkvCredentials" path_format_arguments = { @@ -2508,7 +2507,7 @@ def build_buckets_refresh_certificate_request( # pylint: disable=name-too-long ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/refreshCertificate" path_format_arguments = { @@ -2534,7 +2533,7 @@ def build_caches_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2565,7 +2564,7 @@ def build_caches_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2598,7 +2597,7 @@ def build_caches_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2629,7 +2628,7 @@ def build_caches_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}" path_format_arguments = { @@ -2654,7 +2653,7 @@ def build_caches_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2683,7 +2682,7 @@ def build_caches_list_peering_passphrases_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2714,7 +2713,7 @@ def build_caches_pool_change_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2746,7 +2745,7 @@ def build_caches_reset_smb_password_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2770,21 +2769,23 @@ def build_caches_reset_smb_password_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_get_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_quota_limits_get_request( # pylint: disable=name-too-long + location: str, quota_limit_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}" + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}" + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "quotaLimitName": _SERIALIZER.url("quota_limit_name", quota_limit_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2798,22 +2799,20 @@ def build_elastic_accounts_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_quota_limits_list_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2822,29 +2821,25 @@ def build_elastic_accounts_create_or_update_request( # pylint: disable=name-too _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_update_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_region_infos_get_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2853,25 +2848,25 @@ def build_elastic_accounts_update_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_delete_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_region_infos_list_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2879,25 +2874,27 @@ def build_elastic_accounts_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any +def build_accounts_get_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts" - ) + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2911,19 +2908,22 @@ def build_elastic_accounts_list_by_resource_group_request( # pylint: disable=na return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_accounts_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any +def build_accounts_create_or_update_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2932,27 +2932,29 @@ def build_elastic_accounts_list_by_subscription_request( # pylint: disable=name _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_get_request( - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_accounts_update_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2961,28 +2963,49 @@ def build_elastic_capacity_pools_get_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_accounts_delete_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_accounts_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}" + _url = ( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts" + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2991,30 +3014,24 @@ def build_elastic_capacity_pools_create_or_update_request( # pylint: disable=na _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_accounts_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3023,26 +3040,23 @@ def build_elastic_capacity_pools_update_request( # pylint: disable=name-too-lon _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_delete_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_accounts_renew_credentials_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3050,20 +3064,48 @@ def build_elastic_capacity_pools_delete_request( # pylint: disable=name-too-lon # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + +def build_accounts_transition_to_cmk_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore -def build_elastic_capacity_pools_list_by_elastic_account_request( # pylint: disable=name-too-long + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_accounts_get_change_key_vault_information_request( # pylint: disable=name-too-long resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -3078,26 +3120,23 @@ def build_elastic_capacity_pools_list_by_elastic_account_request( # pylint: dis # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_change_zone_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_accounts_change_key_vault_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3108,28 +3147,24 @@ def build_elastic_capacity_pools_change_zone_request( # pylint: disable=name-to # Construct headers if content_type is not None: _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_capacity_pools_check_volume_file_path_availability_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_backups_under_account_migrate_backups_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3140,28 +3175,26 @@ def build_elastic_capacity_pools_check_volume_file_path_availability_request( # # Construct headers if content_type is not None: _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_volumes_get_request( - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_pools_get_request( + resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3175,24 +3208,23 @@ def build_elastic_volumes_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_volumes_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_pools_create_or_update_request( + resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3208,24 +3240,23 @@ def build_elastic_volumes_create_or_update_request( # pylint: disable=name-too- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_volumes_update_request( - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_pools_update_request( + resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3241,20 +3272,19 @@ def build_elastic_volumes_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_volumes_delete_request( - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_pools_delete_request( + resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3265,22 +3295,21 @@ def build_elastic_volumes_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_elastic_volumes_list_by_elastic_pool_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any +def build_pools_list_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3294,18 +3323,51 @@ def build_elastic_volumes_list_by_elastic_pool_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_volumes_revert_request( - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_backups_under_backup_vault_restore_files_request( # pylint: disable=name-too-long + resource_group_name: str, + account_name: str, + backup_vault_name: str, + backup_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), + "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backups_under_volume_migrate_backups_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -3322,35 +3384,34 @@ def build_elastic_volumes_revert_request( # Construct headers if content_type is not None: _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshots_get_request( +def build_subvolumes_get_request( resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + subvolume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"), + "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3364,12 +3425,12 @@ def build_elastic_snapshots_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshots_create_or_update_request( # pylint: disable=name-too-long +def build_subvolumes_create_request( resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + subvolume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -3377,18 +3438,18 @@ def build_elastic_snapshots_create_or_update_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"), + "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3404,27 +3465,31 @@ def build_elastic_snapshots_create_or_update_request( # pylint: disable=name-to return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshots_delete_request( +def build_subvolumes_update_request( resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + subvolume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}" - path_format_arguments = { + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" + path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"), + "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3432,26 +3497,35 @@ def build_elastic_snapshots_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshots_list_by_elastic_volume_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +def build_subvolumes_delete_request( + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), + "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3459,28 +3533,26 @@ def build_elastic_snapshots_list_by_elastic_volume_request( # pylint: disable=n # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_elastic_snapshot_policies_get_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any +def build_subvolumes_list_by_volume_request( + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"), + "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), + "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3494,23 +3566,30 @@ def build_elastic_snapshot_policies_get_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshot_policies_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any +def build_subvolumes_get_metadata_request( + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + subvolume_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"), + "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), + "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), + "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3519,30 +3598,26 @@ def build_elastic_snapshot_policies_create_or_update_request( # pylint: disable _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshot_policies_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_check_name_availability_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3555,47 +3630,24 @@ def build_elastic_snapshot_policies_update_request( # pylint: disable=name-too- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_snapshot_policies_delete_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshot_policies_list_by_elastic_account_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_check_file_path_availability_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3604,27 +3656,28 @@ def build_elastic_snapshot_policies_list_by_elastic_account_request( # pylint: _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_snapshot_policies_list_elastic_volumes_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_check_quota_availability_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3633,27 +3686,27 @@ def build_elastic_snapshot_policies_list_elastic_volumes_request( # pylint: dis _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_vaults_get_request( - resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_query_region_info_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3667,23 +3720,21 @@ def build_elastic_backup_vaults_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_vaults_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_query_network_sibling_set_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3696,26 +3747,24 @@ def build_elastic_backup_vaults_create_or_update_request( # pylint: disable=nam _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_vaults_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_update_network_sibling_set_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/updateNetworkSiblingSet" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3728,47 +3777,23 @@ def build_elastic_backup_vaults_update_request( # pylint: disable=name-too-long _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backup_vaults_delete_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_vaults_list_by_elastic_account_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_usages_list_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3782,22 +3807,21 @@ def build_elastic_backup_vaults_list_by_elastic_account_request( # pylint: disa return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_policies_get_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any +def build_net_app_resource_usages_get_request( # pylint: disable=name-too-long + location: str, usage_type: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages/{usageType}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "usageType": _SERIALIZER.url("usage_type", usage_type, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -3811,9747 +3835,58 @@ def build_elastic_backup_policies_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_elastic_backup_policies_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"), - } + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`operations` attribute. + """ - _url: str = _url.format(**path_format_arguments) # type: ignore + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) -def build_elastic_backup_policies_update_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backup_policies_delete_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_elastic_backup_policies_list_by_elastic_account_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backups_get_request( - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backups_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backups_update_request( - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_elastic_backups_delete_request( - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_elastic_backups_list_by_vault_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_active_directory_configs_get_request( # pylint: disable=name-too-long - resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "activeDirectoryConfigName": _SERIALIZER.url( - "active_directory_config_name", active_directory_config_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_active_directory_configs_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "activeDirectoryConfigName": _SERIALIZER.url( - "active_directory_config_name", active_directory_config_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_active_directory_configs_update_request( # pylint: disable=name-too-long - resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "activeDirectoryConfigName": _SERIALIZER.url( - "active_directory_config_name", active_directory_config_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_active_directory_configs_delete_request( # pylint: disable=name-too-long - resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "activeDirectoryConfigName": _SERIALIZER.url( - "active_directory_config_name", active_directory_config_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_active_directory_configs_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_active_directory_configs_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_quota_limits_get_request( # pylint: disable=name-too-long - location: str, quota_limit_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - "quotaLimitName": _SERIALIZER.url("quota_limit_name", quota_limit_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_quota_limits_list_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_region_infos_get_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_region_infos_list_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_get_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_create_or_update_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_update_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_delete_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_accounts_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_list_by_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_renew_credentials_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="POST", url=_url, params=_params, **kwargs) - - -def build_accounts_transition_to_cmk_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_get_change_key_vault_information_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_change_key_vault_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_accounts_refresh_ldap_bind_password_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/refreshLdapBindPassword" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="POST", url=_url, params=_params, **kwargs) - - -def build_backups_under_account_migrate_backups_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pools_get_request( - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pools_create_or_update_request( - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pools_update_request( - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pools_delete_request( - resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_pools_list_request( - resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_backups_under_backup_vault_restore_files_request( # pylint: disable=name-too-long - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"), - "backupName": _SERIALIZER.url("backup_name", backup_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_backups_under_volume_migrate_backups_request( # pylint: disable=name-too-long - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_subvolumes_get_request( - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_subvolumes_create_request( - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_subvolumes_update_request( - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_subvolumes_delete_request( - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_subvolumes_list_by_volume_request( - resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_subvolumes_get_metadata_request( - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - subvolume_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "accountName": _SERIALIZER.url("account_name", account_name, "str"), - "poolName": _SERIALIZER.url("pool_name", pool_name, "str"), - "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"), - "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_check_name_availability_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_check_file_path_availability_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_check_quota_availability_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_query_region_info_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_query_network_sibling_set_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_update_network_sibling_set_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/updateNetworkSiblingSet" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_usages_list_request( # pylint: disable=name-too-long - location: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_net_app_resource_usages_get_request( # pylint: disable=name-too-long - location: str, usage_type: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages/{usageType}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - "usageType": _SERIALIZER.url("usage_type", usage_type, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class Operations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`operations` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """List the operations for the provider. - - :return: An iterator like instance of Operation - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Operation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_operations_list_request( - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Operation], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class NetAppResourceQuotaLimitsAccountOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`net_app_resource_quota_limits_account` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2025-08-01", - params_added_on={ - "2025-08-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "quota_limit_name", - "accept", - ] - }, - api_versions_list=[ - "2025-08-01", - "2025-09-01", - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def get( - self, resource_group_name: str, account_name: str, quota_limit_name: str, **kwargs: Any - ) -> _models.QuotaItem: - """Get the default, current and usages account quota limit. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param quota_limit_name: The name of the Quota Limit. Required. - :type quota_limit_name: str - :return: QuotaItem. The QuotaItem is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.QuotaItem - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None) - - _request = build_net_app_resource_quota_limits_account_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - quota_limit_name=quota_limit_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.QuotaItem, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-08-01", - params_added_on={ - "2025-08-01": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=[ - "2025-08-01", - "2025-09-01", - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.QuotaItem"]: - """Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is - the only one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :return: An iterator like instance of QuotaItem - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.QuotaItem] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_net_app_resource_quota_limits_account_list_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.QuotaItem], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class VolumeGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`volume_groups` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any - ) -> _models.VolumeGroupDetails: - """Get details of the specified volume group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :return: VolumeGroupDetails. The VolumeGroupDetails is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None) - - _request = build_volume_groups_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - volume_group_name=volume_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.VolumeGroupDetails, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volume_groups_create_request( - resource_group_name=resource_group_name, - account_name=account_name, - volume_group_name=volume_group_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: _models.VolumeGroupDetails, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeGroupDetails]: - """Create a volume group along with specified volumes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :param body: Volume Group object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeGroupDetails]: - """Create a volume group along with specified volumes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :param body: Volume Group object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeGroupDetails]: - """Create a volume group along with specified volumes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :param body: Volume Group object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - account_name: str, - volume_group_name: str, - body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.VolumeGroupDetails]: - """Create a volume group along with specified volumes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :param body: Volume Group object supplied in the body of the operation. Is one of the following - types: VolumeGroupDetails, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or JSON or IO[bytes] - :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - volume_group_name=volume_group_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.VolumeGroupDetails, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.VolumeGroupDetails].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.VolumeGroupDetails]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volume_groups_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - volume_group_name=volume_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete the specified volume group only if there are no volumes under volume group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param volume_group_name: The name of the volumeGroup. Required. - :type volume_group_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - volume_group_name=volume_group_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_net_app_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.VolumeGroup"]: - """List all volume groups for given account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :return: An iterator like instance of VolumeGroup - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.VolumeGroup]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_volume_groups_list_by_net_app_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.VolumeGroup], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class BackupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`backups` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> _models.Backup: - """Get the specified Backup under Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :return: Backup. The Backup is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.Backup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Backup] = kwargs.pop("cls", None) - - _request = build_backups_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Backup, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.Backup, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_backups_create_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: _models.Backup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Create a backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.Backup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Create a backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Create a backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.Backup, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Create a backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Is one of the following - types: Backup, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Backup or JSON or IO[bytes] - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Backup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Backup, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Backup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Backup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - _request = build_backups_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[_models.BackupPatch] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Patch a Backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Default value is None. - :type body: ~azure.mgmt.netapp.models.BackupPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Patch a Backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Patch a Backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - backup_name: str, - body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[_models.Backup]: - """Patch a Backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :param body: Backup object supplied in the body of the operation. Is one of the following - types: BackupPatch, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BackupPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns Backup. The Backup is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[_models.Backup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Backup, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Backup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Backup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_backups_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete a Backup under the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param backup_name: The name of the backup. Required. - :type backup_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_vault( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - *, - filter: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.Backup"]: - """List all backups Under a Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :keyword filter: An option to specify the VolumeResourceId. If present, then only returns the - backups under the specified volume. Default value is None. - :paramtype filter: str - :return: An iterator like instance of Backup - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Backup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Backup]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_backups_list_by_vault_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Backup], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_latest_status( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.BackupStatus: - """Get the latest status of the backup for a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: BackupStatus. The BackupStatus is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.BackupStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.BackupStatus] = kwargs.pop("cls", None) - - _request = build_backups_get_latest_status_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.BackupStatus, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_volume_latest_restore_status( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.RestoreStatus: - """Get the latest status of the restore for a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: RestoreStatus. The RestoreStatus is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.RestoreStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RestoreStatus] = kwargs.pop("cls", None) - - _request = build_backups_get_volume_latest_restore_status_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.RestoreStatus, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class VolumesOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`volumes` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.Volume: - """Get the details of the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: Volume. The Volume is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.Volume - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Volume] = kwargs.pop("cls", None) - - _request = build_volumes_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Volume, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.Volume, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.Volume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.Volume - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.Volume, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Create or update the specified volume within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Is one of the following - types: Volume, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Volume or JSON or IO[bytes] - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Volume] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Volume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Volume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Volume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.VolumePatch, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.VolumePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Patch the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.VolumePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Patch the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Patch the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.VolumePatch, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Patch the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Volume object supplied in the body of the operation. Is one of the following - types: VolumePatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumePatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Volume] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Volume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Volume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Volume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - *, - force_delete: Optional[bool] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - force_delete=force_delete, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - *, - force_delete: Optional[bool] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Delete the specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :keyword force_delete: An option to force delete the volume. Will cleanup resources connected - to the particular volume. Default value is None. - :paramtype force_delete: bool - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - force_delete=force_delete, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> ItemPaged["_models.Volume"]: - """List all volumes within the capacity pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :return: An iterator like instance of Volume - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Volume]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_volumes_list_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Volume], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _populate_availability_zone_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_populate_availability_zone_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_populate_availability_zone( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[_models.Volume]: - """This operation will populate availability zone information for a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Volume] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._populate_availability_zone_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Volume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Volume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Volume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _revert_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.VolumeRevert, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_revert_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.VolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Revert a volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Object for snapshot to revert supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.VolumeRevert - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Revert a volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Object for snapshot to revert supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Revert a volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Object for snapshot to revert supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.VolumeRevert, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Revert a volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Object for snapshot to revert supplied in the body of the operation. Is one of the - following types: VolumeRevert, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeRevert or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._revert_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _reset_cifs_password_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_reset_cifs_password_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_reset_cifs_password( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Reset cifs password from volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._reset_cifs_password_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _split_clone_from_parent_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_split_clone_from_parent_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_split_clone_from_parent( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[_models.Volume]: - """Split operation to convert clone volume to an independent volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns Volume. The Volume is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Volume] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._split_clone_from_parent_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Volume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Volume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Volume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _break_file_locks_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - _request = build_volumes_break_file_locks_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[_models.BreakFileLocksRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break all the file locks on a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to provide the ability to clear file locks with selected options. - Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break all the file locks on a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to provide the ability to clear file locks with selected options. - Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break all the file locks on a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to provide the ability to clear file locks with selected options. - Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_break_file_locks( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Break all the file locks on a volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to provide the ability to clear file locks with selected options. Is - one of the following types: BreakFileLocksRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._break_file_locks_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @api_version_validation( - method_added_on="2025-08-01", - params_added_on={ - "2025-08-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-08-01", - "2025-09-01", - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_list_get_group_id_list_for_ldap_user_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.GetGroupIdListForLDAPUserRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: - """Returns the list of group Ids for a specific LDAP User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Returns group Id list for a specific LDAP user. Required. - :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The - GetGroupIdListForLDAPUserResponse is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: - """Returns the list of group Ids for a specific LDAP User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Returns group Id list for a specific LDAP user. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The - GetGroupIdListForLDAPUserResponse is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: - """Returns the list of group Ids for a specific LDAP User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Returns group Id list for a specific LDAP user. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The - GetGroupIdListForLDAPUserResponse is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - @api_version_validation( - method_added_on="2025-08-01", - params_added_on={ - "2025-08-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-08-01", - "2025-09-01", - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: - """Returns the list of group Ids for a specific LDAP User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Returns group Id list for a specific LDAP user. Is one of the following types: - GetGroupIdListForLDAPUserRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The - GetGroupIdListForLDAPUserResponse is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GetGroupIdListForLDAPUserResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._list_get_group_id_list_for_ldap_user_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.GetGroupIdListForLDAPUserResponse, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GetGroupIdListForLDAPUserResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GetGroupIdListForLDAPUserResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _break_replication_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - _request = build_volumes_break_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[_models.BreakReplicationRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break the replication connection on the destination volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to force break the replication. Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break the replication connection on the destination volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to force break the replication. Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Break the replication connection on the destination volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to force break the replication. Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_break_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Break the replication connection on the destination volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Optional body to force break the replication. Is one of the following types: - BreakReplicationRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._break_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _reestablish_replication_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_reestablish_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ReestablishReplicationRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or - policy-based snapshots. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: body for the id of the source volume. Required. - :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or - policy-based snapshots. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: body for the id of the source volume. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or - policy-based snapshots. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: body for the id of the source volume. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_reestablish_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or - policy-based snapshots. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: body for the id of the source volume. Is one of the following types: - ReestablishReplicationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._reestablish_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def replication_status( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.ReplicationStatus: - """Get the status of the replication. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: ReplicationStatus. The ReplicationStatus is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ReplicationStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ReplicationStatus] = kwargs.pop("cls", None) - - _request = build_volumes_replication_status_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ReplicationStatus, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[_models.ListReplicationsRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged["_models.Replication"]: - """List all replications for a specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An iterator like instance of Replication - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged["_models.Replication"]: - """List all replications for a specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An iterator like instance of Replication - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> ItemPaged["_models.Replication"]: - """List all replications for a specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An iterator like instance of Replication - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - @api_version_validation( - method_added_on="2025-08-01", - params_added_on={ - "2025-08-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-08-01", - "2025-09-01", - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def list_replications( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.ListReplicationsRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> ItemPaged["_models.Replication"]: - """List all replications for a specified volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Is one of the following types: - ListReplicationsRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or JSON or IO[bytes] - :return: An iterator like instance of Replication - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[List[_models.Replication]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - def prepare_request(next_link=None): - if not next_link: - - _request = build_volumes_list_replications_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Replication], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _resync_replication_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_resync_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_resync_replication( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Resync the connection on the destination volume. If the operation is ran on the source volume - it will reverse-resync the connection and sync from destination to source. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._resync_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _delete_replication_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_delete_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete_replication( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete the replication connection on the destination volume, and send release to the source - replication. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _authorize_replication_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.AuthorizeRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_authorize_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.AuthorizeRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Authorize the replication connection on the source volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Authorize request object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.AuthorizeRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Authorize the replication connection on the source volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Authorize request object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Authorize the replication connection on the source volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Authorize request object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_authorize_replication( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.AuthorizeRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Authorize the replication connection on the source volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Authorize request object supplied in the body of the operation. Is one of the - following types: AuthorizeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._authorize_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _re_initialize_replication_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_re_initialize_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_re_initialize_replication( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Re-Initializes the replication connection on the destination volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._re_initialize_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _peer_external_cluster_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_peer_external_cluster_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.PeerClusterForVolumeMigrationRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ClusterPeerCommandResponse]: - """Starts peering the external cluster for this migration volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Cluster peer request object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The - ClusterPeerCommandResponse is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ClusterPeerCommandResponse]: - """Starts peering the external cluster for this migration volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Cluster peer request object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The - ClusterPeerCommandResponse is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ClusterPeerCommandResponse]: - """Starts peering the external cluster for this migration volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Cluster peer request object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The - ClusterPeerCommandResponse is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_peer_external_cluster( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ClusterPeerCommandResponse]: - """Starts peering the external cluster for this migration volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Cluster peer request object supplied in the body of the operation. Is one of the - following types: PeerClusterForVolumeMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The - ClusterPeerCommandResponse is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClusterPeerCommandResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._peer_external_cluster_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.ClusterPeerCommandResponse, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ClusterPeerCommandResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ClusterPeerCommandResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _authorize_external_replication_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_authorize_external_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_authorize_external_replication( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[_models.SvmPeerCommandResponse]: - """Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once - the SVM have been peered a SnapMirror will be created. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns SvmPeerCommandResponse. The - SvmPeerCommandResponse is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.SvmPeerCommandResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._authorize_external_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.SvmPeerCommandResponse, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SvmPeerCommandResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SvmPeerCommandResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _finalize_external_replication_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_finalize_external_replication_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_finalize_external_replication( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Finalizes the migration of an external volume by releasing the replication and breaking the - external cluster peering if no other migration is active. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._finalize_external_replication_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _perform_replication_transfer_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_perform_replication_transfer_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_perform_replication_transfer( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Performs an adhoc replication transfer on a volume with volumeType Migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._perform_replication_transfer_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _pool_change_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volumes_pool_change_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.PoolChangeRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Moves volume to another pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Move volume to the pool supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Moves volume to another pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Move volume to the pool supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Moves volume to another pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Move volume to the pool supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_pool_change( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Moves volume to another pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Move volume to the pool supplied in the body of the operation. Is one of the - following types: PoolChangeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._pool_change_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _relocate_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - _request = build_volumes_relocate_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[_models.RelocateVolumeRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Relocates volume to a new stamp. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Relocate volume request. Default value is None. - :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Relocates volume to a new stamp. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Relocate volume request. Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Relocates volume to a new stamp. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Relocate volume request. Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_relocate( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Relocates volume to a new stamp. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: Relocate volume request. Is one of the following types: RelocateVolumeRequest, - JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._relocate_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _finalize_relocation_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_finalize_relocation_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_finalize_relocation( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Finalizes the relocation of the volume and cleans up the old volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._finalize_relocation_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _revert_relocation_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_volumes_revert_relocation_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_revert_relocation( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Reverts the volume relocation process, cleans up the new volume and starts using the - former-existing volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._revert_relocation_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _list_quota_report_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if body else None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - if body is not None: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - else: - _content = None - - _request = build_volumes_list_quota_report_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[_models.QuotaReportFilterRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ListQuotaReportResult]: - """Get quota report for volume (with filter support). - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[JSON] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ListQuotaReportResult]: - """Get quota report for volume (with filter support). - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ListQuotaReportResult]: - """Get quota report for volume (with filter support). - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Default value is None. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_list_quota_report( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[_models.ListQuotaReportResult]: - """Get quota report for volume (with filter support). - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param body: The content of the action request. Is one of the following types: - QuotaReportFilterRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if body else None - cls: ClsType[_models.ListQuotaReportResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._list_quota_report_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.ListQuotaReportResult, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ListQuotaReportResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ListQuotaReportResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - -class SnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> _models.Snapshot: - """Get details of the specified snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - - _request = build_snapshots_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.Snapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_create_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: _models.Snapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Create the specified snapshot within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.Snapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Create the specified snapshot within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Create the specified snapshot within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.Snapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Create the specified snapshot within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Is one of the following - types: Snapshot, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Snapshot or JSON or IO[bytes] - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.Snapshot, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Snapshot].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Snapshot]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.SnapshotPatch, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: _models.SnapshotPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Patch a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Patch a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Patch a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.SnapshotPatch, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Snapshot]: - """Patch a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Snapshot object supplied in the body of the operation. Is one of the following - types: SnapshotPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Snapshot, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Snapshot].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Snapshot]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_snapshots_delete_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """Delete snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> ItemPaged["_models.Snapshot"]: - """List all snapshots associated with the volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_snapshots_list_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -13562,332 +3897,62 @@ def prepare_request(next_link=None): for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Snapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _restore_files_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_restore_files_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - response = pipeline_response.http_response + return _request - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: _models.SnapshotRestoreFiles, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Restore the specified files from the specified snapshot to the active filesystem. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Restore payload supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Restore the specified files from the specified snapshot to the active filesystem. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Restore payload supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Restore the specified files from the specified snapshot to the active filesystem. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Restore payload supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_restore_files( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Restore the specified files from the specified snapshot to the active filesystem. + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param snapshot_name: The name of the snapshot. Required. - :type snapshot_name: str - :param body: Restore payload supplied in the body of the operation. Is one of the following - types: SnapshotRestoreFiles, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + def get_next(next_link=None): + _request = prepare_request(next_link) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._restore_files_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + response = pipeline_response.http_response - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + return pipeline_response - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return ItemPaged(get_next, extract_data) -class SnapshotPoliciesOperations: +class NetAppResourceQuotaLimitsAccountOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`snapshot_policies` attribute. + :attr:`net_app_resource_quota_limits_account` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -13898,20 +3963,46 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace + @api_version_validation( + method_added_on="2025-08-01", + params_added_on={ + "2025-08-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "account_name", + "quota_limit_name", + "accept", + ] + }, + api_versions_list=[ + "2025-08-01", + "2025-09-01", + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], + ) def get( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> _models.SnapshotPolicy: - """Get a snapshot Policy. + self, resource_group_name: str, account_name: str, quota_limit_name: str, **kwargs: Any + ) -> _models.QuotaItem: + """Get the default, current and usages account quota limit. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :param quota_limit_name: The name of the Quota Limit. Required. + :type quota_limit_name: str + :return: QuotaItem. The QuotaItem is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.QuotaItem :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -13925,12 +4016,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None) - _request = build_snapshot_policies_get_request( + _request = build_net_app_resource_quota_limits_account_get_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + quota_limit_name=quota_limit_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -13965,126 +4056,166 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.SnapshotPolicy, response.json()) + deserialized = _deserialize(_models.QuotaItem, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: _models.SnapshotPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SnapshotPolicy: - """Create a snapshot policy. + @distributed_trace + @api_version_validation( + method_added_on="2025-08-01", + params_added_on={ + "2025-08-01": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] + }, + api_versions_list=[ + "2025-08-01", + "2025-09-01", + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], + ) + def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.QuotaItem"]: + """Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is + the only one. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :return: An iterator like instance of QuotaItem + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.QuotaItem] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SnapshotPolicy: - """Create a snapshot policy. + cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SnapshotPolicy: - """Create a snapshot policy. + def prepare_request(next_link=None): + if not next_link: - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ + _request = build_net_app_resource_quota_limits_account_list_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.QuotaItem], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class VolumeGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`volume_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def create( - self, - resource_group_name: str, - account_name: str, - snapshot_policy_name: str, - body: Union[_models.SnapshotPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.SnapshotPolicy: - """Create a snapshot policy. + def get( + self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any + ) -> _models.VolumeGroupDetails: + """Get details of the specified volume group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Is one of the - following types: SnapshotPolicy, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or JSON or IO[bytes] - :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str + :return: VolumeGroupDetails. The VolumeGroupDetails is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -14095,27 +4226,17 @@ def create( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None) - _request = build_snapshot_policies_create_request( + _request = build_volume_groups_get_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + volume_group_name=volume_group_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -14132,7 +4253,7 @@ def create( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -14148,19 +4269,19 @@ def create( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.SnapshotPolicy, response.json()) + deserialized = _deserialize(_models.VolumeGroupDetails, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _update_initial( + def _create_initial( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]], + volume_group_name: str, + body: Union[_models.VolumeGroupDetails, _types.VolumeGroupDetails, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -14184,10 +4305,10 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_snapshot_policies_update_request( + _request = build_volume_groups_create_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + volume_group_name=volume_group_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -14208,7 +4329,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -14221,9 +4342,8 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -14233,137 +4353,138 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: _models.SnapshotPolicyPatch, + volume_group_name: str, + body: _models.VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.SnapshotPolicy]: - """Patch a snapshot policy. + ) -> LROPoller[_models.VolumeGroupDetails]: + """Create a volume group along with specified volumes. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + volume_group_name: str, + body: _types.VolumeGroupDetails, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.SnapshotPolicy]: - """Patch a snapshot policy. + ) -> LROPoller[_models.VolumeGroupDetails]: + """Create a volume group along with specified volumes. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. - :type body: JSON + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.VolumeGroupDetails :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + volume_group_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.SnapshotPolicy]: - """Patch a snapshot policy. + ) -> LROPoller[_models.VolumeGroupDetails]: + """Create a volume group along with specified volumes. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Required. + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]], + volume_group_name: str, + body: Union[_models.VolumeGroupDetails, _types.VolumeGroupDetails, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.SnapshotPolicy]: - """Patch a snapshot policy. + ) -> LROPoller[_models.VolumeGroupDetails]: + """Create a volume group along with specified volumes. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. Is one of the - following types: SnapshotPolicyPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. Is either a + VolumeGroupDetails type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or + ~azure.mgmt.netapp.types.VolumeGroupDetails or IO[bytes] + :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + volume_group_name=volume_group_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -14375,10 +4496,14 @@ def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): + response_headers = {} response = pipeline_response.http_response - deserialized = _deserialize(_models.SnapshotPolicy, response.json()) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.VolumeGroupDetails, response.json()) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { @@ -14394,18 +4519,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.SnapshotPolicy].from_continuation_token( + return LROPoller[_models.VolumeGroupDetails].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.SnapshotPolicy]( + return LROPoller[_models.VolumeGroupDetails]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -14420,10 +4545,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_snapshot_policies_delete_request( + _request = build_volume_groups_delete_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + volume_group_name=volume_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14468,17 +4593,17 @@ def _delete_initial( @distributed_trace def begin_delete( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any ) -> LROPoller[None]: - """Delete snapshot policy. + """Delete the specified volume group only if there are no volumes under volume group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str + :param volume_group_name: The name of the volumeGroup. Required. + :type volume_group_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -14494,7 +4619,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + volume_group_name=volume_group_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -14529,22 +4654,24 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.SnapshotPolicy"]: - """List snapshot policy. + def list_by_net_app_account( + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> ItemPaged["_models.VolumeGroup"]: + """List all volume groups for given account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :return: An iterator like instance of SnapshotPolicy - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SnapshotPolicy] + :return: An iterator like instance of VolumeGroup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeGroup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.SnapshotPolicy]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.VolumeGroup]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -14557,7 +4684,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It def prepare_request(next_link=None): if not next_link: - _request = build_snapshot_policies_list_request( + _request = build_volume_groups_list_by_net_app_account_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, @@ -14600,7 +4727,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.SnapshotPolicy], + List[_models.VolumeGroup], deserialized.get("value", []), ) if cls: @@ -14628,91 +4755,15 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @distributed_trace - def list_volumes( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> _models.SnapshotPolicyVolumeList: - """Get volumes associated with snapshot policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy. Required. - :type snapshot_policy_name: str - :return: SnapshotPolicyVolumeList. The SnapshotPolicyVolumeList is compatible with - MutableMapping - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicyVolumeList - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.SnapshotPolicyVolumeList] = kwargs.pop("cls", None) - - _request = build_snapshot_policies_list_volumes_request( - resource_group_name=resource_group_name, - account_name=account_name, - snapshot_policy_name=snapshot_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.SnapshotPolicyVolumeList, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - -class BackupPoliciesOperations: +class BackupsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`backup_policies` attribute. + :attr:`backups` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -14724,19 +4775,21 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def get( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any - ) -> _models.BackupPolicy: - """Get a particular backup Policy. + self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any + ) -> _models.Backup: + """Get the specified Backup under Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :return: BackupPolicy. The BackupPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.BackupPolicy + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :return: Backup. The Backup is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.Backup :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -14750,12 +4803,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.Backup] = kwargs.pop("cls", None) - _request = build_backup_policies_get_request( + _request = build_backups_get_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14790,7 +4844,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.BackupPolicy, response.json()) + deserialized = _deserialize(_models.Backup, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -14801,8 +4855,9 @@ def _create_initial( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.BackupPolicy, JSON, IO[bytes]], + backup_vault_name: str, + backup_name: str, + body: Union[_models.Backup, _types.Backup, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -14826,10 +4881,11 @@ def _create_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_backup_policies_create_request( + _request = build_backups_create_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -14850,7 +4906,7 @@ def _create_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -14869,10 +4925,6 @@ def _create_initial( ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: @@ -14885,29 +4937,32 @@ def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: _models.BackupPolicy, + backup_vault_name: str, + backup_name: str, + body: _models.Backup, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Create a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Create a backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicy + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.Backup :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -14916,29 +4971,32 @@ def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + backup_vault_name: str, + backup_name: str, + body: _types.Backup, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Create a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Create a backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. - :type body: JSON + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.Backup :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -14947,29 +5005,32 @@ def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + backup_vault_name: str, + backup_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Create a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Create a backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -14978,32 +5039,35 @@ def begin_create( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.BackupPolicy, JSON, IO[bytes]], + backup_vault_name: str, + backup_name: str, + body: Union[_models.Backup, _types.Backup, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Create a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Create a backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Is one of the - following types: BackupPolicy, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicy or JSON or IO[bytes] - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Is either a Backup type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Backup or ~azure.mgmt.netapp.types.Backup or IO[bytes] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.Backup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -15011,7 +5075,8 @@ def begin_create( raw_result = self._create_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -15024,7 +5089,7 @@ def begin_create( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.BackupPolicy, response.json()) + deserialized = _deserialize(_models.Backup, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -15042,13 +5107,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.BackupPolicy].from_continuation_token( + return LROPoller[_models.Backup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackupPolicy]( + return LROPoller[_models.Backup]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -15056,8 +5121,9 @@ def _update_initial( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]], + backup_vault_name: str, + backup_name: str, + body: Optional[Union[_models.BackupPatch, _types.BackupPatch, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -15072,19 +5138,24 @@ def _update_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if body else None _content = None if isinstance(body, (IOBase, bytes)): _content = body else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None - _request = build_backup_policies_update_request( + _request = build_backups_update_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -15119,9 +5190,7 @@ def _update_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -15136,29 +5205,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: _models.BackupPolicyPatch, + backup_vault_name: str, + backup_name: str, + body: Optional[_models.BackupPatch] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Patch a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Patch a Backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Default value is None. + :type body: ~azure.mgmt.netapp.models.BackupPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -15167,29 +5239,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + backup_vault_name: str, + backup_name: str, + body: Optional[_types.BackupPatch] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Patch a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Patch a Backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. - :type body: JSON + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Default value is None. + :type body: ~azure.mgmt.netapp.types.BackupPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -15198,29 +5273,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: IO[bytes], + backup_vault_name: str, + backup_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Patch a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Patch a Backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Required. + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Default value is None. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -15229,32 +5307,37 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]], + backup_vault_name: str, + backup_name: str, + body: Optional[Union[_models.BackupPatch, _types.BackupPatch, IO[bytes]]] = None, **kwargs: Any - ) -> LROPoller[_models.BackupPolicy]: - """Patch a backup policy for Netapp Account. + ) -> LROPoller[_models.Backup]: + """Patch a Backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. Is one of the - following types: BackupPolicyPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str + :param body: Backup object supplied in the body of the operation. Is either a BackupPatch type + or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BackupPatch or ~azure.mgmt.netapp.types.BackupPatch or + IO[bytes] + :return: An instance of LROPoller that returns Backup. The Backup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) + content_type = content_type if body else None + cls: ClsType[_models.Backup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -15262,7 +5345,8 @@ def begin_update( raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -15275,7 +5359,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.BackupPolicy, response.json()) + deserialized = _deserialize(_models.Backup, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -15293,18 +5377,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.BackupPolicy].from_continuation_token( + return LROPoller[_models.Backup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackupPolicy]( + return LROPoller[_models.Backup]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -15319,10 +5403,11 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_backup_policies_delete_request( + _request = build_backups_delete_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -15341,7 +5426,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -15367,17 +5452,19 @@ def _delete_initial( @distributed_trace def begin_delete( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any ) -> LROPoller[None]: - """Delete backup policy. + """Delete a Backup under the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. - :type backup_policy_name: str + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param backup_name: The name of the backup. Required. + :type backup_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -15393,7 +5480,8 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + backup_vault_name=backup_vault_name, + backup_name=backup_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -15428,22 +5516,35 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.BackupPolicy"]: - """List backup policies for Netapp Account. + def list_by_vault( + self, + resource_group_name: str, + account_name: str, + backup_vault_name: str, + *, + filter: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.Backup"]: + """List all backups Under a Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :return: An iterator like instance of BackupPolicy - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupPolicy] + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :keyword filter: An option to specify the VolumeResourceId. If present, then only returns the + backups under the specified volume. Default value is None. + :paramtype filter: str + :return: An iterator like instance of Backup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Backup] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.BackupPolicy]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Backup]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -15456,10 +5557,12 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It def prepare_request(next_link=None): if not next_link: - _request = build_backup_policies_list_request( + _request = build_backups_list_by_vault_request( resource_group_name=resource_group_name, account_name=account_name, + backup_vault_name=backup_vault_name, subscription_id=self._config.subscription_id, + filter=filter, api_version=self._config.api_version, headers=_headers, params=_params, @@ -15499,7 +5602,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.BackupPolicy], + List[_models.Backup], deserialized.get("value", []), ) if cls: @@ -15527,35 +5630,11 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - -class VolumeQuotaRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`volume_quota_rules` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - **kwargs: Any - ) -> _models.VolumeQuotaRule: - """Get details of the specified quota rule. + def get_latest_status( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> _models.BackupStatus: + """Get the latest status of the backup for a volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -15566,10 +5645,8 @@ def get( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :return: VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.VolumeQuotaRule + :return: BackupStatus. The BackupStatus is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.BackupStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -15583,14 +5660,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) + cls: ClsType[_models.BackupStatus] = kwargs.pop("cls", None) - _request = build_volume_quota_rules_get_request( + _request = build_backups_get_latest_status_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -15625,182 +5701,18 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) + deserialized = _deserialize(_models.BackupStatus, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_volume_quota_rules_create_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: _models.VolumeQuotaRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Create the specified quota rule within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Create the specified quota rule within the given volume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Create the specified quota rule within the given volume. + @distributed_trace + def get_volume_latest_restore_status( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> _models.RestoreStatus: + """Get the latest status of the restore for a volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -15811,31 +5723,92 @@ def begin_create( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :return: RestoreStatus. The RestoreStatus is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.RestoreStatus :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RestoreStatus] = kwargs.pop("cls", None) + + _request = build_backups_get_volume_latest_restore_status_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RestoreStatus, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class VolumesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`volumes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def begin_create( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Create the specified quota rule within the given volume. + def get( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> _models.Volume: + """Get the details of the specified volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -15846,79 +5819,76 @@ def begin_create( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Is one of the following - types: VolumeQuotaRule, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or JSON or IO[bytes] - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :return: Volume. The Volume is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.Volume :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[_models.Volume] = kwargs.pop("cls", None) + _request = build_volumes_get_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.VolumeQuotaRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.VolumeQuotaRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.Volume, response.json()) - def _update_initial( + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]], + body: Union[_models.Volume, _types.Volume, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -15942,12 +5912,11 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_volume_quota_rules_update_request( + _request = build_volumes_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -15968,7 +5937,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -15981,6 +5950,12 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -15993,19 +5968,18 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, - body: _models.VolumeQuotaRulePatch, + body: _models.Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Patch a quota rule. + ) -> LROPoller[_models.Volume]: + """Create or update the specified volume within the capacity pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16016,33 +5990,30 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch + :param body: Volume object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.Volume :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, - body: JSON, + body: _types.Volume, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Patch a quota rule. + ) -> LROPoller[_models.Volume]: + """Create or update the specified volume within the capacity pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16053,33 +6024,30 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. - :type body: JSON + :param body: Volume object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.Volume :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Patch a quota rule. + ) -> LROPoller[_models.Volume]: + """Create or update the specified volume within the capacity pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16090,31 +6058,28 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Required. + :param body: Volume object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_update( + def begin_create_or_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, - body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]], + body: Union[_models.Volume, _types.Volume, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.VolumeQuotaRule]: - """Patch a quota rule. + ) -> LROPoller[_models.Volume]: + """Create or update the specified volume within the capacity pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16125,31 +6090,28 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :param body: Quota rule object supplied in the body of the operation. Is one of the following - types: VolumeQuotaRulePatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :param body: Volume object supplied in the body of the operation. Is either a Volume type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Volume or ~azure.mgmt.netapp.types.Volume or IO[bytes] + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) + cls: ClsType[_models.Volume] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -16162,7 +6124,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) + deserialized = _deserialize(_models.Volume, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -16180,23 +6142,23 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.VolumeQuotaRule].from_continuation_token( + return LROPoller[_models.Volume].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.VolumeQuotaRule]( + return LROPoller[_models.Volume]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( + def _update_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, + body: Union[_models.VolumePatch, _types.VolumePatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -16207,19 +6169,28 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_volume_quota_rules_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_volumes_update_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -16236,7 +6207,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -16260,85 +6231,19 @@ def _delete_initial( return deserialized # type: ignore - @distributed_trace - def begin_delete( + @overload + def begin_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - volume_quota_rule_name: str, + body: _models.VolumePatch, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Delete quota rule. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param volume_quota_rule_name: The name of volume quota rule. Required. - :type volume_quota_rule_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - volume_quota_rule_name=volume_quota_rule_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_volume( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> ItemPaged["_models.VolumeQuotaRule"]: - """List all quota rules associated with the volume. + ) -> LROPoller[_models.Volume]: + """Patch the specified volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16349,157 +6254,96 @@ def list_by_volume( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :return: An iterator like instance of VolumeQuotaRule - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeQuotaRule] + :param body: Volume object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.VolumePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.VolumeQuotaRule]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_volume_quota_rules_list_by_volume_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.VolumeQuotaRule], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _types.VolumePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Volume]: + """Patch the specified volume. -class RansomwareReportsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Volume object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.VolumePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] + :raises ~azure.core.exceptions.HttpResponseError: + """ - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`ransomware_reports` attribute. - """ + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Volume]: + """Patch the specified volume. - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Volume object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "ransomware_report_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def get( + def begin_update( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, + body: Union[_models.VolumePatch, _types.VolumePatch, IO[bytes]], **kwargs: Any - ) -> _models.RansomwareReport: - """Get details of the specified ransomware report (ARP) ARP reports are created with a list of - suspected files when it detects any combination of high data entropy, abnormal volume activity - with data encryption, and unusual file extensions. ARP creates snapshots named - Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of these - ARP snapshots or another snapshot of your volume to restore data. + ) -> LROPoller[_models.Volume]: + """Patch the specified volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16510,12 +6354,79 @@ def get( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param ransomware_report_name: The name of the ransomware report. Required. - :type ransomware_report_name: str - :return: RansomwareReport. The RansomwareReport is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.RansomwareReport + :param body: Volume object supplied in the body of the operation. Is either a VolumePatch type + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumePatch or ~azure.mgmt.netapp.types.VolumePatch or + IO[bytes] + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Volume] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Volume, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Volume].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Volume]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + *, + force_delete: Optional[bool] = None, + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -16527,15 +6438,15 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.RansomwareReport] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_ransomware_reports_get_request( + _request = build_volumes_delete_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - ransomware_report_name=ransomware_report_name, subscription_id=self._config.subscription_id, + force_delete=force_delete, api_version=self._config.api_version, headers=_headers, params=_params, @@ -16546,19 +6457,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -16566,50 +6476,99 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.RansomwareReport, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + *, + force_delete: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Delete the specified volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :keyword force_delete: An option to force delete the volume. Will cleanup resources connected + to the particular volume. Default value is None. + :paramtype force_delete: bool + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + force_delete=force_delete, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return deserialized # type: ignore + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) def list( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> ItemPaged["_models.RansomwareReport"]: - """List all ransomware reports for the volume Returns a list of the Advanced Ransomware Protection - (ARP) reports for the volume. ARP reports are created with a list of suspected files when it - detects any combination of high data entropy, abnormal volume activity with data encryption, - and unusual file extensions. ARP creates snapshots named Anti_ransomware_backup when it detects - a potential ransomware threat. You can use one of these ARP snapshots or another snapshot of - your volume to restore data". + self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any + ) -> ItemPaged["_models.Volume"]: + """List all volumes within the capacity pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16618,16 +6577,14 @@ def list( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :return: An iterator like instance of RansomwareReport - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.RansomwareReport] + :return: An iterator like instance of Volume + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.RansomwareReport]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Volume]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -16640,11 +6597,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_ransomware_reports_list_request( + _request = build_volumes_list_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - volume_name=volume_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -16685,7 +6641,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.RansomwareReport], + List[_models.Volume], deserialized.get("value", []), ) if cls: @@ -16713,39 +6669,147 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "ransomware_report_name", - "content_type", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _clear_suspects_initial( + def _populate_availability_zone_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_volumes_populate_availability_zone_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_populate_availability_zone( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[_models.Volume]: + """This operation will populate availability zone information for a volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns Volume. The Volume is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Volume] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._populate_availability_zone_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Volume, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Volume].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Volume]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _revert_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]], + body: Union[_models.VolumeRevert, _types.VolumeRevert, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -16769,12 +6833,11 @@ def _clear_suspects_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_ransomware_reports_clear_suspects_request( + _request = build_volumes_revert_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - ransomware_report_name=ransomware_report_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -16795,7 +6858,7 @@ def _clear_suspects_initial( response = pipeline_response.http_response - if response.status_code not in [202]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -16808,8 +6871,9 @@ def _clear_suspects_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -16819,23 +6883,18 @@ def _clear_suspects_initial( return deserialized # type: ignore @overload - def begin_clear_suspects( + def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: _models.RansomwareSuspectsClearRequest, + body: _models.VolumeRevert, *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should - evaluate the report to determine whether the activity is acceptable (false positive) or whether - an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a - potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your - volume to restore data",. + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Revert a volume to the snapshot specified in the body. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16846,10 +6905,8 @@ def begin_clear_suspects( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param ransomware_report_name: The name of the ransomware report. Required. - :type ransomware_report_name: str - :param body: Clear suspects request object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest + :param body: Object for snapshot to revert supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.VolumeRevert :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -16859,23 +6916,18 @@ def begin_clear_suspects( """ @overload - def begin_clear_suspects( + def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: JSON, + body: _types.VolumeRevert, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: - """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should - evaluate the report to determine whether the activity is acceptable (false positive) or whether - an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a - potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your - volume to restore data",. + """Revert a volume to the snapshot specified in the body. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16886,10 +6938,8 @@ def begin_clear_suspects( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param ransomware_report_name: The name of the ransomware report. Required. - :type ransomware_report_name: str - :param body: Clear suspects request object supplied in the body of the operation. Required. - :type body: JSON + :param body: Object for snapshot to revert supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.VolumeRevert :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -16899,23 +6949,18 @@ def begin_clear_suspects( """ @overload - def begin_clear_suspects( + def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: - """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should - evaluate the report to determine whether the activity is acceptable (false positive) or whether - an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a - potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your - volume to restore data",. + """Revert a volume to the snapshot specified in the body. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16926,9 +6971,7 @@ def begin_clear_suspects( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param ransomware_report_name: The name of the ransomware report. Required. - :type ransomware_report_name: str - :param body: Clear suspects request object supplied in the body of the operation. Required. + :param body: Object for snapshot to revert supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -16939,46 +6982,16 @@ def begin_clear_suspects( """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-01", - params_added_on={ - "2025-12-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "ransomware_report_name", - "content_type", - ] - }, - api_versions_list=[ - "2025-12-01", - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_clear_suspects( + def begin_revert( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - ransomware_report_name: str, - body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]], + body: Union[_models.VolumeRevert, _types.VolumeRevert, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: - """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should - evaluate the report to determine whether the activity is acceptable (false positive) or whether - an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a - potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your - volume to restore data",. + """Revert a volume to the snapshot specified in the body. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -16989,11 +7002,10 @@ def begin_clear_suspects( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param ransomware_report_name: The name of the ransomware report. Required. - :type ransomware_report_name: str - :param body: Clear suspects request object supplied in the body of the operation. Is one of the - following types: RansomwareSuspectsClearRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or JSON or IO[bytes] + :param body: Object for snapshot to revert supplied in the body of the operation. Is either a + VolumeRevert type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeRevert or ~azure.mgmt.netapp.types.VolumeRevert or + IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -17007,12 +7019,11 @@ def begin_clear_suspects( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._clear_suspects_initial( + raw_result = self._revert_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - ransomware_report_name=ransomware_report_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -17048,106 +7059,8 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - -class BackupVaultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`backup_vaults` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> _models.BackupVault: - """Get the Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :return: BackupVault. The BackupVault is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.BackupVault - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) - - _request = build_backup_vaults_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.BackupVault, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.BackupVault, JSON, IO[bytes]], - **kwargs: Any + def _reset_cifs_password_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -17157,27 +7070,18 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_backup_vaults_create_or_update_request( + _request = build_volumes_reset_cifs_password_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -17194,7 +7098,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -17202,158 +7106,53 @@ def _create_or_update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: _models.BackupVault, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Create or update the specified Backup Vault in the NetApp account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: BackupVault object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.BackupVault - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Create or update the specified Backup Vault in the NetApp account. + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: BackupVault object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Create or update the specified Backup Vault in the NetApp account. + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: BackupVault object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.BackupVault, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Create or update the specified Backup Vault in the NetApp account. + def begin_reset_cifs_password( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Reset cifs password from volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: BackupVault object supplied in the body of the operation. Is one of the following - types: BackupVault, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupVault or JSON or IO[bytes] - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._reset_cifs_password_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - body=body, - content_type=content_type, + pool_name=pool_name, + volume_name=volume_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -17362,12 +7161,9 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.BackupVault, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -17382,23 +7178,16 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.BackupVault].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackupVault]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _update_initial( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.BackupVaultPatch, JSON, IO[bytes]], - **kwargs: Any + def _split_clone_from_parent_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -17408,27 +7197,18 @@ def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_backup_vaults_update_request( + _request = build_volumes_split_clone_from_parent_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -17469,140 +7249,39 @@ def _update_initial( return deserialized # type: ignore - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: _models.BackupVaultPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Patch the specified NetApp Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: Backup Vault object supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.BackupVaultPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Patch the specified NetApp Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: Backup Vault object supplied in the body of the operation. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Patch the specified NetApp Backup Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: Backup Vault object supplied in the body of the operation. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace - def begin_update( - self, - resource_group_name: str, - account_name: str, - backup_vault_name: str, - body: Union[_models.BackupVaultPatch, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BackupVault]: - """Patch the specified NetApp Backup Vault. + def begin_split_clone_from_parent( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[_models.Volume]: + """Split operation to convert clone volume to an independent volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str - :param body: Backup Vault object supplied in the body of the operation. Is one of the following - types: BackupVaultPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns Volume. The Volume is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) + cls: ClsType[_models.Volume] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._split_clone_from_parent_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - body=body, - content_type=content_type, + pool_name=pool_name, + volume_name=volume_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -17613,7 +7292,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.BackupVault, response.json()) + deserialized = _deserialize(_models.Volume, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -17631,18 +7310,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.BackupVault].from_continuation_token( + return LROPoller[_models.Volume].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.BackupVault]( + return LROPoller[_models.Volume]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any + def _break_file_locks_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.BreakFileLocksRequest, _types.BreakFileLocksRequest, IO[bytes]]] = None, + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -17652,17 +7337,32 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_backup_vaults_delete_request( + content_type = content_type or "application/json" if body else None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_volumes_break_file_locks_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -17679,7 +7379,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -17703,204 +7403,205 @@ def _delete_initial( return deserialized # type: ignore - @distributed_trace - def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any + @overload + def begin_break_file_locks( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[_models.BreakFileLocksRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any ) -> LROPoller[None]: - """Delete the specified Backup Vault. + """Break all the file locks on a volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the Backup Vault. Required. - :type backup_vault_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Optional body to provide the ability to clear file locks with selected options. + Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_vault_name=backup_vault_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + @overload + def begin_break_file_locks( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[_types.BreakFileLocksRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Break all the file locks on a volume. - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Optional body to provide the ability to clear file locks with selected options. + Default value is None. + :type body: ~azure.mgmt.netapp.types.BreakFileLocksRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + @overload + def begin_break_file_locks( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Break all the file locks on a volume. - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Optional body to provide the ability to clear file locks with selected options. + Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list_by_net_app_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.BackupVault"]: - """List and describe all Backup Vaults in the NetApp account. + def begin_break_file_locks( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.BreakFileLocksRequest, _types.BreakFileLocksRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Break all the file locks on a volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :return: An iterator like instance of BackupVault - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupVault] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Optional body to provide the ability to clear file locks with selected options. Is + either a BreakFileLocksRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or + ~azure.mgmt.netapp.types.BreakFileLocksRequest or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.BackupVault]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_backup_vaults_list_by_net_app_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.BackupVault], - deserialized.get("value", []), + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._break_file_locks_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + return cls(pipeline_response, None, {}) # type: ignore - def get_next(next_link=None): - _request = prepare_request(next_link) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class BucketsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`buckets` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-08-01", params_added_on={ - "2025-12-15-preview": [ + "2025-08-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "bucket_name", + "content_type", "accept", ] }, api_versions_list=[ + "2025-08-01", + "2025-09-01", + "2025-12-01", "2025-12-15-preview", "2026-01-01", "2026-01-15-preview", @@ -17908,35 +7609,18 @@ def __init__(self, *args, **kwargs) -> None: "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) - def get( + def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, + body: Union[_models.GetGroupIdListForLDAPUserRequest, _types.GetGroupIdListForLDAPUserRequest, IO[bytes]], **kwargs: Any - ) -> _models.Bucket: - """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. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :return: Bucket. The Bucket is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.Bucket - :raises ~azure.core.exceptions.HttpResponseError: - """ + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -17945,19 +7629,28 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_buckets_get_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_volumes_list_get_group_id_list_for_ldap_user_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -17967,19 +7660,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -17987,32 +7679,145 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Bucket, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore + @overload + def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _models.GetGroupIdListForLDAPUserRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: + """Returns the list of group Ids for a specific LDAP User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Returns group Id list for a specific LDAP user. Required. + :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The + GetGroupIdListForLDAPUserResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _types.GetGroupIdListForLDAPUserRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: + """Returns the list of group Ids for a specific LDAP User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Returns group Id list for a specific LDAP user. Required. + :type body: ~azure.mgmt.netapp.types.GetGroupIdListForLDAPUserRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The + GetGroupIdListForLDAPUserResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: + """Returns the list of group Ids for a specific LDAP User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Returns group Id list for a specific LDAP user. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The + GetGroupIdListForLDAPUserResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-08-01", params_added_on={ - "2025-12-15-preview": [ + "2025-08-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "bucket_name", "content_type", "accept", ] }, api_versions_list=[ + "2025-08-01", + "2025-09-01", + "2025-12-01", "2025-12-15-preview", "2026-01-01", "2026-01-15-preview", @@ -18020,16 +7825,100 @@ def get( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) - def _create_or_update_initial( + def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Union[_models.Bucket, JSON, IO[bytes]], + body: Union[_models.GetGroupIdListForLDAPUserRequest, _types.GetGroupIdListForLDAPUserRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]: + """Returns the list of group Ids for a specific LDAP User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Returns group Id list for a specific LDAP user. Is either a + GetGroupIdListForLDAPUserRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or + ~azure.mgmt.netapp.types.GetGroupIdListForLDAPUserRequest or IO[bytes] + :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The + GetGroupIdListForLDAPUserResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GetGroupIdListForLDAPUserResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._list_get_group_id_list_for_ldap_user_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GetGroupIdListForLDAPUserResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GetGroupIdListForLDAPUserResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GetGroupIdListForLDAPUserResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _break_replication_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.BreakReplicationRequest, _types.BreakReplicationRequest, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -18044,21 +7933,24 @@ def _create_or_update_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if body else None _content = None if isinstance(body, (IOBase, bytes)): _content = body else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None - _request = build_buckets_create_or_update_request( + _request = build_volumes_break_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -18079,7 +7971,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -18092,10 +7984,8 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -18106,20 +7996,18 @@ def _create_or_update_initial( return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: _models.Bucket, + body: Optional[_models.BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """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. + ) -> LROPoller[None]: + """Break the replication connection on the destination volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18130,35 +8018,29 @@ def begin_create_or_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. - :type body: ~azure.mgmt.netapp.models.Bucket + :param body: Optional body to force break the replication. Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: Optional[_types.BreakReplicationRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """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. + ) -> LROPoller[None]: + """Break the replication connection on the destination volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18169,35 +8051,29 @@ def begin_create_or_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. - :type body: JSON + :param body: Optional body to force break the replication. Default value is None. + :type body: ~azure.mgmt.netapp.types.BreakReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: IO[bytes], + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """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. + ) -> LROPoller[None]: + """Break the replication connection on the destination volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18208,58 +8084,27 @@ def begin_create_or_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. + :param body: Optional body to force break the replication. Default value is None. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_create_or_update( + def begin_break_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Union[_models.Bucket, JSON, IO[bytes]], + body: Optional[Union[_models.BreakReplicationRequest, _types.BreakReplicationRequest, IO[bytes]]] = None, **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """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. + ) -> LROPoller[None]: + """Break the replication connection on the destination volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18270,31 +8115,29 @@ def begin_create_or_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Is one of the following types: Bucket, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.Bucket or JSON or IO[bytes] - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :param body: Optional body to force break the replication. Is either a BreakReplicationRequest + type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or + ~azure.mgmt.netapp.types.BreakReplicationRequest or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) + content_type = content_type if body else None + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._break_replication_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -18305,12 +8148,9 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Bucket, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -18325,49 +8165,21 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Bucket].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Bucket]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _update_initial( + def _reestablish_replication_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Union[_models.BucketPatch, JSON, IO[bytes]], + body: Union[_models.ReestablishReplicationRequest, _types.ReestablishReplicationRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -18391,12 +8203,11 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_buckets_update_request( + _request = build_volumes_reestablish_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -18417,7 +8228,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -18430,12 +8241,8 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -18445,19 +8252,19 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: _models.BucketPatch, + body: _models.ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """Updates the details of a volume bucket. + ) -> LROPoller[None]: + """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or + policy-based snapshots. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18468,34 +8275,30 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. - :type body: ~azure.mgmt.netapp.models.BucketPatch + :param body: body for the id of the source volume. Required. + :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: _types.ReestablishReplicationRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """Updates the details of a volume bucket. + ) -> LROPoller[None]: + """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or + policy-based snapshots. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18506,34 +8309,30 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. - :type body: JSON + :param body: body for the id of the source volume. Required. + :type body: ~azure.mgmt.netapp.types.ReestablishReplicationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """Updates the details of a volume bucket. + ) -> LROPoller[None]: + """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or + policy-based snapshots. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18544,57 +8343,28 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Required. + :param body: body for the id of the source volume. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_update( + def begin_reestablish_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Union[_models.BucketPatch, JSON, IO[bytes]], + body: Union[_models.ReestablishReplicationRequest, _types.ReestablishReplicationRequest, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Bucket]: - """Updates the details of a volume bucket. + ) -> LROPoller[None]: + """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or + policy-based snapshots. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18605,32 +8375,28 @@ def begin_update( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket details including user details, and the volume path that should be - mounted inside the bucket. Is one of the following types: BucketPatch, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.BucketPatch or JSON or IO[bytes] - :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] + :param body: body for the id of the source volume. Is either a ReestablishReplicationRequest + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or + ~azure.mgmt.netapp.types.ReestablishReplicationRequest or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._reestablish_replication_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -18641,12 +8407,9 @@ def begin_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Bucket, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -18661,48 +8424,33 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Bucket].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Bucket]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _delete_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - **kwargs: Any - ) -> Iterator[bytes]: + @distributed_trace + def replication_status( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> _models.ReplicationStatus: + """Get the status of the replication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: ReplicationStatus. The ReplicationStatus is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.ReplicationStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -18714,14 +8462,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.ReplicationStatus] = kwargs.pop("cls", None) - _request = build_buckets_delete_request( + _request = build_volumes_replication_status_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -18733,18 +8480,19 @@ def _delete_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -18752,55 +8500,62 @@ def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ReplicationStatus, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_delete( + @overload + def list_replications( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[_models.ListReplicationsRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ItemPaged["_models.Replication"]: + """List all replications for a specified volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An iterator like instance of Replication + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_replications( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, + body: Optional[_types.ListReplicationsRequest] = None, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Delete a volume's bucket. + ) -> ItemPaged["_models.Replication"]: + """List all replications for a specified volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18811,74 +8566,68 @@ def begin_delete( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.netapp.types.ListReplicationsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An iterator like instance of Replication + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - bucket_name=bucket_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + @overload + def list_replications( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ItemPaged["_models.Replication"]: + """List all replications for a specified volume. - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An iterator like instance of Replication + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-08-01", params_added_on={ - "2025-12-15-preview": [ + "2025-08-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", + "content_type", "accept", ] }, api_versions_list=[ + "2025-08-01", + "2025-09-01", + "2025-12-01", "2025-12-15-preview", "2026-01-01", "2026-01-15-preview", @@ -18886,13 +8635,19 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) - def list( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> ItemPaged["_models.Bucket"]: - """Describes all buckets belonging to a volume. Buckets allow additional services, such as AI - services, connect to the volume data contained in those buckets. + def list_replications( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.ListReplicationsRequest, _types.ListReplicationsRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> ItemPaged["_models.Replication"]: + """List all replications for a specified volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -18903,14 +8658,20 @@ def list( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :return: An iterator like instance of Bucket - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Bucket] + :param body: The content of the action request. Is either a ListReplicationsRequest type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or + ~azure.mgmt.netapp.types.ListReplicationsRequest or IO[bytes] + :return: An iterator like instance of Replication + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Bucket]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[List[_models.Replication]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -18919,17 +8680,28 @@ def list( 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) + content_type = content_type or "application/json" if body else None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None def prepare_request(next_link=None): if not next_link: - _request = build_buckets_list_request( + _request = build_volumes_list_replications_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -18968,7 +8740,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Bucket], + List[_models.Replication], deserialized.get("value", []), ) if cls: @@ -18996,161 +8768,75 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @overload - def generate_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: _models.BucketCredentialsExpiry, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BucketGenerateCredentials: - """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). + def _resync_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket's Access and Secret key pair expiry time expressed as the number of - days from now. Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with - MutableMapping - :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials - :raises ~azure.core.exceptions.HttpResponseError: - """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def generate_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BucketGenerateCredentials: - """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). + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_volumes_resync_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket's Access and Secret key pair expiry time expressed as the number of - days from now. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with - MutableMapping - :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials - :raises ~azure.core.exceptions.HttpResponseError: - """ + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - @overload - def generate_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BucketGenerateCredentials: - """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 cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket's Access and Secret key pair expiry time expressed as the number of - days from now. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with - MutableMapping - :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials - :raises ~azure.core.exceptions.HttpResponseError: - """ + return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def generate_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.BucketGenerateCredentials: - """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). + def begin_resync_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Resync the connection on the destination volume. If the operation is ran on the source volume + it will reverse-resync the connection and sync from destination to source. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -19161,17 +8847,59 @@ def generate_credentials( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The bucket's Access and Secret key pair expiry time expressed as the number of - days from now. Is one of the following types: BucketCredentialsExpiry, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes] - :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with - MutableMapping - :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _delete_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -19180,29 +8908,18 @@ def generate_credentials( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BucketGenerateCredentials] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_buckets_generate_credentials_request( + _request = build_volumes_delete_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -19212,19 +8929,18 @@ def generate_credentials( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -19232,48 +8948,91 @@ def generate_credentials( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.BucketGenerateCredentials, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete the replication connection on the destination volume, and send release to the source + replication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return deserialized # type: ignore + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _generate_akv_credentials_initial( + def _authorize_replication_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], + body: Union[_models.AuthorizeRequest, _types.AuthorizeRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -19297,12 +9056,11 @@ def _generate_akv_credentials_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_buckets_generate_akv_credentials_request( + _request = build_volumes_authorize_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -19323,7 +9081,7 @@ def _generate_akv_credentials_initial( response = pipeline_response.http_response - if response.status_code not in [202]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -19336,11 +9094,9 @@ def _generate_akv_credentials_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -19350,20 +9106,18 @@ def _generate_akv_credentials_initial( return deserialized # type: ignore @overload - def begin_generate_akv_credentials( + def begin_authorize_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: _models.BucketCredentialsExpiry, + body: _models.AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: - """Generate the access key and secret key used for accessing the specified volume bucket and store - in Azure Key Vault. + """Authorize the replication connection on the source volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -19374,10 +9128,8 @@ def begin_generate_akv_credentials( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry + :param body: Authorize request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.AuthorizeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -19387,116 +9139,217 @@ def begin_generate_akv_credentials( """ @overload - def begin_generate_akv_credentials( + def begin_authorize_replication( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, - body: JSON, + body: _types.AuthorizeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: - """Generate the access key and secret key used for accessing the specified volume bucket and store - in Azure Key Vault. + """Authorize the replication connection on the source volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Authorize request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.AuthorizeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_authorize_replication( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Authorize the replication connection on the source volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Authorize request object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_authorize_replication( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Union[_models.AuthorizeRequest, _types.AuthorizeRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Authorize the replication connection on the source volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Authorize request object supplied in the body of the operation. Is either a + AuthorizeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or + ~azure.mgmt.netapp.types.AuthorizeRequest or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._authorize_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _re_initialize_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_volumes_re_initialize_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - @overload - def begin_generate_akv_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Generate the access key and secret key used for accessing the specified volume bucket and store - in Azure Key Vault. + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param volume_name: The name of the volume. Required. - :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ + return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - "content_type", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_generate_akv_credentials( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - bucket_name: str, - body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]], - **kwargs: Any + def begin_re_initialize_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any ) -> LROPoller[None]: - """Generate the access key and secret key used for accessing the specified volume bucket and store - in Azure Key Vault. + """Re-Initializes the replication connection on the destination volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -19507,32 +9360,23 @@ def begin_generate_akv_credentials( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :param body: The content of the action request. Is one of the following types: - BucketCredentialsExpiry, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._generate_akv_credentials_initial( + raw_result = self._re_initialize_replication_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, - body=body, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -19566,36 +9410,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _refresh_certificate_initial( + def _peer_external_cluster_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, + body: Union[ + _models.PeerClusterForVolumeMigrationRequest, _types.PeerClusterForVolumeMigrationRequest, IO[bytes] + ], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -19606,19 +9429,28 @@ def _refresh_certificate_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_buckets_refresh_certificate_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_volumes_peer_external_cluster_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -19635,7 +9467,7 @@ def _refresh_certificate_initial( response = pipeline_response.http_response - if response.status_code not in [202]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -19648,11 +9480,12 @@ def _refresh_certificate_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -19661,41 +9494,121 @@ def _refresh_certificate_initial( return deserialized # type: ignore + @overload + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _models.PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The + ClusterPeerCommandResponse is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _types.PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.PeerClusterForVolumeMigrationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The + ClusterPeerCommandResponse is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The + ClusterPeerCommandResponse is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "bucket_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_refresh_certificate( + def begin_peer_external_cluster( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - bucket_name: str, + body: Union[ + _models.PeerClusterForVolumeMigrationRequest, _types.PeerClusterForVolumeMigrationRequest, IO[bytes] + ], **kwargs: Any - ) -> LROPoller[None]: - """This operation will fetch the certificate from Azure Key Vault and install it on the bucket - server. + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Starts peering the external cluster for this migration volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -19706,26 +9619,31 @@ def begin_refresh_certificate( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param bucket_name: The name of the bucket. Required. - :type bucket_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param body: Cluster peer request object supplied in the body of the operation. Is either a + PeerClusterForVolumeMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or + ~azure.mgmt.netapp.types.PeerClusterForVolumeMigrationRequest or IO[bytes] + :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The + ClusterPeerCommandResponse is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClusterPeerCommandResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._refresh_certificate_initial( + raw_result = self._peer_external_cluster_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - bucket_name=bucket_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -19734,9 +9652,19 @@ def begin_refresh_certificate( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ClusterPeerCommandResponse, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -19751,74 +9679,19 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.ClusterPeerCommandResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class CachesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`caches` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def get( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any - ) -> _models.Cache: - """Get the details of the specified Cache. + return LROPoller[_models.ClusterPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :return: Cache. The Cache is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.Cache - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _authorize_external_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -19830,13 +9703,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_caches_get_request( + _request = build_volumes_authorize_external_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -19848,19 +9721,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -19868,48 +9740,102 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Cache, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - body: Union[_models.Cache, JSON, IO[bytes]], - **kwargs: Any + @distributed_trace + def begin_authorize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[_models.SvmPeerCommandResponse]: + """Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once + the SVM have been peered a SnapMirror will be created. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns SvmPeerCommandResponse. The + SvmPeerCommandResponse is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SvmPeerCommandResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._authorize_external_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.SvmPeerCommandResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SvmPeerCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SvmPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _finalize_external_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -19919,28 +9845,18 @@ def _create_or_update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_caches_create_or_update_request( + _request = build_volumes_finalize_external_replication_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -19957,7 +9873,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -19970,11 +9886,8 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -19983,19 +9896,12 @@ def _create_or_update_initial( return deserialized # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - body: _models.Cache, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Create or update the specified Cache within the Capacity Pool. + @distributed_trace + def begin_finalize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Finalizes the migration of an external volume by releasing the replication and breaking the + external cluster peering if no other migration is active. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20004,122 +9910,125 @@ def begin_create_or_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.Cache - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Create or update the specified Cache within the Capacity Pool. + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._finalize_external_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] - :raises ~azure.core.exceptions.HttpResponseError: - """ + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Create or update the specified Cache within the Capacity Pool. + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] - :raises ~azure.core.exceptions.HttpResponseError: - """ + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - cache_name: str, - body: Union[_models.Cache, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Create or update the specified Cache within the Capacity Pool. + def _perform_replication_transfer_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_volumes_perform_replication_transfer_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_perform_replication_transfer( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Performs an adhoc replication transfer on a volume with volumeType Migration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20128,32 +10037,25 @@ def begin_create_or_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Resource create parameters. Is one of the following types: Cache, JSON, IO[bytes] - Required. - :type body: ~azure.mgmt.netapp.models.Cache or JSON or IO[bytes] - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._perform_replication_transfer_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, - body=body, - content_type=content_type, + volume_name=volume_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -20162,12 +10064,9 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Cache, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -20182,47 +10081,21 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Cache].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Cache]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _update_initial( + def _pool_change_initial( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: Union[_models.CacheUpdate, JSON, IO[bytes]], + volume_name: str, + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -20246,11 +10119,11 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_caches_update_request( + _request = build_volumes_pool_change_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -20285,9 +10158,6 @@ def _update_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -20299,18 +10169,18 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: _models.CacheUpdate, + volume_name: str, + body: _models.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Patch the specified Cache. + ) -> LROPoller[None]: + """Moves volume to another pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20319,32 +10189,31 @@ def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.CacheUpdate + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Move volume to the pool supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: JSON, + volume_name: str, + body: _types.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Patch the specified Cache. + ) -> LROPoller[None]: + """Moves volume to another pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20353,32 +10222,31 @@ def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Move volume to the pool supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, + volume_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Patch the specified Cache. + ) -> LROPoller[None]: + """Moves volume to another pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20387,54 +10255,29 @@ def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: The resource properties to be updated. Required. + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Move volume to the pool supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "content_type", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_update( + def begin_pool_change( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: Union[_models.CacheUpdate, JSON, IO[bytes]], + volume_name: str, + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Patch the specified Cache. + ) -> LROPoller[None]: + """Moves volume to another pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20443,30 +10286,30 @@ def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: The resource properties to be updated. Is one of the following types: CacheUpdate, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CacheUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Move volume to the pool supplied in the body of the operation. Is either a + PoolChangeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or + ~azure.mgmt.netapp.types.PoolChangeRequest or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._pool_change_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -20477,12 +10320,9 @@ def begin_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Cache, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -20497,40 +10337,22 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Cache].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Cache]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _delete_initial( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + def _relocate_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.RelocateVolumeRequest, _types.RelocateVolumeRequest, IO[bytes]]] = None, + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -20540,18 +10362,32 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_caches_delete_request( + content_type = content_type or "application/json" if body else None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_volumes_relocate_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -20568,7 +10404,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -20592,33 +10428,116 @@ def _delete_initial( return deserialized # type: ignore + @overload + def begin_relocate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[_models.RelocateVolumeRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Relocates volume to a new stamp. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Relocate volume request. Default value is None. + :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_relocate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[_types.RelocateVolumeRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Relocates volume to a new stamp. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Relocate volume request. Default value is None. + :type body: ~azure.mgmt.netapp.types.RelocateVolumeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_relocate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Relocates volume to a new stamp. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Relocate volume request. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_delete( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + def begin_relocate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.RelocateVolumeRequest, _types.RelocateVolumeRequest, IO[bytes]]] = None, + **kwargs: Any ) -> LROPoller[None]: - """Delete the specified cache. + """Relocates volume to a new stamp. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20627,25 +10546,33 @@ def begin_delete( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Relocate volume request. Is either a RelocateVolumeRequest type or a IO[bytes] + type. Default value is None. + :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or + ~azure.mgmt.netapp.types.RelocateVolumeRequest or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._relocate_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -20679,161 +10606,74 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2026-01-01", - params_added_on={ - "2026-01-01": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "accept", - ] - }, - api_versions_list=[ - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def list( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> ItemPaged["_models.Cache"]: - """List all Caches within the Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :param pool_name: The name of the capacity pool. Required. - :type pool_name: str - :return: An iterator like instance of Cache - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Cache] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Cache]] = kwargs.pop("cls", None) - + def _finalize_relocation_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_caches_list_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + } + error_map.update(kwargs.pop("error_map", {}) or {}) - return _request + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Cache], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - def get_next(next_link=None): - _request = prepare_request(next_link) + _request = build_volumes_finalize_relocation_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - return pipeline_response + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - return ItemPaged(get_next, extract_data) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def list_peering_passphrases( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any - ) -> _models.PeeringPassphrases: - """This operation will list the cluster peering command, cluster peering passphrase and the - vserver peering command. + def begin_finalize_relocation( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Finalizes the relocation of the volume and cleans up the old volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -20842,12 +10682,61 @@ def list_peering_passphrases( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :return: PeeringPassphrases. The PeeringPassphrases is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.PeeringPassphrases + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._finalize_relocation_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _revert_relocation_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -20859,13 +10748,13 @@ def list_peering_passphrases( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PeeringPassphrases] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_caches_list_peering_passphrases_request( + _request = build_volumes_revert_relocation_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -20877,19 +10766,18 @@ def list_peering_passphrases( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -20897,31 +10785,100 @@ def list_peering_passphrases( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PeeringPassphrases, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore + @distributed_trace + def begin_revert_relocation( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Reverts the volume relocation process, cleans up the new volume and starts using the + former-existing volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._revert_relocation_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", - "cache_name", + "volume_name", "content_type", "accept", ] }, api_versions_list=[ + "2025-12-01", "2025-12-15-preview", "2026-01-01", "2026-01-15-preview", @@ -20929,15 +10886,16 @@ def list_peering_passphrases( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) - def _pool_change_initial( + def _list_quota_report_initial( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + volume_name: str, + body: Optional[Union[_models.QuotaReportFilterRequest, _types.QuotaReportFilterRequest, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -20952,20 +10910,24 @@ def _pool_change_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if body else None _content = None if isinstance(body, (IOBase, bytes)): _content = body else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None - _request = build_caches_pool_change_request( + _request = build_volumes_list_quota_report_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -21000,6 +10962,9 @@ def _pool_change_initial( response_headers = {} if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -21011,18 +10976,18 @@ def _pool_change_initial( return deserialized # type: ignore @overload - def begin_pool_change( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: _models.PoolChangeRequest, + volume_name: str, + body: Optional[_models.QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Moves Cache to another Capacity Pool. + ) -> LROPoller[_models.ListQuotaReportResult]: + """Get quota report for volume (with filter support). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -21031,32 +10996,32 @@ def begin_pool_change( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Move cache to the pool supplied in the body of the operation. Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_pool_change( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: JSON, + volume_name: str, + body: Optional[_types.QuotaReportFilterRequest] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Moves Cache to another Capacity Pool. + ) -> LROPoller[_models.ListQuotaReportResult]: + """Get quota report for volume (with filter support). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -21065,32 +11030,32 @@ def begin_pool_change( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Move cache to the pool supplied in the body of the operation. Required. - :type body: JSON + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.netapp.types.QuotaReportFilterRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_pool_change( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: IO[bytes], + volume_name: str, + body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Moves Cache to another Capacity Pool. + ) -> LROPoller[_models.ListQuotaReportResult]: + """Get quota report for volume (with filter support). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -21099,35 +11064,36 @@ def begin_pool_change( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Move cache to the pool supplied in the body of the operation. Required. + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Default value is None. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", - "cache_name", + "volume_name", "content_type", "accept", ] }, api_versions_list=[ + "2025-12-01", "2025-12-15-preview", "2026-01-01", "2026-01-15-preview", @@ -21135,18 +11101,19 @@ def begin_pool_change( "2026-03-15-preview", "2026-04-01", "2026-04-15-preview", + "2026-05-01", ], ) - def begin_pool_change( + def begin_list_quota_report( self, resource_group_name: str, account_name: str, pool_name: str, - cache_name: str, - body: Union[_models.PoolChangeRequest, JSON, IO[bytes]], + volume_name: str, + body: Optional[Union[_models.QuotaReportFilterRequest, _types.QuotaReportFilterRequest, IO[bytes]]] = None, **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Moves Cache to another Capacity Pool. + ) -> LROPoller[_models.ListQuotaReportResult]: + """Get quota report for volume (with filter support). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -21155,30 +11122,32 @@ def begin_pool_change( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :param body: Move cache to the pool supplied in the body of the operation. Is one of the - following types: PoolChangeRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns Cache. The Cache is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: The content of the action request. Is either a QuotaReportFilterRequest type or a + IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or + ~azure.mgmt.netapp.types.QuotaReportFilterRequest or IO[bytes] + :return: An instance of LROPoller that returns ListQuotaReportResult. The ListQuotaReportResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + content_type = content_type if body else None + cls: ClsType[_models.ListQuotaReportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._pool_change_initial( + raw_result = self._list_quota_report_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -21186,64 +11155,160 @@ def begin_pool_change( params=_params, **kwargs ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ListQuotaReportResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ListQuotaReportResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ListQuotaReportResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class SnapshotsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`snapshots` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + **kwargs: Any + ) -> _models.Snapshot: + """Get details of the specified snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + _request = build_snapshots_get_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Cache, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Cache].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Cache]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return deserialized # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def _reset_smb_password_initial( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + def _create_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -21253,18 +11318,29 @@ def _reset_smb_password_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_caches_reset_smb_password_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_create_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, + snapshot_name=snapshot_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -21281,7 +11357,7 @@ def _reset_smb_password_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [201, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -21294,9 +11370,8 @@ def _reset_smb_password_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -21305,34 +11380,129 @@ def _reset_smb_password_initial( return deserialized # type: ignore + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Snapshot]: + """Create the specified snapshot within the given volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _types.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Snapshot]: + """Create the specified snapshot within the given volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Snapshot]: + """Create the specified snapshot within the given volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "cache_name", - "accept", - ] - }, - api_versions_list=[ - "2025-12-15-preview", - "2026-01-01", - "2026-01-15-preview", - "2026-03-01", - "2026-03-15-preview", - "2026-04-01", - "2026-04-15-preview", - ], - ) - def begin_reset_smb_password( - self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any - ) -> LROPoller[_models.Cache]: - """Resets the SMB password for the cache. + def begin_create( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Snapshot]: + """Create the specified snapshot within the given volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -21341,26 +11511,36 @@ def begin_reset_smb_password( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param cache_name: The name of the cache resource. Required. - :type cache_name: str - :return: An instance of LROPoller that returns Cache. The Cache is compatible with + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Is either a Snapshot type + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Snapshot or ~azure.mgmt.netapp.types.Snapshot or + IO[bytes] + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._reset_smb_password_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, - cache_name=cache_name, + volume_name=volume_name, + snapshot_name=snapshot_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -21370,10 +11550,14 @@ def begin_reset_smb_password( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): + response_headers = {} response = pipeline_response.http_response - deserialized = _deserialize(_models.Cache, response.json()) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { @@ -21389,130 +11573,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Cache].from_continuation_token( + return LROPoller[_models.Snapshot].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Cache]( + return LROPoller[_models.Snapshot]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - -class ElasticAccountsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_accounts` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.ElasticAccount: - """Get the NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: ElasticAccount. The ElasticAccount is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticAccount - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) - - _request = build_elastic_accounts_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticAccount, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( + def _update_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.ElasticAccount, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.SnapshotPatch, _types.SnapshotPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -21536,9 +11614,12 @@ def _create_or_update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_accounts_create_or_update_request( + _request = build_snapshots_update_request( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -21559,7 +11640,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -21572,10 +11653,8 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -21586,138 +11665,164 @@ def _create_or_update_initial( return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - body: _models.ElasticAccount, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _models.SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. + ) -> LROPoller[_models.Snapshot]: + """Patch a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccount + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - body: JSON, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _types.SnapshotPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. + ) -> LROPoller[_models.Snapshot]: + """Patch a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: Resource create parameters. Required. - :type body: JSON + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.SnapshotPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. + ) -> LROPoller[_models.Snapshot]: + """Patch a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: Resource create parameters. Required. + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - body: Union[_models.ElasticAccount, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.SnapshotPatch, _types.SnapshotPatch, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Create or update the specified NetApp Elastic Account within the resource group. + ) -> LROPoller[_models.Snapshot]: + """Patch a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: Resource create parameters. Is one of the following types: ElasticAccount, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccount or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Snapshot object supplied in the body of the operation. Is either a SnapshotPatch + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPatch or ~azure.mgmt.netapp.types.SnapshotPatch + or IO[bytes] + :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -21730,7 +11835,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticAccount, response.json()) + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -21748,35 +11853,23 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticAccount].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _update_initial( + return LROPoller[_models.Snapshot].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Snapshot]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + snapshot_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -21787,26 +11880,19 @@ def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_accounts_update_request( + _request = build_snapshots_delete_request( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -21823,7 +11909,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -21837,9 +11923,6 @@ def _update_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -21850,141 +11933,47 @@ def _update_initial( return deserialized # type: ignore - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - body: _models.ElasticAccountUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_update( + def begin_delete( self, resource_group_name: str, account_name: str, - body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + snapshot_name: str, **kwargs: Any - ) -> LROPoller[_models.ElasticAccount]: - """Patch the specified NetApp Elastic Account. + ) -> LROPoller[None]: + """Delete snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticAccountUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - body=body, - content_type=content_type, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -21993,12 +11982,9 @@ def begin_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticAccount, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -22013,24 +11999,132 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticAccount].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> ItemPaged["_models.Snapshot"]: + """List all snapshots associated with the volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshots_list_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Snapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: Any) -> Iterator[bytes]: + return ItemPaged(get_next, extract_data) + + def _restore_files_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.SnapshotRestoreFiles, _types.SnapshotRestoreFiles, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -22039,16 +12133,29 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_accounts_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_restore_files_request( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -22065,7 +12172,7 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -22089,37 +12196,163 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: return deserialized # type: ignore + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _models.SnapshotRestoreFiles, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Restore the specified files from the specified snapshot to the active filesystem. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Restore payload supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: _types.SnapshotRestoreFiles, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Restore the specified files from the specified snapshot to the active filesystem. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Restore payload supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.SnapshotRestoreFiles + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Restore the specified files from the specified snapshot to the active filesystem. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Restore payload supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> LROPoller[None]: - """Delete the specified NetApp elastic account. + def begin_restore_files( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + snapshot_name: str, + body: Union[_models.SnapshotRestoreFiles, _types.SnapshotRestoreFiles, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Restore the specified files from the specified snapshot to the active filesystem. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param snapshot_name: The name of the snapshot. Required. + :type snapshot_name: str + :param body: Restore payload supplied in the body of the operation. Is either a + SnapshotRestoreFiles type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or + ~azure.mgmt.netapp.types.SnapshotRestoreFiles or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._restore_files_initial( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -22151,128 +12384,43 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ElasticAccount"]: - """List and describe all NetApp elastic accounts in the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ElasticAccount - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_accounts_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticAccount], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response +class SnapshotPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - return ItemPaged(get_next, extract_data) + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`snapshot_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ElasticAccount"]: - """List and describe all NetApp elastic accounts in the subscription. + def get( + self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + ) -> _models.SnapshotPolicy: + """Get a snapshot Policy. - :return: An iterator like instance of ElasticAccount - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticAccount] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None) - error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -22281,125 +12429,170 @@ def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ElasticAccou } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_accounts_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) - return _request + _request = build_snapshot_policies_get_request( + resource_group_name=resource_group_name, + account_name=account_name, + snapshot_policy_name=snapshot_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticAccount], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SnapshotPolicy, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore + @overload + def create( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: _models.SnapshotPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SnapshotPolicy: + """Create a snapshot policy. -class ElasticCapacityPoolsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_capacity_pools` attribute. - """ + @overload + def create( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: _types.SnapshotPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SnapshotPolicy: + """Create a snapshot policy. - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.SnapshotPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def get( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> _models.ElasticCapacityPool: - """Get the NetApp Elastic Capacity Pool. + @overload + def create( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SnapshotPolicy: + """Create a snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: Union[_models.SnapshotPolicy, _types.SnapshotPolicy, IO[bytes]], + **kwargs: Any + ) -> _models.SnapshotPolicy: + """Create a snapshot policy. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: ElasticCapacityPool. The ElasticCapacityPool is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticCapacityPool + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Is either a + SnapshotPolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or ~azure.mgmt.netapp.types.SnapshotPolicy + or IO[bytes] + :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -22410,17 +12603,27 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_capacity_pools_get_request( + _request = build_snapshot_policies_create_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + snapshot_policy_name=snapshot_policy_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -22437,7 +12640,7 @@ def get( response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -22453,34 +12656,19 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) + deserialized = _deserialize(_models.SnapshotPolicy, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( + def _update_initial( self, resource_group_name: str, account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]], + snapshot_policy_name: str, + body: Union[_models.SnapshotPolicyPatch, _types.SnapshotPolicyPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -22504,10 +12692,10 @@ def _create_or_update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_capacity_pools_create_or_update_request( + _request = build_snapshot_policies_update_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + snapshot_policy_name=snapshot_policy_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -22528,7 +12716,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -22541,10 +12729,8 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -22555,158 +12741,269 @@ def _create_or_update_initial( return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, - body: _models.ElasticCapacityPool, + snapshot_policy_name: str, + body: _models.SnapshotPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. + ) -> LROPoller[_models.SnapshotPolicy]: + """Patch a snapshot policy. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: _types.SnapshotPolicyPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SnapshotPolicy]: + """Patch a snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.SnapshotPolicyPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SnapshotPolicy]: + """Patch a snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: Union[_models.SnapshotPolicyPatch, _types.SnapshotPolicyPatch, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.SnapshotPolicy]: + """Patch a snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. Is either a + SnapshotPolicyPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or + ~azure.mgmt.netapp.types.SnapshotPolicyPatch or IO[bytes] + :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + snapshot_policy_name=snapshot_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SnapshotPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SnapshotPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SnapshotPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_snapshot_policies_delete_request( + resource_group_name=resource_group_name, + account_name=account_name, + snapshot_policy_name=snapshot_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Create or update the specified NetApp Elastic Capacity Pool within the resource group and - NetApp Elastic Account. + def begin_delete( + self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete snapshot policy. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: Resource create parameters. Is one of the following types: ElasticCapacityPool, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, - body=body, - content_type=content_type, + snapshot_policy_name=snapshot_policy_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -22715,12 +13012,9 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -22735,39 +13029,32 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticCapacityPool].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.SnapshotPolicy"]: + """List snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :return: An iterator like instance of SnapshotPolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SnapshotPolicy]] = kwargs.pop("cls", None) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -22776,27 +13063,117 @@ def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshot_policies_list_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SnapshotPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_volumes( + self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + ) -> _models.SnapshotPolicyVolumeList: + """Get volumes associated with snapshot policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy. Required. + :type snapshot_policy_name: str + :return: SnapshotPolicyVolumeList. The SnapshotPolicyVolumeList is compatible with + MutableMapping + :rtype: ~azure.mgmt.netapp.models.SnapshotPolicyVolumeList + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.SnapshotPolicyVolumeList] = kwargs.pop("cls", None) - _request = build_elastic_capacity_pools_update_request( + _request = build_snapshot_policies_list_volumes_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + snapshot_policy_name=snapshot_policy_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -22806,18 +13183,19 @@ def _update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -22825,217 +13203,116 @@ def _update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SnapshotPolicyVolumeList, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.ElasticCapacityPoolUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ +class BackupPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`backup_policies` attribute. + """ - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Patch the specified NetApp Elastic Capacity Pool. + def get( + self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + ) -> _models.BackupPolicy: + """Get a particular backup Policy. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticCapacityPoolUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :return: BackupPolicy. The BackupPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.BackupPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) + _request = build_backup_policies_get_request( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticCapacityPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.BackupPolicy, response.json()) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _delete_initial( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: Union[_models.BackupPolicy, _types.BackupPolicy, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -23045,17 +13322,27 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_capacity_pools_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_backup_policies_create_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + backup_policy_name=backup_policy_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -23072,7 +13359,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 201, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -23085,6 +13372,12 @@ def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -23096,205 +13389,185 @@ def _delete_initial( return deserialized # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_delete( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete the specified NetApp Elastic Capacity Pool. + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: _models.BackupPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupPolicy]: + """Create a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: _types.BackupPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupPolicy]: + """Create a backup policy for Netapp Account. - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.BackupPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupPolicy]: + """Create a backup policy for Netapp Account. - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticCapacityPool"]: - """List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + def begin_create( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: Union[_models.BackupPolicy, _types.BackupPolicy, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BackupPolicy]: + """Create a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :return: An iterator like instance of ElasticCapacityPool - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticCapacityPool] + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Is either a + BackupPolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicy or ~azure.mgmt.netapp.types.BackupPolicy or + IO[bytes] + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ElasticCapacityPool]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_capacity_pools_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticCapacityPool], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs ) - response = pipeline_response.http_response + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BackupPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - return pipeline_response + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return ItemPaged(get_next, extract_data) + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BackupPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BackupPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _change_zone_initial( + def _update_initial( self, resource_group_name: str, account_name: str, - pool_name: str, - body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]], + backup_policy_name: str, + body: Union[_models.BackupPolicyPatch, _types.BackupPolicyPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -23318,10 +13591,10 @@ def _change_zone_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_capacity_pools_change_zone_request( + _request = build_backup_policies_update_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + backup_policy_name=backup_policy_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -23356,7 +13629,9 @@ def _change_zone_initial( response_headers = {} if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -23367,152 +13642,138 @@ def _change_zone_initial( return deserialized # type: ignore @overload - def begin_change_zone( + def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, - body: _models.ChangeZoneRequest, + backup_policy_name: str, + body: _models.BackupPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. + ) -> LROPoller[_models.BackupPolicy]: + """Patch a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_change_zone( + def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, - body: JSON, + backup_policy_name: str, + body: _types.BackupPolicyPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. + ) -> LROPoller[_models.BackupPolicy]: + """Patch a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: JSON + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.BackupPolicyPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_change_zone( + def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, + backup_policy_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. + ) -> LROPoller[_models.BackupPolicy]: + """Patch a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_change_zone( + def begin_update( self, resource_group_name: str, account_name: str, - pool_name: str, - body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]], + backup_policy_name: str, + body: Union[_models.BackupPolicyPatch, _types.BackupPolicyPatch, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticCapacityPool]: - """Moves pool to another zone. + ) -> LROPoller[_models.BackupPolicy]: + """Patch a backup policy for Netapp Account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Is one of the following types: - ChangeZoneRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool] + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. Is either a + BackupPolicyPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or + ~azure.mgmt.netapp.types.BackupPolicyPatch or IO[bytes] + :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None) + cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._change_zone_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + backup_policy_name=backup_policy_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -23525,169 +13786,37 @@ def begin_change_zone( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticCapacityPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticCapacityPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticCapacityPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: _models.CheckElasticVolumeFilePathAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def check_volume_file_path_availability( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - body: Union[_models.CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.CheckElasticResourceAvailabilityResponse: - """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + deserialized = _deserialize(_models.BackupPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param body: The content of the action request. Is one of the following types: - CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest or JSON or - IO[bytes] - :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse - is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BackupPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BackupPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -23696,27 +13825,17 @@ def check_volume_file_path_availability( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckElasticResourceAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_capacity_pools_check_volume_file_path_availability_request( + _request = build_backup_policies_delete_request( resource_group_name=resource_group_name, account_name=account_name, - pool_name=pool_name, + backup_policy_name=backup_policy_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -23726,19 +13845,18 @@ def check_volume_file_path_availability( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -23746,448 +13864,293 @@ def check_volume_file_path_availability( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CheckElasticResourceAvailabilityResponse, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - -class ElasticVolumesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_volumes` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def get( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> _models.ElasticVolume: - """Get the details of the specified volume. + def begin_delete( + self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete backup policy. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :return: ElasticVolume. The ElasticVolume is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticVolume + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required. + :type backup_policy_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - _request = build_elastic_volumes_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.ElasticVolume, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Union[_models.ElasticVolume, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) + @distributed_trace + def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.BackupPolicy"]: + """List backup policies for Netapp Account. - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :return: An iterator like instance of BackupPolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[List[_models.BackupPolicy]] = kwargs.pop("cls", None) - _request = build_elastic_volumes_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + error_map.update(kwargs.pop("error_map", {}) or {}) - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def prepare_request(next_link=None): + if not next_link: - response = pipeline_response.http_response + _request = build_backup_policies_list_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BackupPolicy], + deserialized.get("value", []), ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + def get_next(next_link=None): + _request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - return deserialized # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ElasticVolume, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. + return pipeline_response - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolume - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ + return ItemPaged(get_next, extract_data) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ +class VolumeQuotaRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. + Instead, you should access the following operations through + :class:`~azure.mgmt.netapp.NetAppManagementClient`'s + :attr:`volume_quota_rules` attribute. + """ - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_create_or_update( + def get( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ElasticVolume, JSON, IO[bytes]], + volume_quota_rule_name: str, **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Create or update the specified volume within the capacity pool. + ) -> _models.VolumeQuotaRule: + """Get details of the specified quota rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Resource create parameters. Is one of the following types: ElasticVolume, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolume or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :return: VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.VolumeQuotaRule :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) + _request = build_volume_quota_rules_get_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticVolume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticVolume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _update_initial( + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]], + volume_quota_rule_name: str, + body: Union[_models.VolumeQuotaRule, _types.VolumeQuotaRule, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -24211,11 +14174,12 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_volumes_update_request( + _request = build_volume_quota_rules_create_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -24236,7 +14200,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -24249,10 +14213,7 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 201: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -24264,166 +14225,164 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: _models.ElasticVolumeUpdate, + volume_quota_rule_name: str, + body: _models.VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. + ) -> LROPoller[_models.VolumeQuotaRule]: + """Create the specified quota rule within the given volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: JSON, + volume_quota_rule_name: str, + body: _types.VolumeQuotaRule, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. + ) -> LROPoller[_models.VolumeQuotaRule]: + """Create the specified quota rule within the given volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.VolumeQuotaRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, + volume_quota_rule_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. + ) -> LROPoller[_models.VolumeQuotaRule]: + """Create the specified quota rule within the given volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The resource properties to be updated. Required. + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_update( + def begin_create( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]], + volume_quota_rule_name: str, + body: Union[_models.VolumeQuotaRule, _types.VolumeQuotaRule, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Patch the specified elastic volume. + ) -> LROPoller[_models.VolumeQuotaRule]: + """Create the specified quota rule within the given volume. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticVolumeUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Is either a + VolumeQuotaRule type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or + ~azure.mgmt.netapp.types.VolumeQuotaRule or IO[bytes] + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) + cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -24436,7 +14395,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) + deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -24454,32 +14413,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticVolume].from_continuation_token( + return LROPoller[_models.VolumeQuotaRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticVolume]( + return LROPoller[_models.VolumeQuotaRule]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _delete_initial( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + def _update_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: Union[_models.VolumeQuotaRulePatch, _types.VolumeQuotaRulePatch, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -24489,18 +14441,29 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_volumes_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_volume_quota_rules_update_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -24517,7 +14480,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -24534,59 +14497,174 @@ def _delete_initial( response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: _models.VolumeQuotaRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.VolumeQuotaRule]: + """Patch a quota rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: _types.VolumeQuotaRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.VolumeQuotaRule]: + """Patch a quota rule. - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.VolumeQuotaRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ - return deserialized # type: ignore + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.VolumeQuotaRule]: + """Patch a quota rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_delete( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete the specified Elastic Volume. + def begin_update( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + volume_quota_rule_name: str, + body: Union[_models.VolumeQuotaRulePatch, _types.VolumeQuotaRulePatch, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.VolumeQuotaRule]: + """Patch a quota rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :param body: Quota rule object supplied in the body of the operation. Is either a + VolumeQuotaRulePatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or + ~azure.mgmt.netapp.types.VolumeQuotaRulePatch or IO[bytes] + :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -24595,9 +14673,12 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.VolumeQuotaRule, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -24612,156 +14693,23 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.VolumeQuotaRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_pool( - self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticVolume"]: - """List all Elastic Volumes within the Elastic Capacity Pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :return: An iterator like instance of ElasticVolume - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_volumes_list_by_elastic_pool_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticVolume], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _revert_initial( + ) + return LROPoller[_models.VolumeQuotaRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]], + volume_quota_rule_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -24772,28 +14720,19 @@ def _revert_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_volumes_revert_request( + _request = build_volume_quota_rules_delete_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, + volume_quota_rule_name=volume_quota_rule_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -24810,7 +14749,7 @@ def _revert_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -24834,169 +14773,47 @@ def _revert_initial( return deserialized # type: ignore - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: _models.ElasticVolumeRevert, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_revert( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param body: The content of the action request. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_revert( + def begin_delete( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]], + volume_quota_rule_name: str, **kwargs: Any - ) -> LROPoller[_models.ElasticVolume]: - """Revert an Elastic Volume to the snapshot specified in the body. + ) -> LROPoller[None]: + """Delete quota rule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: The content of the action request. Is one of the following types: - ElasticVolumeRevert, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume] + :param volume_quota_rule_name: The name of volume quota rule. Required. + :type volume_quota_rule_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._revert_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - body=body, - content_type=content_type, + volume_quota_rule_name=volume_quota_rule_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -25005,45 +14822,148 @@ def begin_revert( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_volume( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> ItemPaged["_models.VolumeQuotaRule"]: + """List all quota rules associated with the volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An iterator like instance of VolumeQuotaRule + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeQuotaRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.VolumeQuotaRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_volume_quota_rules_list_by_volume_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.VolumeQuotaRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticVolume, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticVolume].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticVolume]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return pipeline_response + + return ItemPaged(get_next, extract_data) -class ElasticSnapshotsOperations: +class RansomwareReportsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_snapshots` attribute. + :attr:`ransomware_reports` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -25055,20 +14975,30 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "snapshot_name", + "ransomware_report_name", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def get( self, @@ -25076,24 +15006,28 @@ def get( account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + ransomware_report_name: str, **kwargs: Any - ) -> _models.ElasticSnapshot: - """Get a ElasticSnapshot. + ) -> _models.RansomwareReport: + """Get details of the specified ransomware report (ARP) ARP reports are created with a list of + suspected files when it detects any combination of high data entropy, abnormal volume activity + with data encryption, and unusual file extensions. ARP creates snapshots named + Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of these + ARP snapshots or another snapshot of your volume to restore data. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :return: ElasticSnapshot. The ElasticSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticSnapshot + :param ransomware_report_name: The name of the ransomware report. Required. + :type ransomware_report_name: str + :return: RansomwareReport. The RansomwareReport is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.RansomwareReport :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -25107,14 +15041,14 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.RansomwareReport] = kwargs.pop("cls", None) - _request = build_elastic_snapshots_get_request( + _request = build_ransomware_reports_get_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - snapshot_name=snapshot_name, + ransomware_report_name=ransomware_report_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -25147,352 +15081,187 @@ def get( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticSnapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "snapshot_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.ElasticSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_snapshots_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: _models.ElasticSnapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RansomwareReport, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "snapshot_name", - "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - snapshot_name: str, - body: Union[_models.ElasticSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshot]: - """Create a ElasticSnapshot. + def list( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> ItemPaged["_models.RansomwareReport"]: + """List all ransomware reports for the volume Returns a list of the Advanced Ransomware Protection + (ARP) reports for the volume. ARP reports are created with a list of suspected files when it + detects any combination of high data entropy, abnormal volume activity with data encryption, + and unusual file extensions. ARP creates snapshots named Anti_ransomware_backup when it detects + a potential ransomware threat. You can use one of these ARP snapshots or another snapshot of + your volume to restore data". :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str - :param body: Resource create parameters. Is one of the following types: ElasticSnapshot, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshot or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot] + :return: An iterator like instance of RansomwareReport + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.RansomwareReport] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - snapshot_name=snapshot_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshot, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[List[_models.RansomwareReport]] = kwargs.pop("cls", None) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } + error_map.update(kwargs.pop("error_map", {}) or {}) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + def prepare_request(next_link=None): + if not next_link: + + _request = build_ransomware_reports_list_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RansomwareReport], + deserialized.get("value", []), ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticSnapshot].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return LROPoller[_models.ElasticSnapshot]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "snapshot_name", + "ransomware_report_name", + "content_type", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def _delete_initial( + def _clear_suspects_initial( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + ransomware_report_name: str, + body: Union[_models.RansomwareSuspectsClearRequest, _types.RansomwareSuspectsClearRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -25503,19 +15272,29 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_snapshots_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ransomware_reports_clear_suspects_request( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - snapshot_name=snapshot_name, + ransomware_report_name=ransomware_report_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -25532,7 +15311,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -25544,74 +15323,216 @@ def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_clear_suspects( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: _models.RansomwareSuspectsClearRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should + evaluate the report to determine whether the activity is acceptable (false positive) or whether + an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a + potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your + volume to restore data",. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param ransomware_report_name: The name of the ransomware report. Required. + :type ransomware_report_name: str + :param body: Clear suspects request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_clear_suspects( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: _types.RansomwareSuspectsClearRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should + evaluate the report to determine whether the activity is acceptable (false positive) or whether + an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a + potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your + volume to restore data",. - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param ransomware_report_name: The name of the ransomware report. Required. + :type ransomware_report_name: str + :param body: Clear suspects request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.RansomwareSuspectsClearRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + @overload + def begin_clear_suspects( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + ransomware_report_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should + evaluate the report to determine whether the activity is acceptable (false positive) or whether + an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a + potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your + volume to restore data",. - return deserialized # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param ransomware_report_name: The name of the ransomware report. Required. + :type ransomware_report_name: str + :param body: Clear suspects request object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2025-12-01", params_added_on={ - "2025-12-15-preview": [ + "2025-12-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", "pool_name", "volume_name", - "snapshot_name", + "ransomware_report_name", + "content_type", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-01", + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_delete( + def begin_clear_suspects( self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, - snapshot_name: str, + ransomware_report_name: str, + body: Union[_models.RansomwareSuspectsClearRequest, _types.RansomwareSuspectsClearRequest, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: - """Delete a ElasticSnapshot. + """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should + evaluate the report to determine whether the activity is acceptable (false positive) or whether + an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a + potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your + volume to restore data",. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. + :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. + :param volume_name: The name of the volume. Required. :type volume_name: str - :param snapshot_name: The name of the ElasticSnapshot. Required. - :type snapshot_name: str + :param ransomware_report_name: The name of the ransomware report. Required. + :type ransomware_report_name: str + :param body: Clear suspects request object supplied in the body of the operation. Is either a + RansomwareSuspectsClearRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or + ~azure.mgmt.netapp.types.RansomwareSuspectsClearRequest or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._clear_suspects_initial( resource_group_name=resource_group_name, account_name=account_name, pool_name=pool_name, volume_name=volume_name, - snapshot_name=snapshot_name, + ransomware_report_name=ransomware_report_name, + body=body, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -25620,163 +15541,40 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "pool_name", - "volume_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_volume( - self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticSnapshot"]: - """List ElasticSnapshot resources by ElasticVolume. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param pool_name: The name of the ElasticCapacityPool. Required. - :type pool_name: str - :param volume_name: The name of the ElasticVolume. Required. - :type volume_name: str - :return: An iterator like instance of ElasticSnapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticSnapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_snapshots_list_by_elastic_volume_request( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - volume_name=volume_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticSnapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - return pipeline_response + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return ItemPaged(get_next, extract_data) + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore -class ElasticSnapshotPoliciesOperations: +class BackupVaultsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_snapshot_policies` attribute. + :attr:`backup_vaults` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -25787,34 +15585,20 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def get( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> _models.ElasticSnapshotPolicy: - """Get a ElasticSnapshotPolicy. + self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any + ) -> _models.BackupVault: + """Get the Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :return: ElasticSnapshotPolicy. The ElasticSnapshotPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :return: BackupVault. The BackupVault is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.BackupVault :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -25828,12 +15612,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) - _request = build_elastic_snapshot_policies_get_request( + _request = build_backup_vaults_get_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -25868,34 +15652,19 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) + deserialized = _deserialize(_models.BackupVault, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def _create_or_update_initial( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]], + backup_vault_name: str, + body: Union[_models.BackupVault, _types.BackupVault, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -25919,10 +15688,10 @@ def _create_or_update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_snapshot_policies_create_or_update_request( + _request = build_backup_vaults_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -25974,29 +15743,29 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: _models.ElasticSnapshotPolicy, + backup_vault_name: str, + body: _models.BackupVault, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Create or update the specified Backup Vault in the NetApp account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: BackupVault object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.BackupVault :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26005,29 +15774,29 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + backup_vault_name: str, + body: _types.BackupVault, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Create or update the specified Backup Vault in the NetApp account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. - :type body: JSON + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: BackupVault object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.BackupVault :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26036,78 +15805,64 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + backup_vault_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Create or update the specified Backup Vault in the NetApp account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Required. + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: BackupVault object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def begin_create_or_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]], + backup_vault_name: str, + body: Union[_models.BackupVault, _types.BackupVault, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Create a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Create or update the specified Backup Vault in the NetApp account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: Resource create parameters. Is one of the following types: ElasticSnapshotPolicy, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: BackupVault object supplied in the body of the operation. Is either a BackupVault + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupVault or ~azure.mgmt.netapp.types.BackupVault or + IO[bytes] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -26115,7 +15870,7 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -26128,7 +15883,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) + deserialized = _deserialize(_models.BackupVault, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -26146,37 +15901,22 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticSnapshotPolicy].from_continuation_token( + return LROPoller[_models.BackupVault].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticSnapshotPolicy]( + return LROPoller[_models.BackupVault]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def _update_initial( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]], + backup_vault_name: str, + body: Union[_models.BackupVaultPatch, _types.BackupVaultPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -26200,10 +15940,10 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_snapshot_policies_update_request( + _request = build_backup_vaults_update_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -26238,9 +15978,6 @@ def _update_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -26256,29 +15993,29 @@ def begin_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: _models.ElasticSnapshotPolicyUpdate, + backup_vault_name: str, + body: _models.BackupVaultPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Patch the specified NetApp Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: Backup Vault object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.BackupVaultPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26287,29 +16024,29 @@ def begin_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: JSON, + backup_vault_name: str, + body: _types.BackupVaultPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Patch the specified NetApp Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: Backup Vault object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.BackupVaultPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -26318,78 +16055,64 @@ def begin_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, + backup_vault_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Patch the specified NetApp Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Required. + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: Backup Vault object supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def begin_update( self, resource_group_name: str, account_name: str, - snapshot_policy_name: str, - body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]], + backup_vault_name: str, + body: Union[_models.BackupVaultPatch, _types.BackupVaultPatch, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticSnapshotPolicy]: - """Update a ElasticSnapshotPolicy. + ) -> LROPoller[_models.BackupVault]: + """Patch the specified NetApp Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticSnapshotPolicyUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str + :param body: Backup Vault object supplied in the body of the operation. Is either a + BackupVaultPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or + ~azure.mgmt.netapp.types.BackupVaultPatch or IO[bytes] + :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None) + cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -26397,7 +16120,7 @@ def begin_update( raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -26410,7 +16133,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json()) + deserialized = _deserialize(_models.BackupVault, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -26428,31 +16151,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticSnapshotPolicy].from_continuation_token( + return LROPoller[_models.BackupVault].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticSnapshotPolicy]( + return LROPoller[_models.BackupVault]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def _delete_initial( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -26467,10 +16177,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_snapshot_policies_delete_request( + _request = build_backup_vaults_delete_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -26514,31 +16224,18 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) def begin_delete( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any ) -> LROPoller[None]: - """Delete a ElasticSnapshotPolicy. + """Delete the specified Backup Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str + :param backup_vault_name: The name of the Backup Vault. Required. + :type backup_vault_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -26554,7 +16251,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, + backup_vault_name=backup_vault_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -26589,149 +16286,24 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( + def list_by_net_app_account( self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticSnapshotPolicy"]: - """List ElasticSnapshotPolicy resources by ElasticAccount. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticSnapshotPolicy - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticSnapshotPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticSnapshotPolicy]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_snapshot_policies_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticSnapshotPolicy], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "snapshot_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_elastic_volumes( - self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticVolume"]: - """Get elastic volumes associated with Elastic Snapshot Policy. + ) -> ItemPaged["_models.BackupVault"]: + """List and describe all Backup Vaults in the NetApp account. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required. - :type snapshot_policy_name: str - :return: An iterator like instance of ElasticVolume - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume] + :return: An iterator like instance of BackupVault + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupVault] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.BackupVault]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -26744,10 +16316,9 @@ def list_elastic_volumes( def prepare_request(next_link=None): if not next_link: - _request = build_elastic_snapshot_policies_list_elastic_volumes_request( + _request = build_backup_vaults_list_by_net_app_account_request( resource_group_name=resource_group_name, account_name=account_name, - snapshot_policy_name=snapshot_policy_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -26788,7 +16359,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ElasticVolume], + List[_models.BackupVault], deserialized.get("value", []), ) if cls: @@ -26817,14 +16388,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ElasticBackupVaultsOperations: +class BucketsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_backup_vaults` attribute. + :attr:`buckets` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -26843,26 +16414,48 @@ def __init__(self, *args, **kwargs) -> None: "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> _models.ElasticBackupVault: - """Get the Elastic Backup Vault. + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any + ) -> _models.Bucket: + """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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :return: ElasticBackupVault. The ElasticBackupVault is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackupVault + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :return: Bucket. The Bucket is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.Bucket :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -26876,12 +16469,14 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) + cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) - _request = build_elastic_backup_vaults_get_request( + _request = build_buckets_get_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -26916,7 +16511,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) + deserialized = _deserialize(_models.Bucket, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -26931,19 +16526,32 @@ def get( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _create_or_update_initial( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVault, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.Bucket, _types.Bucket, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -26967,10 +16575,12 @@ def _create_or_update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_backup_vaults_create_or_update_request( + _request = build_buckets_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -27022,29 +16632,37 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: _models.ElasticBackupVault, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _models.Bucket, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + ) -> LROPoller[_models.Bucket]: + """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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVault + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. + :type body: ~azure.mgmt.netapp.models.Bucket :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27053,29 +16671,37 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _types.Bucket, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + ) -> LROPoller[_models.Bucket]: + """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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. - :type body: JSON + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. + :type body: ~azure.mgmt.netapp.types.Bucket :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27084,29 +16710,37 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + ) -> LROPoller[_models.Bucket]: + """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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Required. + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27119,43 +16753,61 @@ def begin_create_or_update( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVault, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.Bucket, _types.Bucket, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + ) -> LROPoller[_models.Bucket]: + """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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackupVault, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVault or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Is either a Bucket type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Bucket or ~azure.mgmt.netapp.types.Bucket or IO[bytes] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) + cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -27163,7 +16815,9 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -27176,7 +16830,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) + deserialized = _deserialize(_models.Bucket, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -27194,13 +16848,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticBackupVault].from_continuation_token( + return LROPoller[_models.Bucket].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticBackupVault]( + return LROPoller[_models.Bucket]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -27212,19 +16866,32 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _update_initial( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.BucketPatch, _types.BucketPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -27248,10 +16915,12 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_backup_vaults_update_request( + _request = build_buckets_update_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -27304,29 +16973,36 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: _models.ElasticBackupVaultUpdate, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _models.BucketPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. + ) -> LROPoller[_models.Bucket]: + """Updates the details of a volume bucket. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. + :type body: ~azure.mgmt.netapp.models.BucketPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27335,29 +17011,36 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: JSON, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _types.BucketPatch, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. + ) -> LROPoller[_models.Bucket]: + """Updates the details of a volume bucket. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. + :type body: ~azure.mgmt.netapp.types.BucketPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27366,29 +17049,36 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. + ) -> LROPoller[_models.Bucket]: + """Updates the details of a volume bucket. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Required. + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -27401,43 +17091,61 @@ def begin_update( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.BucketPatch, _types.BucketPatch, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackupVault]: - """Patch the specified NetApp Elastic Backup Vault. + ) -> LROPoller[_models.Bucket]: + """Updates the details of a volume bucket. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackupVaultUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket details including user details, and the volume path that should be + mounted inside the bucket. Is either a BucketPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketPatch or ~azure.mgmt.netapp.types.BucketPatch or + IO[bytes] + :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None) + cls: ClsType[_models.Bucket] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -27445,7 +17153,9 @@ def begin_update( raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -27458,7 +17168,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupVault, response.json()) + deserialized = _deserialize(_models.Bucket, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -27476,13 +17186,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticBackupVault].from_continuation_token( + return LROPoller[_models.Bucket].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticBackupVault]( + return LROPoller[_models.Bucket]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -27494,13 +17204,30 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -27515,10 +17242,12 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_backup_vaults_delete_request( + _request = build_buckets_delete_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -27551,6 +17280,9 @@ def _delete_initial( response_headers = {} if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -27570,23 +17302,44 @@ def _delete_initial( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", + "volume_name", + "bucket_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any ) -> LROPoller[None]: - """Delete the specified Elastic Backup Vault. + """Delete a volume's bucket. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -27602,7 +17355,9 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -27640,28 +17395,50 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @api_version_validation( method_added_on="2025-12-15-preview", params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] + "2025-12-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "account_name", + "pool_name", + "volume_name", + "accept", + ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticBackupVault"]: - """List and describe all Elastic Backup Vaults in the elastic account. + def list( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> ItemPaged["_models.Bucket"]: + """Describes all buckets belonging to a volume. Buckets allow additional services, such as AI + services, connect to the volume data contained in those buckets. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :return: An iterator like instance of ElasticBackupVault - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupVault] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An iterator like instance of Bucket + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Bucket] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ElasticBackupVault]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Bucket]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -27674,9 +17451,11 @@ def list_by_elastic_account( def prepare_request(next_link=None): if not next_link: - _request = build_elastic_backup_vaults_list_by_elastic_account_request( + _request = build_buckets_list_request( resource_group_name=resource_group_name, account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -27717,7 +17496,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ElasticBackupVault], + List[_models.Bucket], deserialized.get("value", []), ) if cls: @@ -27745,297 +17524,120 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - -class ElasticBackupPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_backup_policies` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def get( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any - ) -> _models.ElasticBackupPolicy: - """Get the Elastic Backup Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :return: ElasticBackupPolicy. The ElasticBackupPolicy is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackupPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) - - _request = build_elastic_backup_policies_get_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "account_name", - "backup_policy_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_elastic_backup_policies_create_or_update_request( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - @overload - def begin_create_or_update( + def generate_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: _models.ElasticBackupPolicy, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _models.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. + ) -> _models.BucketGenerateCredentials: + """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). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket's Access and Secret key pair expiry time expressed as the number of + days from now. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with + MutableMapping + :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def generate_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _types.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. + ) -> _models.BucketGenerateCredentials: + """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). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. - :type body: JSON + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket's Access and Secret key pair expiry time expressed as the number of + days from now. Required. + :type body: ~azure.mgmt.netapp.types.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with + MutableMapping + :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def generate_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. + ) -> _models.BucketGenerateCredentials: + """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). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Required. + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket's Access and Secret key pair expiry time expressed as the number of + days from now. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with + MutableMapping + :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials :raises ~azure.core.exceptions.HttpResponseError: """ @@ -28048,90 +17650,126 @@ def begin_create_or_update( "subscription_id", "resource_group_name", "account_name", - "backup_policy_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_create_or_update( + def generate_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Create or update the specified Elastic Backup Policy in the NetApp account. + ) -> _models.BucketGenerateCredentials: + """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). :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackupPolicy, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The bucket's Access and Secret key pair expiry time expressed as the number of + days from now. Is either a BucketCredentialsExpiry type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or + ~azure.mgmt.netapp.types.BucketCredentialsExpiry or IO[bytes] + :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with + MutableMapping + :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - account_name=account_name, - backup_policy_name=backup_policy_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.BucketGenerateCredentials] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_buckets_generate_credentials_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.ElasticBackupPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ElasticBackupPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.BucketGenerateCredentials, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @api_version_validation( method_added_on="2025-12-15-preview", @@ -28141,19 +17779,31 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_policy_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", - "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def _update_initial( + def _generate_akv_credentials_initial( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -28177,10 +17827,12 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_backup_policies_update_request( + _request = build_buckets_generate_akv_credentials_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -28201,7 +17853,7 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -28214,9 +17866,11 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -28226,95 +17880,113 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_generate_akv_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: _models.ElasticBackupPolicyUpdate, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _models.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. + ) -> LROPoller[None]: + """Generate the access key and secret key used for accessing the specified volume bucket and store + in Azure Key Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_generate_akv_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: JSON, + pool_name: str, + volume_name: str, + bucket_name: str, + body: _types.BucketCredentialsExpiry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. + ) -> LROPoller[None]: + """Generate the access key and secret key used for accessing the specified volume bucket and store + in Azure Key Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.netapp.types.BucketCredentialsExpiry :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_generate_akv_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. + ) -> LROPoller[None]: + """Generate the access key and secret key used for accessing the specified volume bucket and store + in Azure Key Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Required. + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The content of the action request. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -28327,51 +17999,70 @@ def begin_update( "subscription_id", "resource_group_name", "account_name", - "backup_policy_name", + "pool_name", + "volume_name", + "bucket_name", "content_type", - "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_update( + def begin_generate_akv_credentials( self, resource_group_name: str, account_name: str, - backup_policy_name: str, - body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]], + pool_name: str, + volume_name: str, + bucket_name: str, + body: Union[_models.BucketCredentialsExpiry, _types.BucketCredentialsExpiry, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackupPolicy]: - """Patch the specified NetApp Elastic Backup Policy. + ) -> LROPoller[None]: + """Generate the access key and secret key used for accessing the specified volume bucket and store + in Azure Key Vault. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackupPolicyUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str + :param body: The content of the action request. Is either a BucketCredentialsExpiry type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or + ~azure.mgmt.netapp.types.BucketCredentialsExpiry or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._generate_akv_credentials_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -28382,12 +18073,9 @@ def begin_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackupPolicy, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -28402,15 +18090,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticBackupPolicy].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticBackupPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @api_version_validation( method_added_on="2025-12-15-preview", @@ -28420,13 +18106,30 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_policy_name", + "pool_name", + "volume_name", + "bucket_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def _delete_initial( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + def _refresh_certificate_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -28441,10 +18144,12 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_backup_policies_delete_request( + _request = build_buckets_refresh_certificate_request( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -28463,7 +18168,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -28476,9 +18181,11 @@ def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -28496,23 +18203,45 @@ def _delete_initial( "subscription_id", "resource_group_name", "account_name", - "backup_policy_name", + "pool_name", + "volume_name", + "bucket_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_delete( - self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any + def begin_refresh_certificate( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + bucket_name: str, + **kwargs: Any ) -> LROPoller[None]: - """Delete the specified Elastic Policy. + """This operation will fetch the certificate from Azure Key Vault and install it on the bucket + server. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_policy_name: The name of the ElasticBackupPolicy. Required. - :type backup_policy_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param bucket_name: The name of the bucket. Required. + :type bucket_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -28525,10 +18254,12 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._refresh_certificate_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_policy_name=backup_policy_name, + pool_name=pool_name, + volume_name=volume_name, + bucket_name=bucket_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -28562,124 +18293,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_elastic_account( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticBackupPolicy"]: - """List and describe all Elastic Backup Policies in the elastic account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. - :type account_name: str - :return: An iterator like instance of ElasticBackupPolicy - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ElasticBackupPolicy]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_elastic_backup_policies_list_by_elastic_account_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ElasticBackupPolicy], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - -class ElasticBackupsOperations: +class CachesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`elastic_backups` attribute. + :attr:`caches` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -28698,29 +18320,38 @@ def __init__(self, *args, **kwargs) -> None: "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def get( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any - ) -> _models.ElasticBackup: - """Get the specified Elastic Backup under Elastic Backup Vault. + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + ) -> _models.Cache: + """Get the details of the specified Cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :return: ElasticBackup. The ElasticBackup is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ElasticBackup + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :return: Cache. The Cache is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.Cache :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -28734,13 +18365,13 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) + cls: ClsType[_models.Cache] = kwargs.pop("cls", None) - _request = build_elastic_backups_get_request( + _request = build_caches_get_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -28775,7 +18406,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ElasticBackup, response.json()) + deserialized = _deserialize(_models.Cache, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -28790,21 +18421,30 @@ def get( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _create_or_update_initial( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], + pool_name: str, + cache_name: str, + body: Union[_models.Cache, _types.Cache, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -28828,11 +18468,11 @@ def _create_or_update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_backups_create_or_update_request( + _request = build_caches_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -28884,32 +18524,32 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: _models.ElasticBackup, + pool_name: str, + cache_name: str, + body: _models.Cache, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Create or update the specified Cache within the Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup + :type body: ~azure.mgmt.netapp.models.Cache :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -28918,32 +18558,32 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + pool_name: str, + cache_name: str, + body: _types.Cache, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Create or update the specified Cache within the Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: Resource create parameters. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.Cache :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -28952,32 +18592,32 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, + cache_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Create or update the specified Cache within the Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: Resource create parameters. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -28990,47 +18630,55 @@ def begin_create_or_update( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_create_or_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], + pool_name: str, + cache_name: str, + body: Union[_models.Cache, _types.Cache, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Create an elastic backup under the elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Create or update the specified Cache within the Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: Resource create parameters. Is one of the following types: ElasticBackup, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: Resource create parameters. Is either a Cache type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.Cache or ~azure.mgmt.netapp.types.Cache or IO[bytes] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) + cls: ClsType[_models.Cache] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -29038,8 +18686,8 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -29052,7 +18700,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackup, response.json()) + deserialized = _deserialize(_models.Cache, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -29070,13 +18718,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticBackup].from_continuation_token( + return LROPoller[_models.Cache].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticBackup]( + return LROPoller[_models.Cache]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -29088,21 +18736,30 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _update_initial( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], + pool_name: str, + cache_name: str, + body: Union[_models.CacheUpdate, _types.CacheUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -29126,11 +18783,11 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_elastic_backups_update_request( + _request = build_caches_update_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -29183,32 +18840,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: _models.ElasticBackup, + pool_name: str, + cache_name: str, + body: _models.CacheUpdate, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Patch the specified Cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup + :type body: ~azure.mgmt.netapp.models.CacheUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -29217,32 +18874,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: JSON, + pool_name: str, + cache_name: str, + body: _types.CacheUpdate, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Patch the specified Cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: The resource properties to be updated. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CacheUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -29251,32 +18908,32 @@ def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, + pool_name: str, + cache_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Patch the specified Cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :param body: The resource properties to be updated. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -29289,47 +18946,57 @@ def begin_update( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_update( self, resource_group_name: str, account_name: str, - backup_vault_name: str, - backup_name: str, - body: Union[_models.ElasticBackup, JSON, IO[bytes]], + pool_name: str, + cache_name: str, + body: Union[_models.CacheUpdate, _types.CacheUpdate, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ElasticBackup]: - """Patch an elastic Backup under the Elastic Backup Vault. + ) -> LROPoller[_models.Cache]: + """Patch the specified Cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str - :param body: The resource properties to be updated. Is one of the following types: - ElasticBackup, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes] - :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: The resource properties to be updated. Is either a CacheUpdate type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.CacheUpdate or ~azure.mgmt.netapp.types.CacheUpdate or + IO[bytes] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None) + cls: ClsType[_models.Cache] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -29337,8 +19004,8 @@ def begin_update( raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -29351,7 +19018,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ElasticBackup, response.json()) + deserialized = _deserialize(_models.Cache, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -29369,13 +19036,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ElasticBackup].from_continuation_token( + return LROPoller[_models.Cache].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ElasticBackup]( + return LROPoller[_models.Cache]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -29387,14 +19054,23 @@ def get_long_running_output(pipeline_response): "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def _delete_initial( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -29409,11 +19085,11 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_elastic_backups_delete_request( + _request = build_caches_delete_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -29465,26 +19141,35 @@ def _delete_initial( "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", - "backup_name", + "pool_name", + "cache_name", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) def begin_delete( - self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any ) -> LROPoller[None]: - """Delete a ElasticBackup. + """Delete the specified cache. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :param backup_name: The name of the ElasticBackup. Required. - :type backup_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -29500,8 +19185,8 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, - backup_name=backup_name, + pool_name=pool_name, + cache_name=cache_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -29537,39 +19222,47 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2026-01-01", params_added_on={ - "2025-12-15-preview": [ + "2026-01-01": [ "api_version", "subscription_id", "resource_group_name", "account_name", - "backup_vault_name", + "pool_name", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def list_by_vault( - self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any - ) -> ItemPaged["_models.ElasticBackup"]: - """List all elastic backups Under an elastic Backup Vault. + def list( + self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any + ) -> ItemPaged["_models.Cache"]: + """List all Caches within the Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param account_name: The name of the ElasticAccount. Required. + :param account_name: The name of the NetApp account. Required. :type account_name: str - :param backup_vault_name: The name of the ElasticBackupVault. Required. - :type backup_vault_name: str - :return: An iterator like instance of ElasticBackup - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackup] + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :return: An iterator like instance of Cache + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ElasticBackup]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Cache]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -29582,10 +19275,10 @@ def list_by_vault( def prepare_request(next_link=None): if not next_link: - _request = build_elastic_backups_list_by_vault_request( + _request = build_caches_list_request( resource_group_name=resource_group_name, account_name=account_name, - backup_vault_name=backup_vault_name, + pool_name=pool_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -29626,7 +19319,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ElasticBackup], + List[_models.Cache], deserialized.get("value", []), ) if cls: @@ -29644,293 +19337,15 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class ActiveDirectoryConfigsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.netapp.NetAppManagementClient`'s - :attr:`active_directory_configs` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def get( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any - ) -> _models.ActiveDirectoryConfig: - """Get the details of the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :return: ActiveDirectoryConfig. The ActiveDirectoryConfig is compatible with MutableMapping - :rtype: ~azure.mgmt.netapp.models.ActiveDirectoryConfig - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) - - _request = build_active_directory_configs_get_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={ - "2025-12-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "active_directory_config_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_active_directory_configs_create_or_update_request( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: _models.ActiveDirectoryConfig, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. + return pipeline_response - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ + return ItemPaged(get_next, extract_data) @distributed_trace @api_version_validation( @@ -29940,86 +19355,100 @@ def begin_create_or_update( "api_version", "subscription_id", "resource_group_name", - "active_directory_config_name", - "content_type", + "account_name", + "pool_name", + "cache_name", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_create_or_update( - self, - resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Create or update the specified active directory configuration. + def list_peering_passphrases( + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + ) -> _models.PeeringPassphrases: + """This operation will list the cluster peering command, cluster peering passphrase and the + vserver peering command. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: Resource create parameters. Is one of the following types: ActiveDirectoryConfig, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig or JSON or IO[bytes] - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :return: PeeringPassphrases. The PeeringPassphrases is compatible with MutableMapping + :rtype: ~azure.mgmt.netapp.models.PeeringPassphrases :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - body=body, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[_models.PeeringPassphrases] = kwargs.pop("cls", None) + _request = build_caches_list_peering_passphrases_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + cache_name=cache_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.ActiveDirectoryConfig].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ActiveDirectoryConfig]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.PeeringPassphrases, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @api_version_validation( method_added_on="2025-12-15-preview", @@ -30028,18 +19457,31 @@ def get_long_running_output(pipeline_response): "api_version", "subscription_id", "resource_group_name", - "active_directory_config_name", + "account_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def _update_initial( + def _pool_change_initial( self, resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]], + account_name: str, + pool_name: str, + cache_name: str, + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -30063,9 +19505,11 @@ def _update_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_active_directory_configs_update_request( + _request = build_caches_pool_change_request( resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, + account_name=account_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -30100,9 +19544,6 @@ def _update_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -30114,86 +19555,104 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, - active_directory_config_name: str, - body: _models.ActiveDirectoryConfigUpdate, + account_name: str, + pool_name: str, + cache_name: str, + body: _models.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. + ) -> LROPoller[_models.Cache]: + """Moves Cache to another Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: Move cache to the pool supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, - active_directory_config_name: str, - body: JSON, + account_name: str, + pool_name: str, + cache_name: str, + body: _types.PoolChangeRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. + ) -> LROPoller[_models.Cache]: + """Moves Cache to another Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. - :type body: JSON + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: Move cache to the pool supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.types.PoolChangeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update( + def begin_pool_change( self, resource_group_name: str, - active_directory_config_name: str, + account_name: str, + pool_name: str, + cache_name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. + ) -> LROPoller[_models.Cache]: + """Moves Cache to another Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Required. + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: Move cache to the pool supplied in the body of the operation. Required. :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -30205,47 +19664,67 @@ def begin_update( "api_version", "subscription_id", "resource_group_name", - "active_directory_config_name", + "account_name", + "pool_name", + "cache_name", "content_type", "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def begin_update( + def begin_pool_change( self, resource_group_name: str, - active_directory_config_name: str, - body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]], + account_name: str, + pool_name: str, + cache_name: str, + body: Union[_models.PoolChangeRequest, _types.PoolChangeRequest, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ActiveDirectoryConfig]: - """Patch the specified active directory configuration. + ) -> LROPoller[_models.Cache]: + """Moves Cache to another Capacity Pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :param body: The resource properties to be updated. Is one of the following types: - ActiveDirectoryConfigUpdate, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate or JSON or IO[bytes] - :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig - is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig] + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :param body: Move cache to the pool supplied in the body of the operation. Is either a + PoolChangeRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or + ~azure.mgmt.netapp.types.PoolChangeRequest or IO[bytes] + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None) + cls: ClsType[_models.Cache] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._update_initial( + raw_result = self._pool_change_initial( resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, + account_name=account_name, + pool_name=pool_name, + cache_name=cache_name, body=body, content_type=content_type, cls=lambda x, y, z: x, @@ -30258,7 +19737,7 @@ def begin_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json()) + deserialized = _deserialize(_models.Cache, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -30276,13 +19755,13 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ActiveDirectoryConfig].from_continuation_token( + return LROPoller[_models.Cache].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.ActiveDirectoryConfig]( + return LROPoller[_models.Cache]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @@ -30293,13 +19772,25 @@ def get_long_running_output(pipeline_response): "api_version", "subscription_id", "resource_group_name", - "active_directory_config_name", + "account_name", + "pool_name", + "cache_name", + "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def _delete_initial( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any + def _reset_smb_password_initial( + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -30314,9 +19805,11 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_active_directory_configs_delete_request( + _request = build_caches_reset_smb_password_request( resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, + account_name=account_name, + pool_name=pool_name, + cache_name=cache_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -30335,7 +19828,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -30367,270 +19860,92 @@ def _delete_initial( "api_version", "subscription_id", "resource_group_name", - "active_directory_config_name", + "account_name", + "pool_name", + "cache_name", + "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def begin_delete( - self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete the specified Active Directory configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required. - :type active_directory_config_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - active_directory_config_name=active_directory_config_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], - ) - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.ActiveDirectoryConfig"]: - """List all active directory configurations within the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ActiveDirectoryConfig - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_active_directory_configs_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ActiveDirectoryConfig], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2025-12-15-preview", - params_added_on={"2025-12-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=[ + "2025-12-15-preview", + "2026-01-01", + "2026-01-15-preview", + "2026-03-01", + "2026-03-15-preview", + "2026-04-01", + "2026-04-15-preview", + "2026-05-01", + ], ) - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ActiveDirectoryConfig"]: - """List all active directory configurations within the subscription. - - :return: An iterator like instance of ActiveDirectoryConfig - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_active_directory_configs_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ActiveDirectoryConfig], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + def begin_reset_smb_password( + self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any + ) -> LROPoller[_models.Cache]: + """Resets the SMB password for the cache. - def get_next(next_link=None): - _request = prepare_request(next_link) + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param cache_name: The name of the cache resource. Required. + :type cache_name: str + :return: An instance of LROPoller that returns Cache. The Cache is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + cls: ClsType[_models.Cache] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_smb_password_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + cache_name=cache_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs ) - response = pipeline_response.http_response + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Cache, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - return pipeline_response + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return ItemPaged(get_next, extract_data) + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Cache].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Cache]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) class NetAppResourceQuotaLimitsOperations: @@ -31087,7 +20402,7 @@ def _create_or_update_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccount, JSON, IO[bytes]], + body: Union[_models.NetAppAccount, _types.NetAppAccount, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -31193,7 +20508,7 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.NetAppAccount, *, content_type: str = "application/json", **kwargs: Any @@ -31206,7 +20521,7 @@ def begin_create_or_update( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: NetApp Account object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.NetAppAccount :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -31249,7 +20564,7 @@ def begin_create_or_update( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccount, JSON, IO[bytes]], + body: Union[_models.NetAppAccount, _types.NetAppAccount, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetAppAccount]: """Create or update the specified NetApp account within the resource group. @@ -31259,9 +20574,10 @@ def begin_create_or_update( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: NetApp Account object supplied in the body of the operation. Is one of the - following types: NetAppAccount, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.NetAppAccount or JSON or IO[bytes] + :param body: NetApp Account object supplied in the body of the operation. Is either a + NetAppAccount type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.NetAppAccount or ~azure.mgmt.netapp.types.NetAppAccount + or IO[bytes] :return: An instance of LROPoller that returns NetAppAccount. The NetAppAccount is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.NetAppAccount] @@ -31320,9 +20636,9 @@ def get_long_running_output(pipeline_response): ) @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2026-01-01", params_added_on={ - "2025-12-15-preview": [ + "2026-01-01": [ "api_version", "subscription_id", "resource_group_name", @@ -31331,13 +20647,13 @@ def get_long_running_output(pipeline_response): "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=["2026-01-01", "2026-03-01", "2026-04-01", "2026-05-01"], ) def _update_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccountPatch, JSON, IO[bytes]], + body: Union[_models.NetAppAccountPatch, _types.NetAppAccountPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -31441,7 +20757,7 @@ def begin_update( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.NetAppAccountPatch, *, content_type: str = "application/json", **kwargs: Any @@ -31454,7 +20770,7 @@ def begin_update( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: NetApp Account object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.NetAppAccountPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -31494,9 +20810,9 @@ def begin_update( @distributed_trace @api_version_validation( - method_added_on="2025-12-15-preview", + method_added_on="2026-01-01", params_added_on={ - "2025-12-15-preview": [ + "2026-01-01": [ "api_version", "subscription_id", "resource_group_name", @@ -31505,13 +20821,13 @@ def begin_update( "accept", ] }, - api_versions_list=["2025-12-15-preview", "2026-01-15-preview", "2026-03-15-preview", "2026-04-15-preview"], + api_versions_list=["2026-01-01", "2026-03-01", "2026-04-01", "2026-05-01"], ) def begin_update( self, resource_group_name: str, account_name: str, - body: Union[_models.NetAppAccountPatch, JSON, IO[bytes]], + body: Union[_models.NetAppAccountPatch, _types.NetAppAccountPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetAppAccount]: """Patch the specified NetApp account. @@ -31521,9 +20837,10 @@ def begin_update( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: NetApp Account object supplied in the body of the operation. Is one of the - following types: NetAppAccountPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch or JSON or IO[bytes] + :param body: NetApp Account object supplied in the body of the operation. Is either a + NetAppAccountPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch or + ~azure.mgmt.netapp.types.NetAppAccountPatch or IO[bytes] :return: An instance of LROPoller that returns NetAppAccount. The NetAppAccount is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.NetAppAccount] @@ -32011,7 +21328,9 @@ def _transition_to_cmk_initial( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.EncryptionTransitionRequest, JSON, IO[bytes]]] = None, + body: Optional[ + Union[_models.EncryptionTransitionRequest, _types.EncryptionTransitionRequest, IO[bytes]] + ] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -32119,7 +21438,7 @@ def begin_transition_to_cmk( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[_types.EncryptionTransitionRequest] = None, *, content_type: str = "application/json", **kwargs: Any @@ -32134,7 +21453,7 @@ def begin_transition_to_cmk( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: The required parameters to perform encryption transition. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.EncryptionTransitionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -32177,7 +21496,9 @@ def begin_transition_to_cmk( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.EncryptionTransitionRequest, JSON, IO[bytes]]] = None, + body: Optional[ + Union[_models.EncryptionTransitionRequest, _types.EncryptionTransitionRequest, IO[bytes]] + ] = None, **kwargs: Any ) -> LROPoller[None]: """Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key @@ -32189,9 +21510,10 @@ def begin_transition_to_cmk( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: The required parameters to perform encryption transition. Is one of the following - types: EncryptionTransitionRequest, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or JSON or IO[bytes] + :param body: The required parameters to perform encryption transition. Is either a + EncryptionTransitionRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or + ~azure.mgmt.netapp.types.EncryptionTransitionRequest or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -32386,7 +21708,7 @@ def _change_key_vault_initial( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.ChangeKeyVault, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.ChangeKeyVault, _types.ChangeKeyVault, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -32493,7 +21815,7 @@ def begin_change_key_vault( self, resource_group_name: str, account_name: str, - body: Optional[JSON] = None, + body: Optional[_types.ChangeKeyVault] = None, *, content_type: str = "application/json", **kwargs: Any @@ -32507,7 +21829,7 @@ def begin_change_key_vault( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: The required parameters to perform encryption migration. Default value is None. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ChangeKeyVault :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -32549,7 +21871,7 @@ def begin_change_key_vault( self, resource_group_name: str, account_name: str, - body: Optional[Union[_models.ChangeKeyVault, JSON, IO[bytes]]] = None, + body: Optional[Union[_models.ChangeKeyVault, _types.ChangeKeyVault, IO[bytes]]] = None, **kwargs: Any ) -> LROPoller[None]: """Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. @@ -32560,9 +21882,10 @@ def begin_change_key_vault( :type resource_group_name: str :param account_name: The name of the NetApp account. Required. :type account_name: str - :param body: The required parameters to perform encryption migration. Is one of the following - types: ChangeKeyVault, JSON, IO[bytes] Default value is None. - :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or JSON or IO[bytes] + :param body: The required parameters to perform encryption migration. Is either a + ChangeKeyVault type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or ~azure.mgmt.netapp.types.ChangeKeyVault + or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -32615,142 +21938,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2026-04-15-preview", - params_added_on={ - "2026-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2026-04-15-preview"], - ) - def _refresh_ldap_bind_password_initial( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_accounts_refresh_ldap_bind_password_request( - resource_group_name=resource_group_name, - account_name=account_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2026-04-15-preview", - params_added_on={ - "2026-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"] - }, - api_versions_list=["2026-04-15-preview"], - ) - def begin_refresh_ldap_bind_password( - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param account_name: The name of the NetApp account. Required. - :type account_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_ldap_bind_password_initial( - resource_group_name=resource_group_name, - account_name=account_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - class BackupsUnderAccountOperations: """ @@ -32773,7 +21960,7 @@ def _migrate_backups_initial( self, resource_group_name: str, account_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -32876,7 +22063,7 @@ def begin_migrate_backups( self, resource_group_name: str, account_name: str, - body: JSON, + body: _types.BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -32890,7 +22077,7 @@ def begin_migrate_backups( :type account_name: str :param body: Migrate backups under an account payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupsMigrationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -32932,7 +22119,7 @@ def begin_migrate_backups( self, resource_group_name: str, account_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: """Migrate the backups under a NetApp account to backup vault. @@ -32943,8 +22130,9 @@ def begin_migrate_backups( :param account_name: The name of the NetApp account. Required. :type account_name: str :param body: Migrate backups under an account payload supplied in the body of the operation. Is - one of the following types: BackupsMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or JSON or IO[bytes] + either a BackupsMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or + ~azure.mgmt.netapp.types.BackupsMigrationRequest or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -33092,7 +22280,7 @@ def _create_or_update_initial( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPool, JSON, IO[bytes]], + body: Union[_models.CapacityPool, _types.CapacityPool, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -33201,7 +22389,7 @@ def begin_create_or_update( resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + body: _types.CapacityPool, *, content_type: str = "application/json", **kwargs: Any @@ -33216,7 +22404,7 @@ def begin_create_or_update( :param pool_name: The name of the capacity pool. Required. :type pool_name: str :param body: Capacity pool object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CapacityPool :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -33263,7 +22451,7 @@ def begin_create_or_update( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPool, JSON, IO[bytes]], + body: Union[_models.CapacityPool, _types.CapacityPool, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CapacityPool]: """Create or Update a capacity pool. @@ -33275,9 +22463,10 @@ def begin_create_or_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param body: Capacity pool object supplied in the body of the operation. Is one of the - following types: CapacityPool, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CapacityPool or JSON or IO[bytes] + :param body: Capacity pool object supplied in the body of the operation. Is either a + CapacityPool type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.CapacityPool or ~azure.mgmt.netapp.types.CapacityPool or + IO[bytes] :return: An instance of LROPoller that returns CapacityPool. The CapacityPool is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.CapacityPool] @@ -33341,7 +22530,7 @@ def _update_initial( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPoolPatch, JSON, IO[bytes]], + body: Union[_models.CapacityPoolPatch, _types.CapacityPoolPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -33450,7 +22639,7 @@ def begin_update( resource_group_name: str, account_name: str, pool_name: str, - body: JSON, + body: _types.CapacityPoolPatch, *, content_type: str = "application/json", **kwargs: Any @@ -33465,7 +22654,7 @@ def begin_update( :param pool_name: The name of the capacity pool. Required. :type pool_name: str :param body: Capacity pool object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.CapacityPoolPatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -33512,7 +22701,7 @@ def begin_update( resource_group_name: str, account_name: str, pool_name: str, - body: Union[_models.CapacityPoolPatch, JSON, IO[bytes]], + body: Union[_models.CapacityPoolPatch, _types.CapacityPoolPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CapacityPool]: """Patch the specified capacity pool. @@ -33524,9 +22713,10 @@ def begin_update( :type account_name: str :param pool_name: The name of the capacity pool. Required. :type pool_name: str - :param body: Capacity pool object supplied in the body of the operation. Is one of the - following types: CapacityPoolPatch, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch or JSON or IO[bytes] + :param body: Capacity pool object supplied in the body of the operation. Is either a + CapacityPoolPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch or + ~azure.mgmt.netapp.types.CapacityPoolPatch or IO[bytes] :return: An instance of LROPoller that returns CapacityPool. The CapacityPool is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.CapacityPool] @@ -33833,7 +23023,7 @@ def _restore_files_initial( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.BackupRestoreFiles, JSON, IO[bytes]], + body: Union[_models.BackupRestoreFiles, _types.BackupRestoreFiles, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -33945,7 +23135,7 @@ def begin_restore_files( account_name: str, backup_vault_name: str, backup_name: str, - body: JSON, + body: _types.BackupRestoreFiles, *, content_type: str = "application/json", **kwargs: Any @@ -33962,7 +23152,7 @@ def begin_restore_files( :param backup_name: The name of the backup. Required. :type backup_name: str :param body: Restore payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupRestoreFiles :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -34011,7 +23201,7 @@ def begin_restore_files( account_name: str, backup_vault_name: str, backup_name: str, - body: Union[_models.BackupRestoreFiles, JSON, IO[bytes]], + body: Union[_models.BackupRestoreFiles, _types.BackupRestoreFiles, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: """Restore the specified files from the specified backup to the active filesystem. @@ -34025,9 +23215,10 @@ def begin_restore_files( :type backup_vault_name: str :param backup_name: The name of the backup. Required. :type backup_name: str - :param body: Restore payload supplied in the body of the operation. Is one of the following - types: BackupRestoreFiles, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupRestoreFiles or JSON or IO[bytes] + :param body: Restore payload supplied in the body of the operation. Is either a + BackupRestoreFiles type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupRestoreFiles or + ~azure.mgmt.netapp.types.BackupRestoreFiles or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -34105,7 +23296,7 @@ def _migrate_backups_initial( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -34218,7 +23409,7 @@ def begin_migrate_backups( account_name: str, pool_name: str, volume_name: str, - body: JSON, + body: _types.BackupsMigrationRequest, *, content_type: str = "application/json", **kwargs: Any @@ -34236,7 +23427,7 @@ def begin_migrate_backups( :type volume_name: str :param body: Migrate backups under volume payload supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.BackupsMigrationRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -34286,7 +23477,7 @@ def begin_migrate_backups( account_name: str, pool_name: str, volume_name: str, - body: Union[_models.BackupsMigrationRequest, JSON, IO[bytes]], + body: Union[_models.BackupsMigrationRequest, _types.BackupsMigrationRequest, IO[bytes]], **kwargs: Any ) -> LROPoller[None]: """Migrate the backups under volume to backup vault. @@ -34300,9 +23491,10 @@ def begin_migrate_backups( :type pool_name: str :param volume_name: The name of the volume. Required. :type volume_name: str - :param body: Migrate backups under volume payload supplied in the body of the operation. Is one - of the following types: BackupsMigrationRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or JSON or IO[bytes] + :param body: Migrate backups under volume payload supplied in the body of the operation. Is + either a BackupsMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.BackupsMigrationRequest or + ~azure.mgmt.netapp.types.BackupsMigrationRequest or IO[bytes] :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -34468,7 +23660,7 @@ def _create_initial( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumeInfo, JSON, IO[bytes]], + body: Union[_models.SubvolumeInfo, _types.SubvolumeInfo, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -34593,7 +23785,7 @@ def begin_create( pool_name: str, volume_name: str, subvolume_name: str, - body: JSON, + body: _types.SubvolumeInfo, *, content_type: str = "application/json", **kwargs: Any @@ -34612,7 +23804,7 @@ def begin_create( :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str :param body: Subvolume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SubvolumeInfo :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -34667,7 +23859,7 @@ def begin_create( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumeInfo, JSON, IO[bytes]], + body: Union[_models.SubvolumeInfo, _types.SubvolumeInfo, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.SubvolumeInfo]: """Creates a subvolume in the path or clones the subvolume mentioned in the parentPath. @@ -34683,9 +23875,10 @@ def begin_create( :type volume_name: str :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str - :param body: Subvolume object supplied in the body of the operation. Is one of the following - types: SubvolumeInfo, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SubvolumeInfo or JSON or IO[bytes] + :param body: Subvolume object supplied in the body of the operation. Is either a SubvolumeInfo + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SubvolumeInfo or ~azure.mgmt.netapp.types.SubvolumeInfo + or IO[bytes] :return: An instance of LROPoller that returns SubvolumeInfo. The SubvolumeInfo is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SubvolumeInfo] @@ -34753,7 +23946,7 @@ def _update_initial( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumePatchRequest, JSON, IO[bytes]], + body: Union[_models.SubvolumePatchRequest, _types.SubvolumePatchRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -34874,7 +24067,7 @@ def begin_update( pool_name: str, volume_name: str, subvolume_name: str, - body: JSON, + body: _types.SubvolumePatchRequest, *, content_type: str = "application/json", **kwargs: Any @@ -34893,7 +24086,7 @@ def begin_update( :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str :param body: Subvolume object supplied in the body of the operation. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.SubvolumePatchRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -34948,7 +24141,7 @@ def begin_update( pool_name: str, volume_name: str, subvolume_name: str, - body: Union[_models.SubvolumePatchRequest, JSON, IO[bytes]], + body: Union[_models.SubvolumePatchRequest, _types.SubvolumePatchRequest, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.SubvolumeInfo]: """Patch a subvolume. @@ -34964,9 +24157,10 @@ def begin_update( :type volume_name: str :param subvolume_name: The name of the subvolume. Required. :type subvolume_name: str - :param body: Subvolume object supplied in the body of the operation. Is one of the following - types: SubvolumePatchRequest, JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.SubvolumePatchRequest or JSON or IO[bytes] + :param body: Subvolume object supplied in the body of the operation. Is either a + SubvolumePatchRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.SubvolumePatchRequest or + ~azure.mgmt.netapp.types.SubvolumePatchRequest or IO[bytes] :return: An instance of LROPoller that returns SubvolumeInfo. The SubvolumeInfo is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SubvolumeInfo] @@ -35485,7 +24679,12 @@ def check_name_availability( @overload def check_name_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.ResourceNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check resource name availability. @@ -35494,7 +24693,7 @@ def check_name_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.ResourceNameAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -35527,7 +24726,10 @@ def check_name_availability( @distributed_trace def check_name_availability( - self, location: str, body: Union[_models.ResourceNameAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.ResourceNameAvailabilityRequest, _types.ResourceNameAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check resource name availability. @@ -35535,9 +24737,10 @@ def check_name_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: ResourceNameAvailabilityRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.ResourceNameAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a ResourceNameAvailabilityRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.ResourceNameAvailabilityRequest or + ~azure.mgmt.netapp.types.ResourceNameAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -35637,7 +24840,12 @@ def check_file_path_availability( @overload def check_file_path_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.FilePathAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -35646,7 +24854,7 @@ def check_file_path_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.FilePathAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -35679,7 +24887,10 @@ def check_file_path_availability( @distributed_trace def check_file_path_availability( - self, location: str, body: Union[_models.FilePathAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.FilePathAvailabilityRequest, _types.FilePathAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -35687,9 +24898,10 @@ def check_file_path_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: FilePathAvailabilityRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.FilePathAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a FilePathAvailabilityRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.FilePathAvailabilityRequest or + ~azure.mgmt.netapp.types.FilePathAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -35789,7 +25001,12 @@ def check_quota_availability( @overload def check_quota_availability( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.QuotaAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check quota availability. @@ -35798,7 +25015,7 @@ def check_quota_availability( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.QuotaAvailabilityRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -35831,7 +25048,10 @@ def check_quota_availability( @distributed_trace def check_quota_availability( - self, location: str, body: Union[_models.QuotaAvailabilityRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.QuotaAvailabilityRequest, _types.QuotaAvailabilityRequest, IO[bytes]], + **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check quota availability. @@ -35839,9 +25059,10 @@ def check_quota_availability( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: QuotaAvailabilityRequest, JSON, - IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.QuotaAvailabilityRequest or JSON or IO[bytes] + :param body: The request body. Is either a QuotaAvailabilityRequest type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.netapp.models.QuotaAvailabilityRequest or + ~azure.mgmt.netapp.types.QuotaAvailabilityRequest or IO[bytes] :return: CheckAvailabilityResponse. The CheckAvailabilityResponse is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -36008,7 +25229,12 @@ def query_network_sibling_set( @overload def query_network_sibling_set( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.QueryNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.NetworkSiblingSet: """Describe a network sibling set. @@ -36017,7 +25243,7 @@ def query_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.QueryNetworkSiblingSetRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -36048,7 +25274,10 @@ def query_network_sibling_set( @distributed_trace def query_network_sibling_set( - self, location: str, body: Union[_models.QueryNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.QueryNetworkSiblingSetRequest, _types.QueryNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> _models.NetworkSiblingSet: """Describe a network sibling set. @@ -36056,9 +25285,10 @@ def query_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: QueryNetworkSiblingSetRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest or JSON or IO[bytes] + :param body: The request body. Is either a QueryNetworkSiblingSetRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.QueryNetworkSiblingSetRequest or + ~azure.mgmt.netapp.types.QueryNetworkSiblingSetRequest or IO[bytes] :return: NetworkSiblingSet. The NetworkSiblingSet is compatible with MutableMapping :rtype: ~azure.mgmt.netapp.models.NetworkSiblingSet :raises ~azure.core.exceptions.HttpResponseError: @@ -36130,7 +25360,10 @@ def query_network_sibling_set( return deserialized # type: ignore def _update_network_sibling_set_initial( - self, location: str, body: Union[_models.UpdateNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.UpdateNetworkSiblingSetRequest, _types.UpdateNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -36227,7 +25460,12 @@ def begin_update_network_sibling_set( @overload def begin_update_network_sibling_set( - self, location: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + location: str, + body: _types.UpdateNetworkSiblingSetRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> LROPoller[_models.NetworkSiblingSet]: """Update the network features of a network sibling set. @@ -36236,7 +25474,7 @@ def begin_update_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str :param body: The request body. Required. - :type body: JSON + :type body: ~azure.mgmt.netapp.types.UpdateNetworkSiblingSetRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -36269,7 +25507,10 @@ def begin_update_network_sibling_set( @distributed_trace def begin_update_network_sibling_set( - self, location: str, body: Union[_models.UpdateNetworkSiblingSetRequest, JSON, IO[bytes]], **kwargs: Any + self, + location: str, + body: Union[_models.UpdateNetworkSiblingSetRequest, _types.UpdateNetworkSiblingSetRequest, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkSiblingSet]: """Update the network features of a network sibling set. @@ -36277,9 +25518,10 @@ def begin_update_network_sibling_set( :param location: The name of the Azure region. Required. :type location: str - :param body: The request body. Is one of the following types: UpdateNetworkSiblingSetRequest, - JSON, IO[bytes] Required. - :type body: ~azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest or JSON or IO[bytes] + :param body: The request body. Is either a UpdateNetworkSiblingSetRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest or + ~azure.mgmt.netapp.types.UpdateNetworkSiblingSetRequest or IO[bytes] :return: An instance of LROPoller that returns NetworkSiblingSet. The NetworkSiblingSet is compatible with MutableMapping :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.NetworkSiblingSet] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/types.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/types.py new file mode 100644 index 000000000000..76d72e276625 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/types.py @@ -0,0 +1,3607 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING, Union +from typing_extensions import Required, TypedDict + +if TYPE_CHECKING: + from .models import ( + AcceptGrowCapacityPoolForShortTermCloneSplit, + ActiveDirectoryStatus, + ActualRansomwareProtectionState, + ApplicationType, + AvsDataStore, + BackupType, + BreakthroughMode, + BucketPatchPermissions, + BucketPermissions, + CacheFileAccessLogs, + CacheLifeCycleState, + CacheProvisioningState, + CheckNameResourceTypes, + CheckQuotaNameResourceTypes, + ChownMode, + CifsChangeNotifyState, + CoolAccessRetrievalPolicy, + CoolAccessTieringPolicy, + CreatedByType, + CredentialsStatus, + DesiredRansomwareProtectionState, + EnableSubvolumes, + EnableWriteBackState, + EncryptionKeySource, + EncryptionState, + EncryptionType, + EndpointType, + Exclude, + ExternalReplicationSetupStatus, + FileAccessLogs, + GlobalFileLockingState, + KerberosState, + KeySource, + KeyVaultStatus, + LdapServerType, + LdapState, + ManagedServiceIdentityType, + MirrorState, + MultiAdStatus, + NetAppProvisioningState, + NetworkFeatures, + OnCertificateConflictAction, + ProtocolTypes, + QosType, + QuotaType, + RansomwareSuspectResolution, + ReplicationSchedule, + ReplicationType, + SecurityStyle, + ServiceLevel, + SmbAccessBasedEnumeration, + SmbEncryptionState, + SmbNonBrowsable, + VolumeLanguage, + VolumeReplicationRelationshipStatus, + VolumeStorageToNetworkProximity, + ) + + +class AccountEncryption(TypedDict, total=False): + """Encryption settings. + + :ivar key_source: The encryption keySource (provider). Possible values (case-insensitive): + Microsoft.NetApp, Microsoft.KeyVault. Known values are: "Microsoft.NetApp" and + "Microsoft.KeyVault". + :vartype key_source: Union[str, "KeySource"] + :ivar key_vault_properties: Properties provided by KeVault. Applicable if keySource is + 'Microsoft.KeyVault'. + :vartype key_vault_properties: "KeyVaultProperties" + :ivar identity: Identity used to authenticate to KeyVault. Applicable if keySource is + 'Microsoft.KeyVault'. + :vartype identity: "EncryptionIdentity" + """ + + keySource: Union[str, "KeySource"] + """The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, + Microsoft.KeyVault. Known values are: \"Microsoft.NetApp\" and \"Microsoft.KeyVault\".""" + keyVaultProperties: "KeyVaultProperties" + """Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'.""" + identity: "EncryptionIdentity" + """Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'.""" + + +class AccountProperties(TypedDict, total=False): + """NetApp account properties. + + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar active_directories: Active Directories. + :vartype active_directories: list["ActiveDirectory"] + :ivar encryption: Encryption settings. + :vartype encryption: "AccountEncryption" + :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the + subscription, null equals false. + :vartype disable_showmount: bool + :ivar nfs_v4_id_domain: 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. + :vartype nfs_v4_id_domain: str + :ivar multi_ad_status: MultiAD Status for the account. Known values are: "Disabled" and + "Enabled". + :vartype multi_ad_status: Union[str, "MultiAdStatus"] + """ + + provisioningState: str + """Azure lifecycle management.""" + activeDirectories: list["ActiveDirectory"] + """Active Directories.""" + encryption: "AccountEncryption" + """Encryption settings.""" + disableShowmount: Optional[bool] + """Shows the status of disableShowmount for all volumes under the subscription, null equals false.""" + nfsV4IDDomain: Optional[str] + """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.""" + multiAdStatus: Union[str, "MultiAdStatus"] + """MultiAD Status for the account. Known values are: \"Disabled\" and \"Enabled\".""" + + +class ActiveDirectory(TypedDict, total=False): + """Active Directory. + + :ivar active_directory_id: Id of the Active Directory. + :vartype active_directory_id: str + :ivar username: A domain user account with permission to create machine accounts. + :vartype username: str + :ivar password: Plain text password of Active Directory domain administrator, value is masked + in the response. + :vartype password: str + :ivar domain: Name of the Active Directory domain. + :vartype domain: str + :ivar dns: Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory + domain. + :vartype dns: str + :ivar status: Status of the Active Directory. Known values are: "Created", "InUse", "Deleted", + "Error", and "Updating". + :vartype status: Union[str, "ActiveDirectoryStatus"] + :ivar status_details: Any details in regards to the Status of the Active Directory. + :vartype status_details: str + :ivar smb_server_name: NetBIOS name of the SMB server. This name will be registered as a + computer account in the AD and used to mount volumes. + :vartype smb_server_name: str + :ivar organizational_unit: The Organizational Unit (OU) within the Windows Active Directory. + :vartype organizational_unit: str + :ivar site: The Active Directory site the service will limit Domain Controller discovery to. + :vartype site: str + :ivar backup_operators: Users to be added to the Built-in Backup Operator active directory + group. A list of unique usernames without domain specifier. + :vartype backup_operators: list[str] + :ivar administrators: Users to be added to the Built-in Administrators active directory group. + A list of unique usernames without domain specifier. + :vartype administrators: list[str] + :ivar kdc_ip: kdc server IP address for the active directory machine. This optional parameter + is used only while creating kerberos volume. + :vartype kdc_ip: str + :ivar ad_name: Name of the active directory machine. This optional parameter is used only while + creating kerberos volume. + :vartype ad_name: str + :ivar server_root_ca_certificate: When LDAP over SSL/TLS is enabled, the LDAP client is + required to have base64 encoded Active Directory Certificate Service's self-signed root CA + certificate, this optional parameter is used only for dual protocol with LDAP user-mapping + volumes. + :vartype server_root_ca_certificate: str + :ivar aes_encryption: If enabled, AES encryption will be enabled for SMB communication. + :vartype aes_encryption: bool + :ivar ldap_signing: Specifies whether or not the LDAP traffic needs to be signed. + :vartype ldap_signing: bool + :ivar security_operators: Domain Users in the Active directory to be given SeSecurityPrivilege + privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames + without domain specifier. + :vartype security_operators: list[str] + :ivar ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. + :vartype ldap_over_tls: bool + :ivar allow_local_nfs_users_with_ldap: If enabled, NFS client local users can also (in addition + to LDAP users) access the NFS volumes. + :vartype allow_local_nfs_users_with_ldap: bool + :ivar encrypt_dc_connections: If enabled, Traffic between the SMB server to Domain Controller + (DC) will be encrypted. + :vartype encrypt_dc_connections: bool + :ivar ldap_search_scope: LDAP Search scope options. + :vartype ldap_search_scope: "LdapSearchScopeOpt" + :ivar preferred_servers_for_ldap_client: Comma separated list of IPv4 addresses of preferred + servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + :vartype preferred_servers_for_ldap_client: str + """ + + activeDirectoryId: Optional[str] + """Id of the Active Directory.""" + username: str + """A domain user account with permission to create machine accounts.""" + password: str + """Plain text password of Active Directory domain administrator, value is masked in the response.""" + domain: str + """Name of the Active Directory domain.""" + dns: str + """Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain.""" + status: Union[str, "ActiveDirectoryStatus"] + """Status of the Active Directory. Known values are: \"Created\", \"InUse\", \"Deleted\", + \"Error\", and \"Updating\".""" + statusDetails: str + """Any details in regards to the Status of the Active Directory.""" + smbServerName: str + """NetBIOS name of the SMB server. This name will be registered as a computer account in the AD + and used to mount volumes.""" + organizationalUnit: str + """The Organizational Unit (OU) within the Windows Active Directory.""" + site: str + """The Active Directory site the service will limit Domain Controller discovery to.""" + backupOperators: list[str] + """Users to be added to the Built-in Backup Operator active directory group. A list of unique + usernames without domain specifier.""" + administrators: list[str] + """Users to be added to the Built-in Administrators active directory group. A list of unique + usernames without domain specifier.""" + kdcIP: str + """kdc server IP address for the active directory machine. This optional parameter is used only + while creating kerberos volume.""" + adName: str + """Name of the active directory machine. This optional parameter is used only while creating + kerberos volume.""" + serverRootCACertificate: str + """When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active + Directory Certificate Service's self-signed root CA certificate, this optional parameter is + used only for dual protocol with LDAP user-mapping volumes.""" + aesEncryption: bool + """If enabled, AES encryption will be enabled for SMB communication.""" + ldapSigning: bool + """Specifies whether or not the LDAP traffic needs to be signed.""" + securityOperators: list[str] + """Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB + Continuously available shares for SQL). A list of unique usernames without domain specifier.""" + ldapOverTLS: bool + """Specifies whether or not the LDAP traffic needs to be secured via TLS.""" + allowLocalNfsUsersWithLdap: bool + """If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes.""" + encryptDCConnections: bool + """If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted.""" + ldapSearchScope: "LdapSearchScopeOpt" + """LDAP Search scope options.""" + preferredServersForLdapClient: str + """Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma + separated IPv4 addresses can be passed.""" + + +class AuthorizeRequest(TypedDict, total=False): + """Authorize request. + + :ivar remote_volume_resource_id: Resource id of the remote volume. + :vartype remote_volume_resource_id: str + """ + + remoteVolumeResourceId: str + """Resource id of the remote volume.""" + + +class AzureKeyVaultDetails(TypedDict, total=False): + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + + 2. These properties are mutually exclusive with the server.certificateObject property. + + :ivar certificate_akv_details: Specifies the Azure Key Vault settings for retrieving the bucket + server certificate. + :vartype certificate_akv_details: "CertificateAkvDetails" + :ivar credentials_akv_details: Specifies the Azure Key Vault settings for storing the bucket + credentials. + :vartype credentials_akv_details: "CredentialsAkvDetails" + """ + + certificateAkvDetails: "CertificateAkvDetails" + """Specifies the Azure Key Vault settings for retrieving the bucket server certificate.""" + credentialsAkvDetails: "CredentialsAkvDetails" + """Specifies the Azure Key Vault settings for storing the bucket credentials.""" + + +class Resource(TypedDict, total=False): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + """ + + id: str + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: str + """The name of the resource.""" + type: str + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + systemData: "SystemData" + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + """ + + +class Backup(ProxyResource): + """Backup under a Backup Vault. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Backup Properties. Required. + :vartype properties: "BackupProperties" + """ + + properties: Required["BackupProperties"] + """Backup Properties. Required.""" + + +class BackupPatch(TypedDict, total=False): + """Backup patch. + + :ivar properties: Backup Patch Properties. + :vartype properties: "BackupPatchProperties" + """ + + properties: "BackupPatchProperties" + """Backup Patch Properties.""" + + +class BackupPatchProperties(TypedDict, total=False): + """Backup patch properties. + + :ivar label: Label for backup. + :vartype label: str + """ + + label: str + """Label for backup.""" + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: dict[str, str] + """Resource tags.""" + location: Required[str] + """The geo-location where the resource lives. Required.""" + + +class BackupPolicy(TrackedResource): + """Backup policy information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Backup policy Properties. Required. + :vartype properties: "BackupPolicyProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + """ + + properties: Required["BackupPolicyProperties"] + """Backup policy Properties. Required.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + +class BackupPolicyPatch(TypedDict, total=False): + """Backup policy Details for create and update. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Backup policy Properties. + :vartype properties: "BackupPolicyProperties" + """ + + location: str + """Resource location.""" + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + properties: "BackupPolicyProperties" + """Backup policy Properties.""" + + +class BackupPolicyProperties(TypedDict, total=False): + """Backup policy properties. + + :ivar backup_policy_id: Backup Policy GUID ID. + :vartype backup_policy_id: str + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar daily_backups_to_keep: Daily backups count to keep. + :vartype daily_backups_to_keep: int + :ivar weekly_backups_to_keep: Weekly backups count to keep. + :vartype weekly_backups_to_keep: int + :ivar monthly_backups_to_keep: Monthly backups count to keep. + :vartype monthly_backups_to_keep: int + :ivar volumes_assigned: Volumes using current backup policy. + :vartype volumes_assigned: int + :ivar enabled: The property to decide policy is enabled or not. + :vartype enabled: bool + :ivar volume_backups: A list of volumes assigned to this policy. + :vartype volume_backups: list["VolumeBackups"] + """ + + backupPolicyId: str + """Backup Policy GUID ID.""" + provisioningState: str + """Azure lifecycle management.""" + dailyBackupsToKeep: int + """Daily backups count to keep.""" + weeklyBackupsToKeep: int + """Weekly backups count to keep.""" + monthlyBackupsToKeep: int + """Monthly backups count to keep.""" + volumesAssigned: int + """Volumes using current backup policy.""" + enabled: bool + """The property to decide policy is enabled or not.""" + volumeBackups: list["VolumeBackups"] + """A list of volumes assigned to this policy.""" + + +class BackupProperties(TypedDict, total=False): + """Backup properties. + + :ivar backup_id: UUID v4 used to identify the Backup. + :vartype backup_id: str + :ivar creation_date: The creation date of the backup. + :vartype creation_date: str + :ivar snapshot_creation_date: The snapshot creation date of the backup. + :vartype snapshot_creation_date: str + :ivar completion_date: The completion date of the backup. + :vartype completion_date: str + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar size: Size of backup in bytes. + :vartype size: int + :ivar label: Label for backup. + :vartype label: str + :ivar backup_type: Type of backup Manual or Scheduled. Known values are: "Manual" and + "Scheduled". + :vartype backup_type: Union[str, "BackupType"] + :ivar failure_reason: Failure reason. + :vartype failure_reason: str + :ivar volume_resource_id: ResourceId used to identify the Volume. Required. + :vartype volume_resource_id: str + :ivar use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :vartype use_existing_snapshot: bool + :ivar snapshot_name: The name of the snapshot. + :vartype snapshot_name: str + :ivar backup_policy_resource_id: ResourceId used to identify the backup policy. + :vartype backup_policy_resource_id: str + :ivar is_large_volume: Specifies if the backup is for a large volume. + :vartype is_large_volume: bool + """ + + backupId: str + """UUID v4 used to identify the Backup.""" + creationDate: str + """The creation date of the backup.""" + snapshotCreationDate: Optional[str] + """The snapshot creation date of the backup.""" + completionDate: Optional[str] + """The completion date of the backup.""" + provisioningState: str + """Azure lifecycle management.""" + size: int + """Size of backup in bytes.""" + label: str + """Label for backup.""" + backupType: Union[str, "BackupType"] + """Type of backup Manual or Scheduled. Known values are: \"Manual\" and \"Scheduled\".""" + failureReason: str + """Failure reason.""" + volumeResourceId: Required[str] + """ResourceId used to identify the Volume. Required.""" + useExistingSnapshot: bool + """Manual backup an already existing snapshot. This will always be false for scheduled backups and + true/false for manual backups.""" + snapshotName: str + """The name of the snapshot.""" + backupPolicyResourceId: str + """ResourceId used to identify the backup policy.""" + isLargeVolume: bool + """Specifies if the backup is for a large volume.""" + + +class BackupRestoreFiles(TypedDict, total=False): + """Restore payload for Single File Backup Restore. + + :ivar file_list: List of files to be restored. Required. + :vartype file_list: list[str] + :ivar restore_file_path: Destination folder where the files will be restored. The path name + should start with a forward slash. If it is omitted from request then restore is done at the + root folder of the destination volume by default. + :vartype restore_file_path: str + :ivar destination_volume_id: Resource Id of the destination volume on which the files need to + be restored. Required. + :vartype destination_volume_id: str + """ + + fileList: Required[list[str]] + """List of files to be restored. Required.""" + restoreFilePath: str + """Destination folder where the files will be restored. The path name should start with a forward + slash. If it is omitted from request then restore is done at the root folder of the destination + volume by default.""" + destinationVolumeId: Required[str] + """Resource Id of the destination volume on which the files need to be restored. Required.""" + + +class BackupsMigrationRequest(TypedDict, total=False): + """Migrate Backups Request. + + :ivar backup_vault_id: The ResourceId of the Backup Vault. Required. + :vartype backup_vault_id: str + """ + + backupVaultId: Required[str] + """The ResourceId of the Backup Vault. Required.""" + + +class BackupVault(TrackedResource): + """Backup Vault information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Backup Vault Properties. + :vartype properties: "BackupVaultProperties" + """ + + properties: "BackupVaultProperties" + """Backup Vault Properties.""" + + +class BackupVaultPatch(TypedDict, total=False): + """Backup Vault information. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + tags: dict[str, str] + """Resource tags.""" + + +class BackupVaultProperties(TypedDict, total=False): + """Backup Vault properties. + + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + """ + + provisioningState: str + """Azure lifecycle management.""" + + +class BreakFileLocksRequest(TypedDict, total=False): + """Break file locks request. + + :ivar client_ip: To clear file locks on a volume for a particular client. + :vartype client_ip: str + :ivar confirm_running_disruptive_operation: Break File locks could be a disruptive operation + for application as locks on the volume will be broken, if want to process, set to true. + :vartype confirm_running_disruptive_operation: bool + """ + + clientIp: str + """To clear file locks on a volume for a particular client.""" + confirmRunningDisruptiveOperation: bool + """Break File locks could be a disruptive operation for application as locks on the volume will be + broken, if want to process, set to true.""" + + +class BreakReplicationRequest(TypedDict, total=False): + """Break replication request. + + :ivar force_break_replication: If replication is in status transferring and you want to force + break the replication, set to true. + :vartype force_break_replication: bool + """ + + forceBreakReplication: bool + """If replication is in status transferring and you want to force break the replication, set to + true.""" + + +class Bucket(ProxyResource): + """Bucket resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Bucket properties. + :vartype properties: "BucketProperties" + """ + + properties: "BucketProperties" + """Bucket properties.""" + + +class BucketCredentialsExpiry(TypedDict, total=False): + """The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. + + :ivar key_pair_expiry_days: The number of days from now until the newly generated Access and + Secret key pair will expire. + :vartype key_pair_expiry_days: int + """ + + keyPairExpiryDays: int + """The number of days from now until the newly generated Access and Secret key pair will expire.""" + + +class BucketPatch(ProxyResource): + """Bucket resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Bucket properties. + :vartype properties: "BucketPatchProperties" + """ + + properties: "BucketPatchProperties" + """Bucket properties.""" + + +class BucketPatchProperties(TypedDict, total=False): + """Bucket resource properties for a Patch operation. + + :ivar file_system_user: 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. + :vartype file_system_user: "FileSystemUser" + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". + :vartype provisioning_state: Union[str, "NetAppProvisioningState"] + :ivar server: Properties of the server managing the lifecycle of volume buckets. + :vartype server: "BucketServerPatchProperties" + :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. Known + values are: "ReadOnly" and "ReadWrite". + :vartype permissions: Union[str, "BucketPatchPermissions"] + :ivar akv_details: Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property. + :vartype akv_details: "AzureKeyVaultDetails" + """ + + fileSystemUser: "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.""" + provisioningState: Union[str, "NetAppProvisioningState"] + """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", + \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" + server: "BucketServerPatchProperties" + """Properties of the server managing the lifecycle of volume buckets.""" + permissions: Union[str, "BucketPatchPermissions"] + """Access permissions for the bucket. Either ReadOnly or ReadWrite. Known values are: \"ReadOnly\" + and \"ReadWrite\".""" + akvDetails: "AzureKeyVaultDetails" + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property.""" + + +class BucketProperties(TypedDict, total=False): + """Bucket resource properties. + + :ivar path: The volume path mounted inside the bucket. The default is the root path '/' if no + value is provided when the bucket is created. + :vartype path: str + :ivar file_system_user: 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. + :vartype file_system_user: "FileSystemUser" + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". + :vartype provisioning_state: Union[str, "NetAppProvisioningState"] + :ivar status: 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. Known values are: + "NoCredentialsSet", "CredentialsExpired", and "Active". + :vartype status: Union[str, "CredentialsStatus"] + :ivar server: Properties of the server managing the lifecycle of volume buckets. + :vartype server: "BucketServerProperties" + :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default + is ReadOnly if no value is provided during bucket creation. Known values are: "ReadOnly" and + "ReadWrite". + :vartype permissions: Union[str, "BucketPermissions"] + :ivar akv_details: Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property. + :vartype akv_details: "AzureKeyVaultDetails" + """ + + path: str + """The volume path mounted inside the bucket. The default is the root path '/' if no value is + provided when the bucket is created.""" + fileSystemUser: "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.""" + provisioningState: Union[str, "NetAppProvisioningState"] + """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\", + \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\".""" + status: Union[str, "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. Known values are: + \"NoCredentialsSet\", \"CredentialsExpired\", and \"Active\".""" + server: "BucketServerProperties" + """Properties of the server managing the lifecycle of volume buckets.""" + permissions: Union[str, "BucketPermissions"] + """Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no + value is provided during bucket creation. Known values are: \"ReadOnly\" and \"ReadWrite\".""" + akvDetails: "AzureKeyVaultDetails" + """Specifies the Azure Key Vault settings. These are used when + a) retrieving the bucket server certificate, and + b) storing the bucket credentials + + Notes: + + + + 1. If a bucket certificate was previously provided directly using the certificateObject + property, it is possible to subsequently use the Azure Key Vault for certificate management by + using these 'akvDetails' properties. However, once Azure Key Vault is configured, it is no + longer possible to provide the certificate directly via the certificateObject property. + 2. These properties are mutually exclusive with the server.certificateObject property.""" + + +class BucketServerPatchProperties(TypedDict, total=False): + """Properties of the server managing the lifecycle of volume buckets. + + :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by + the server certificate. + :vartype fqdn: str + :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the + bucket server's certificate and private key. It is generated by the end user and allows the + user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault + is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' + properties. + :vartype certificate_object: str + :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. + Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". + :vartype on_certificate_conflict_action: Union[str, "OnCertificateConflictAction"] + """ + + fqdn: str + """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server + certificate.""" + certificateObject: str + """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate + and private key. It is generated by the end user and allows the user to access volume data in a + read-only manner. Note: This is only used when Azure Key Vault is not configured. This property + is mutually exclusive with the Azure Key Vault 'akv' properties.""" + onCertificateConflictAction: Union[str, "OnCertificateConflictAction"] + """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. + Known values are: \"Update\" and \"Fail\".""" + + +class BucketServerProperties(TypedDict, total=False): + """Properties of the server managing the lifecycle of volume buckets. + + :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by + the server certificate. + :vartype fqdn: str + :ivar certificate_common_name: Certificate Common Name taken from the certificate installed on + the bucket server. + :vartype certificate_common_name: str + :ivar certificate_expiry_date: The bucket server's certificate expiry date. + :vartype certificate_expiry_date: str + :ivar ip_address: The bucket server's IPv4 address. + :vartype ip_address: str + :ivar certificate_object: The base64-encoded contents of a PEM file, which includes both the + bucket server's certificate and private key. It is generated by the end user and allows the + user to access volume data in a read-only manner. Note: This is only used when Azure Key Vault + is not configured. This property is mutually exclusive with the Azure Key Vault 'akv' + properties. + :vartype certificate_object: str + :ivar on_certificate_conflict_action: Action to take when there is a certificate conflict. + Possible values include: 'Update', 'Fail'. Known values are: "Update" and "Fail". + :vartype on_certificate_conflict_action: Union[str, "OnCertificateConflictAction"] + """ + + fqdn: str + """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server + certificate.""" + certificateCommonName: str + """Certificate Common Name taken from the certificate installed on the bucket server.""" + certificateExpiryDate: str + """The bucket server's certificate expiry date.""" + ipAddress: str + """The bucket server's IPv4 address.""" + certificateObject: str + """The base64-encoded contents of a PEM file, which includes both the bucket server's certificate + and private key. It is generated by the end user and allows the user to access volume data in a + read-only manner. Note: This is only used when Azure Key Vault is not configured. This property + is mutually exclusive with the Azure Key Vault 'akv' properties.""" + onCertificateConflictAction: Union[str, "OnCertificateConflictAction"] + """Action to take when there is a certificate conflict. Possible values include: 'Update', 'Fail'. + Known values are: \"Update\" and \"Fail\".""" + + +class Cache(TrackedResource): + """Cache resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Cache properties. Required. + :vartype properties: "CacheProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + :ivar zones: The availability zones. + :vartype zones: list[str] + """ + + properties: Required["CacheProperties"] + """Cache properties. Required.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + zones: list[str] + """The availability zones.""" + + +class CacheMountTargetProperties(TypedDict, total=False): + """Contains all the information needed to mount a cache. + + :ivar mount_target_id: UUID v4 used to identify the MountTarget. + :vartype mount_target_id: str + :ivar ip_address: The mount target's IPv4 address, used to mount the cache. + :vartype ip_address: str + :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN. + :vartype smb_server_fqdn: str + """ + + mountTargetId: str + """UUID v4 used to identify the MountTarget.""" + ipAddress: str + """The mount target's IPv4 address, used to mount the cache.""" + smbServerFqdn: str + """The SMB server's Fully Qualified Domain Name, FQDN.""" + + +class CacheProperties(TypedDict, total=False): + """Cache resource properties. + + :ivar file_path: The file path of the Cache. Required. + :vartype file_path: str + :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the + range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. Required. + :vartype size: int + :ivar export_policy: Set of export policy rules. + :vartype export_policy: "CachePropertiesExportPolicy" + :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB + protocol. + :vartype protocol_types: list[Union[str, "ProtocolTypes"]] + :ivar provisioning_state: Azure lifecycle management. Known values are: "Creating", "Updating", + "Deleting", "Failed", "Succeeded", and "Canceled". + :vartype provisioning_state: Union[str, "CacheProvisioningState"] + :ivar cache_state: Azure NetApp Files Cache lifecycle management. Known values are: + "ClusterPeeringOfferSent", "VserverPeeringOfferSent", "Creating", "Succeeded", and "Failed". + :vartype cache_state: Union[str, "CacheLifeCycleState"] + :ivar cache_subnet_resource_id: The Azure Resource URI for a delegated cache subnet that will + be used to allocate data IPs. Required. + :vartype cache_subnet_resource_id: str + :ivar peering_subnet_resource_id: The Azure Resource URI for a delegated subnet that will be + used for ANF Intercluster Interface IP addresses. Required. + :vartype peering_subnet_resource_id: str + :ivar mount_targets: List of mount targets that can be used to mount this cache. + :vartype mount_targets: list["CacheMountTargetProperties"] + :ivar kerberos: Describe if a cache is Kerberos enabled. Known values are: "Disabled" and + "Enabled". + :vartype kerberos: Union[str, "KerberosState"] + :ivar smb_settings: SMB information for the cache. + :vartype smb_settings: "SmbSettings" + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume + and this will be accepted as input only for manual qosType cache. + :vartype throughput_mibps: float + :ivar actual_throughput_mibps: Actual throughput in MiB/s for auto qosType volumes calculated + based on size and serviceLevel. + :vartype actual_throughput_mibps: float + :ivar encryption_key_source: Source of key used to encrypt data in the cache. Applicable if + NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values + (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: + "Microsoft.NetApp" and "Microsoft.KeyVault". + :vartype encryption_key_source: Union[str, "EncryptionKeySource"] + :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. + It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = + 'Microsoft.KeyVault'. + :vartype key_vault_private_endpoint_resource_id: str + :ivar maximum_number_of_files: Maximum number of files allowed. + :vartype maximum_number_of_files: int + :ivar encryption: Specifies if the cache is encryption or not. Known values are: "Disabled" and + "Enabled". + :vartype encryption: Union[str, "EncryptionState"] + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: Union[str, "VolumeLanguage"] + :ivar ldap: Specifies whether LDAP is enabled or not for flexcache volume. Known values are: + "Disabled" and "Enabled". + :vartype ldap: Union[str, "LdapState"] + :ivar ldap_server_type: Specifies the type of LDAP server for flexcache volume. Known values + are: "ActiveDirectory" and "OpenLDAP". + :vartype ldap_server_type: Union[str, "LdapServerType"] + :ivar origin_cluster_information: Origin cluster information. Required. + :vartype origin_cluster_information: "OriginClusterInformation" + :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled + for the cache. Known values are: "Disabled" and "Enabled". + :vartype cifs_change_notifications: Union[str, "CifsChangeNotifyState"] + :ivar global_file_locking: Flag indicating whether the global file lock is enabled for the + cache. Known values are: "Disabled" and "Enabled". + :vartype global_file_locking: Union[str, "GlobalFileLockingState"] + :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: + "Disabled" and "Enabled". + :vartype write_back: Union[str, "EnableWriteBackState"] + :ivar file_access_logs: Flag indicating whether file access logs are enabled for the Cache, + based on active diagnostic settings present on the Cache. Known values are: "Enabled" and + "Disabled". + :vartype file_access_logs: Union[str, "CacheFileAccessLogs"] + """ + + filePath: Required[str] + """The file path of the Cache. Required.""" + size: Required[int] + """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB + to 1PiB. Values expressed in bytes as multiples of 1GiB. Required.""" + exportPolicy: "CachePropertiesExportPolicy" + """Set of export policy rules.""" + protocolTypes: list[Union[str, "ProtocolTypes"]] + """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" + provisioningState: Union[str, "CacheProvisioningState"] + """Azure lifecycle management. Known values are: \"Creating\", \"Updating\", \"Deleting\", + \"Failed\", \"Succeeded\", and \"Canceled\".""" + cacheState: Union[str, "CacheLifeCycleState"] + """Azure NetApp Files Cache lifecycle management. Known values are: \"ClusterPeeringOfferSent\", + \"VserverPeeringOfferSent\", \"Creating\", \"Succeeded\", and \"Failed\".""" + cacheSubnetResourceId: Required[str] + """The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + Required.""" + peeringSubnetResourceId: Required[str] + """The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface + IP addresses. Required.""" + mountTargets: list["CacheMountTargetProperties"] + """List of mount targets that can be used to mount this cache.""" + kerberos: Union[str, "KerberosState"] + """Describe if a cache is Kerberos enabled. Known values are: \"Disabled\" and \"Enabled\".""" + smbSettings: "SmbSettings" + """SMB information for the cache.""" + throughputMibps: float + """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted + as input only for manual qosType cache.""" + actualThroughputMibps: float + """Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel.""" + encryptionKeySource: Required[Union[str, "EncryptionKeySource"]] + """Source of key used to encrypt data in the cache. Applicable if NetApp account has + encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: \"Microsoft.NetApp\" and + \"Microsoft.KeyVault\".""" + keyVaultPrivateEndpointResourceId: str + """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the + volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" + maximumNumberOfFiles: int + """Maximum number of files allowed.""" + encryption: Union[str, "EncryptionState"] + """Specifies if the cache is encryption or not. Known values are: \"Disabled\" and \"Enabled\".""" + language: Union[str, "VolumeLanguage"] + """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\", + \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\", + \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\", + \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\", + \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\", + \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\", + \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\", + \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\", + \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\", + \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and + \"en-us.utf-8\".""" + ldap: Union[str, "LdapState"] + """Specifies whether LDAP is enabled or not for flexcache volume. Known values are: \"Disabled\" + and \"Enabled\".""" + ldapServerType: Union[str, "LdapServerType"] + """Specifies the type of LDAP server for flexcache volume. Known values are: \"ActiveDirectory\" + and \"OpenLDAP\".""" + originClusterInformation: Required["OriginClusterInformation"] + """Origin cluster information. Required.""" + cifsChangeNotifications: Union[str, "CifsChangeNotifyState"] + """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + globalFileLocking: Union[str, "GlobalFileLockingState"] + """Flag indicating whether the global file lock is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + writeBack: Union[str, "EnableWriteBackState"] + """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and + \"Enabled\".""" + fileAccessLogs: Union[str, "CacheFileAccessLogs"] + """Flag indicating whether file access logs are enabled for the Cache, based on active diagnostic + settings present on the Cache. Known values are: \"Enabled\" and \"Disabled\".""" + + +class CachePropertiesExportPolicy(TypedDict, total=False): + """Set of export policy rules. + + :ivar rules: Export policy rule. + :vartype rules: list["ExportPolicyRule"] + """ + + rules: list["ExportPolicyRule"] + """Export policy rule.""" + + +class CacheUpdate(TypedDict, total=False): + """The type used for update operations of the Cache. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: The resource-specific properties for this resource. + :vartype properties: "CacheUpdateProperties" + """ + + tags: dict[str, str] + """Resource tags.""" + properties: "CacheUpdateProperties" + """The resource-specific properties for this resource.""" + + +class CacheUpdateProperties(TypedDict, total=False): + """The updatable properties of the Cache. + + :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the + range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + :vartype size: int + :ivar export_policy: Set of export policy rules. + :vartype export_policy: "CachePropertiesExportPolicy" + :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB + protocol. + :vartype protocol_types: list[Union[str, "ProtocolTypes"]] + :ivar smb_settings: SMB information for the cache. + :vartype smb_settings: "SmbSettings" + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume + and this will be accepted as input only for manual qosType cache. + :vartype throughput_mibps: float + :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. + It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = + 'Microsoft.KeyVault'. + :vartype key_vault_private_endpoint_resource_id: str + :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled + for the cache. Known values are: "Disabled" and "Enabled". + :vartype cifs_change_notifications: Union[str, "CifsChangeNotifyState"] + :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are: + "Disabled" and "Enabled". + :vartype write_back: Union[str, "EnableWriteBackState"] + """ + + size: int + """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB + to 1PiB. Values expressed in bytes as multiples of 1GiB.""" + exportPolicy: "CachePropertiesExportPolicy" + """Set of export policy rules.""" + protocolTypes: list[Union[str, "ProtocolTypes"]] + """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol.""" + smbSettings: "SmbSettings" + """SMB information for the cache.""" + throughputMibps: float + """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted + as input only for manual qosType cache.""" + keyVaultPrivateEndpointResourceId: str + """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the + volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" + cifsChangeNotifications: Union[str, "CifsChangeNotifyState"] + """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are: + \"Disabled\" and \"Enabled\".""" + writeBack: Union[str, "EnableWriteBackState"] + """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and + \"Enabled\".""" + + +class CapacityPool(TrackedResource): + """Capacity pool resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Capacity pool properties. Required. + :vartype properties: "PoolProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + """ + + properties: Required["PoolProperties"] + """Capacity pool properties. Required.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + +class CapacityPoolPatch(TypedDict, total=False): + """Capacity pool patch resource. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Capacity pool properties. + :vartype properties: "PoolPatchProperties" + """ + + location: str + """Resource location.""" + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + properties: "PoolPatchProperties" + """Capacity pool properties.""" + + +class CertificateAkvDetails(TypedDict, total=False): + """Specifies the Azure Key Vault settings for retrieving the bucket server certificate. + + :ivar certificate_key_vault_uri: The base URI of the Azure Key Vault that is used when + retrieving the bucket certificate. + :vartype certificate_key_vault_uri: str + :ivar certificate_name: The name of the bucket server certificate stored in the Azure Key + Vault. + :vartype certificate_name: str + """ + + certificateKeyVaultUri: str + """The base URI of the Azure Key Vault that is used when retrieving the bucket certificate.""" + certificateName: str + """The name of the bucket server certificate stored in the Azure Key Vault.""" + + +class ChangeKeyVault(TypedDict, total=False): + """Change key vault request. + + :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption. + Required. + :vartype key_vault_uri: str + :ivar key_name: The name of the key that should be used for encryption. Required. + :vartype key_name: str + :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used + for encryption. + :vartype key_vault_resource_id: str + :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every + virtual network that has volumes encrypted with customer-managed keys needs its own key vault + private endpoint. Required. + :vartype key_vault_private_endpoints: list["KeyVaultPrivateEndpoint"] + """ + + keyVaultUri: Required[str] + """The URI of the key vault/managed HSM that should be used for encryption. Required.""" + keyName: Required[str] + """The name of the key that should be used for encryption. Required.""" + keyVaultResourceId: str + """Azure resource ID of the key vault/managed HSM that should be used for encryption.""" + keyVaultPrivateEndpoints: Required[list["KeyVaultPrivateEndpoint"]] + """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes + encrypted with customer-managed keys needs its own key vault private endpoint. Required.""" + + +class CifsUser(TypedDict, total=False): + """The effective CIFS username when accessing the volume data. + + :ivar username: The CIFS user's username. + :vartype username: str + """ + + username: str + """The CIFS user's username.""" + + +class CredentialsAkvDetails(TypedDict, total=False): + """Specifies the Azure Key Vault settings for storing the bucket credentials. + + :ivar credentials_key_vault_uri: The base URI of the Azure Key Vault that is used when storing + the bucket credentials. + :vartype credentials_key_vault_uri: str + :ivar secret_name: The name of the secret stored in Azure Key Vault. The associated key pair + has the following structure: + + { + "access_key_id": "", + "secret_access_key": "" + }. + :vartype secret_name: str + """ + + credentialsKeyVaultUri: str + """The base URI of the Azure Key Vault that is used when storing the bucket credentials.""" + secretName: str + """The name of the secret stored in Azure Key Vault. The associated key pair has the following + structure: + + { + \"access_key_id\": \"\", + \"secret_access_key\": \"\" + }.""" + + +class DailySchedule(TypedDict, total=False): + """Daily Schedule properties. + + :ivar snapshots_to_keep: Daily snapshot count to keep. + :vartype snapshots_to_keep: int + :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. + :vartype hour: int + :ivar minute: Indicates which minute snapshot should be taken. + :vartype minute: int + :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. + :vartype used_bytes: int + """ + + snapshotsToKeep: int + """Daily snapshot count to keep.""" + hour: int + """Indicates which hour in UTC timezone a snapshot should be taken.""" + minute: int + """Indicates which minute snapshot should be taken.""" + usedBytes: int + """Resource size in bytes, current storage usage for the volume in bytes.""" + + +class DestinationReplication(TypedDict, total=False): + """Destination replication properties. + + :ivar resource_id: The resource ID of the remote volume. + :vartype resource_id: str + :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known + values are: "CrossRegionReplication" and "CrossZoneReplication". + :vartype replication_type: Union[str, "ReplicationType"] + :ivar region: The remote region for the destination volume. + :vartype region: str + :ivar zone: The remote zone for the destination volume. + :vartype zone: str + """ + + resourceId: str + """The resource ID of the remote volume.""" + replicationType: Union[str, "ReplicationType"] + """Indicates whether the replication is cross zone or cross region. Known values are: + \"CrossRegionReplication\" and \"CrossZoneReplication\".""" + region: str + """The remote region for the destination volume.""" + zone: str + """The remote zone for the destination volume.""" + + +class EncryptionIdentity(TypedDict, total=False): + """Identity used to authenticate with key vault. + + :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key + vault. Read-only. + :vartype principal_id: str + :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to + authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match + key of identity.userAssignedIdentities. + :vartype user_assigned_identity: str + :ivar federated_client_id: ClientId of the multi-tenant Entra ID Application. Used to access + cross-tenant keyvaults. + :vartype federated_client_id: str + """ + + principalId: str + """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only.""" + userAssignedIdentity: str + """The ARM resource identifier of the user assigned identity used to authenticate with key vault. + Applicable if identity.type has 'UserAssigned'. It should match key of + identity.userAssignedIdentities.""" + federatedClientId: str + """ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults.""" + + +class EncryptionTransitionRequest(TypedDict, total=False): + """Encryption transition request. + + :ivar virtual_network_id: Identifier for the virtual network. Required. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :vartype private_endpoint_id: str + """ + + virtualNetworkId: Required[str] + """Identifier for the virtual network. Required.""" + privateEndpointId: Required[str] + """Identifier of the private endpoint to reach the Azure Key Vault. Required.""" + + +class ExportPolicyRule(TypedDict, total=False): + """Volume Export Policy Rule. + + :ivar rule_index: Order index. + :vartype rule_index: int + :ivar unix_read_only: Read only access. + :vartype unix_read_only: bool + :ivar unix_read_write: Read and write access. + :vartype unix_read_write: bool + :ivar kerberos5_read_only: Kerberos5 Read only access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_read_only: bool + :ivar kerberos5_read_write: Kerberos5 Read and write access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_read_write: bool + :ivar kerberos5_i_read_only: Kerberos5i Read only access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_i_read_only: bool + :ivar kerberos5_i_read_write: Kerberos5i Read and write access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_i_read_write: bool + :ivar kerberos5_p_read_only: Kerberos5p Read only access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_p_read_only: bool + :ivar kerberos5_p_read_write: Kerberos5p Read and write access. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos5_p_read_write: bool + :ivar cifs: Allows CIFS protocol. + :vartype cifs: bool + :ivar nfsv3: Allows NFSv3 protocol. Enable only for NFSv3 type volumes. + :vartype nfsv3: bool + :ivar nfsv41: Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes. + :vartype nfsv41: bool + :ivar allowed_clients: Client ingress specification as comma separated string with IPv4 CIDRs, + IPv4 host addresses and host names. + :vartype allowed_clients: str + :ivar has_root_access: Has root access to volume. + :vartype has_root_access: bool + :ivar chown_mode: This parameter specifies who is authorized to change the ownership of a file. + restricted - Only root user can change the ownership of the file. unrestricted - Non-root users + can change ownership of files that they own. Known values are: "Restricted" and "Unrestricted". + :vartype chown_mode: Union[str, "ChownMode"] + """ + + ruleIndex: int + """Order index.""" + unixReadOnly: bool + """Read only access.""" + unixReadWrite: bool + """Read and write access.""" + kerberos5ReadOnly: bool + """Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later.""" + kerberos5ReadWrite: bool + """Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later.""" + kerberos5iReadOnly: bool + """Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later.""" + kerberos5iReadWrite: bool + """Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later.""" + kerberos5pReadOnly: bool + """Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later.""" + kerberos5pReadWrite: bool + """Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later.""" + cifs: bool + """Allows CIFS protocol.""" + nfsv3: bool + """Allows NFSv3 protocol. Enable only for NFSv3 type volumes.""" + nfsv41: bool + """Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes.""" + allowedClients: str + """Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and + host names.""" + hasRootAccess: bool + """Has root access to volume.""" + chownMode: Union[str, "ChownMode"] + """This parameter specifies who is authorized to change the ownership of a file. restricted - Only + root user can change the ownership of the file. unrestricted - Non-root users can change + ownership of files that they own. Known values are: \"Restricted\" and \"Unrestricted\".""" + + +class FilePathAvailabilityRequest(TypedDict, total=False): + """File path availability request content - availability is based on the name and the subnetId. + + :ivar name: File path to verify. Required. + :vartype name: str + :ivar subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Required. + :vartype subnet_id: str + :ivar availability_zone: The Azure Resource logical availability zone which is used within zone + mapping lookup for the subscription and region. The lookup will retrieve the physical zone + where volume is placed. + :vartype availability_zone: str + """ + + name: Required[str] + """File path to verify. Required.""" + subnetId: Required[str] + """The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Required.""" + availabilityZone: Optional[str] + """The Azure Resource logical availability zone which is used within zone mapping lookup for the + subscription and region. The lookup will retrieve the physical zone where volume is placed.""" + + +class FileSystemUser(TypedDict, total=False): + """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. + + :ivar nfs_user: The effective NFS User ID and Group ID when accessing the volume data. + :vartype nfs_user: "NfsUser" + :ivar cifs_user: The effective CIFS username when accessing the volume data. + :vartype cifs_user: "CifsUser" + """ + + nfsUser: "NfsUser" + """The effective NFS User ID and Group ID when accessing the volume data.""" + cifsUser: "CifsUser" + """The effective CIFS username when accessing the volume data.""" + + +class GetGroupIdListForLDAPUserRequest(TypedDict, total=False): + """Get group Id list for LDAP User request. + + :ivar username: username is required to fetch the group to which user is part of. Required. + :vartype username: str + """ + + username: Required[str] + """username is required to fetch the group to which user is part of. Required.""" + + +class HourlySchedule(TypedDict, total=False): + """Hourly Schedule properties. + + :ivar snapshots_to_keep: Hourly snapshot count to keep. + :vartype snapshots_to_keep: int + :ivar minute: Indicates which minute snapshot should be taken. + :vartype minute: int + :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. + :vartype used_bytes: int + """ + + snapshotsToKeep: int + """Hourly snapshot count to keep.""" + minute: int + """Indicates which minute snapshot should be taken.""" + usedBytes: int + """Resource size in bytes, current storage usage for the volume in bytes.""" + + +class KeyVaultPrivateEndpoint(TypedDict, total=False): + """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes + encrypted with customer-managed keys needs its own key vault private endpoint. + + :ivar virtual_network_id: Identifier for the virtual network id. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + :vartype private_endpoint_id: str + """ + + virtualNetworkId: str + """Identifier for the virtual network id.""" + privateEndpointId: str + """Identifier of the private endpoint to reach the Azure Key Vault.""" + + +class KeyVaultProperties(TypedDict, total=False): + """Properties of key vault. + + :ivar key_vault_id: UUID v4 used to identify the Azure Key Vault configuration. + :vartype key_vault_id: str + :ivar key_vault_uri: The Uri of KeyVault. Required. + :vartype key_vault_uri: str + :ivar key_name: The name of KeyVault key. Required. + :vartype key_name: str + :ivar key_vault_resource_id: The resource ID of KeyVault. + :vartype key_vault_resource_id: str + :ivar status: Status of the KeyVault connection. Known values are: "Created", "InUse", + "Deleted", "Error", and "Updating". + :vartype status: Union[str, "KeyVaultStatus"] + """ + + keyVaultId: str + """UUID v4 used to identify the Azure Key Vault configuration.""" + keyVaultUri: Required[str] + """The Uri of KeyVault. Required.""" + keyName: Required[str] + """The name of KeyVault key. Required.""" + keyVaultResourceId: str + """The resource ID of KeyVault.""" + status: Union[str, "KeyVaultStatus"] + """Status of the KeyVault connection. Known values are: \"Created\", \"InUse\", \"Deleted\", + \"Error\", and \"Updating\".""" + + +class LdapSearchScopeOpt(TypedDict, total=False): + """LDAP search scope. + + :ivar user_dn: This specifies the user DN, which overrides the base DN for user lookups. + :vartype user_dn: str + :ivar group_dn: This specifies the group DN, which overrides the base DN for group lookups. + :vartype group_dn: str + :ivar group_membership_filter: This specifies the custom LDAP search filter to be used when + looking up group membership from LDAP server. + :vartype group_membership_filter: str + """ + + userDN: str + """This specifies the user DN, which overrides the base DN for user lookups.""" + groupDN: str + """This specifies the group DN, which overrides the base DN for group lookups.""" + groupMembershipFilter: str + """This specifies the custom LDAP search filter to be used when looking up group membership from + LDAP server.""" + + +class ListReplicationsRequest(TypedDict, total=False): + """Body for the list replications endpoint. If supplied, the body will be used as a filter for + example to exclude deleted replications. If omitted, the endpoint returns all replications. + + :ivar exclude: Exclude Replications filter. 'None' returns all replications, 'Deleted' excludes + deleted replications. Default is 'None'. Known values are: "None" and "Deleted". + :vartype exclude: Union[str, "Exclude"] + """ + + exclude: Union[str, "Exclude"] + """Exclude Replications filter. 'None' returns all replications, 'Deleted' excludes deleted + replications. Default is 'None'. Known values are: \"None\" and \"Deleted\".""" + + +class ManagedServiceIdentity(TypedDict, total=False): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: Union[str, "ManagedServiceIdentityType"] + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, "UserAssignedIdentity"] + """ + + principalId: str + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenantId: str + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Required[Union[str, "ManagedServiceIdentityType"]] + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + userAssignedIdentities: dict[str, "UserAssignedIdentity"] + """The identities assigned to this resource by the user.""" + + +class MonthlySchedule(TypedDict, total=False): + """Monthly Schedule properties. + + :ivar snapshots_to_keep: Monthly snapshot count to keep. + :vartype snapshots_to_keep: int + :ivar days_of_month: Indicates which days of the month snapshot should be taken. A comma + delimited string. + :vartype days_of_month: str + :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. + :vartype hour: int + :ivar minute: Indicates which minute snapshot should be taken. + :vartype minute: int + :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. + :vartype used_bytes: int + """ + + snapshotsToKeep: int + """Monthly snapshot count to keep.""" + daysOfMonth: str + """Indicates which days of the month snapshot should be taken. A comma delimited string.""" + hour: int + """Indicates which hour in UTC timezone a snapshot should be taken.""" + minute: int + """Indicates which minute snapshot should be taken.""" + usedBytes: int + """Resource size in bytes, current storage usage for the volume in bytes.""" + + +class MountTargetProperties(TypedDict, total=False): + """Mount target properties. + + :ivar mount_target_id: UUID v4 used to identify the MountTarget. + :vartype mount_target_id: str + :ivar file_system_id: UUID v4 used to identify the MountTarget. Required. + :vartype file_system_id: str + :ivar ip_address: The mount target's IPv4 address. + :vartype ip_address: str + :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN. + :vartype smb_server_fqdn: str + """ + + mountTargetId: str + """UUID v4 used to identify the MountTarget.""" + fileSystemId: Required[str] + """UUID v4 used to identify the MountTarget. Required.""" + ipAddress: str + """The mount target's IPv4 address.""" + smbServerFqdn: str + """The SMB server's Fully Qualified Domain Name, FQDN.""" + + +class NetAppAccount(TrackedResource): + """NetApp account resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: NetApp Account properties. + :vartype properties: "AccountProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: "ManagedServiceIdentity" + """ + + properties: "AccountProperties" + """NetApp Account properties.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + identity: "ManagedServiceIdentity" + """The managed service identities assigned to this resource.""" + + +class NetAppAccountPatch(TypedDict, total=False): + """NetApp account patch resource. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: NetApp Account properties. + :vartype properties: "AccountProperties" + :ivar identity: The identity used for the resource. + :vartype identity: "ManagedServiceIdentity" + """ + + location: str + """Resource location.""" + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + properties: "AccountProperties" + """NetApp Account properties.""" + identity: "ManagedServiceIdentity" + """The identity used for the resource.""" + + +class NfsUser(TypedDict, total=False): + """The effective NFS User ID and Group ID when accessing the volume data. + + :ivar user_id: The NFS user's UID. + :vartype user_id: int + :ivar group_id: The NFS user's GID. + :vartype group_id: int + """ + + userId: int + """The NFS user's UID.""" + groupId: int + """The NFS user's GID.""" + + +class OriginClusterInformation(TypedDict, total=False): + """Stores the origin cluster information associated to a cache. + + :ivar peer_cluster_name: ONTAP cluster name of external cluster hosting the origin volume. Must + match the exact cluster name. Required. + :vartype peer_cluster_name: str + :ivar peer_addresses: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is + required. Required. + :vartype peer_addresses: list[str] + :ivar peer_vserver_name: External Vserver (SVM) name name of the SVM hosting the origin + volume. Required. + :vartype peer_vserver_name: str + :ivar peer_volume_name: External origin volume name associated to this cache. Required. + :vartype peer_volume_name: str + """ + + peerClusterName: Required[str] + """ONTAP cluster name of external cluster hosting the origin volume. Must match the exact cluster + name. Required.""" + peerAddresses: Required[list[str]] + """ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. Required.""" + peerVserverName: Required[str] + """External Vserver (SVM) name name of the SVM hosting the origin volume. Required.""" + peerVolumeName: Required[str] + """External origin volume name associated to this cache. Required.""" + + +class PeerClusterForVolumeMigrationRequest(TypedDict, total=False): + """Source Cluster properties for a cluster peer request. + + :ivar peer_ip_addresses: A list of IC-LIF IPs that can be used to connect to the On-prem + cluster. Required. + :vartype peer_ip_addresses: list[str] + """ + + peerIpAddresses: Required[list[str]] + """A list of IC-LIF IPs that can be used to connect to the On-prem cluster. Required.""" + + +class PlacementKeyValuePairs(TypedDict, total=False): + """Application specific parameters for the placement of volumes in the volume group. + + :ivar key: Key for an application specific parameter for the placement of volumes in the volume + group. Required. + :vartype key: str + :ivar value: Value for an application specific parameter for the placement of volumes in the + volume group. Required. + :vartype value: str + """ + + key: Required[str] + """Key for an application specific parameter for the placement of volumes in the volume group. + Required.""" + value: Required[str] + """Value for an application specific parameter for the placement of volumes in the volume group. + Required.""" + + +class PoolChangeRequest(TypedDict, total=False): + """Pool change request. + + :ivar new_pool_resource_id: Resource id of the pool to move volume to. Required. + :vartype new_pool_resource_id: str + """ + + newPoolResourceId: Required[str] + """Resource id of the pool to move volume to. Required.""" + + +class PoolPatchProperties(TypedDict, total=False): + """Patchable pool properties. + + :ivar size: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value + must be multiple of 1099511627776). + :vartype size: int + :ivar qos_type: The qos type of the pool. Known values are: "Auto" and "Manual". + :vartype qos_type: Union[str, "QosType"] + :ivar cool_access: If enabled (true) the pool can contain cool Access enabled volumes. + :vartype cool_access: bool + :ivar custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :vartype custom_throughput_mibps: int + """ + + size: int + """Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + multiple of 1099511627776).""" + qosType: Union[str, "QosType"] + """The qos type of the pool. Known values are: \"Auto\" and \"Manual\".""" + coolAccess: bool + """If enabled (true) the pool can contain cool Access enabled volumes.""" + customThroughputMibps: Optional[int] + """Maximum throughput in MiB/s that can be achieved by this pool and this will be accepted as + input only for manual qosType pool with Flexible service level.""" + + +class PoolProperties(TypedDict, total=False): + """Pool properties. + + :ivar pool_id: UUID v4 used to identify the Pool. + :vartype pool_id: str + :ivar size: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value + must be multiple of 1099511627776). Required. + :vartype size: int + :ivar service_level: The service level of the file system. Required. Known values are: + "Standard", "Premium", "Ultra", "StandardZRS", and "Flexible". + :vartype service_level: Union[str, "ServiceLevel"] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar total_throughput_mibps: Total throughput of pool in MiB/s. + :vartype total_throughput_mibps: float + :ivar utilized_throughput_mibps: Utilized throughput of pool in MiB/s. + :vartype utilized_throughput_mibps: float + :ivar custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :vartype custom_throughput_mibps: int + :ivar qos_type: The qos type of the pool. Known values are: "Auto" and "Manual". + :vartype qos_type: Union[str, "QosType"] + :ivar cool_access: If enabled (true) the pool can contain cool Access enabled volumes. + :vartype cool_access: bool + :ivar encryption_type: Encryption type of the capacity pool, set encryption type for data at + rest for this pool and all volumes in it. This value can only be set when creating new pool. + Known values are: "Single" and "Double". + :vartype encryption_type: Union[str, "EncryptionType"] + """ + + poolId: str + """UUID v4 used to identify the Pool.""" + size: Required[int] + """Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + multiple of 1099511627776). Required.""" + serviceLevel: Required[Union[str, "ServiceLevel"]] + """The service level of the file system. Required. Known values are: \"Standard\", \"Premium\", + \"Ultra\", \"StandardZRS\", and \"Flexible\".""" + provisioningState: str + """Azure lifecycle management.""" + totalThroughputMibps: float + """Total throughput of pool in MiB/s.""" + utilizedThroughputMibps: float + """Utilized throughput of pool in MiB/s.""" + customThroughputMibps: Optional[int] + """Maximum throughput in MiB/s that can be achieved by this pool and this will be accepted as + input only for manual qosType pool with Flexible service level.""" + qosType: Union[str, "QosType"] + """The qos type of the pool. Known values are: \"Auto\" and \"Manual\".""" + coolAccess: bool + """If enabled (true) the pool can contain cool Access enabled volumes.""" + encryptionType: Optional[Union[str, "EncryptionType"]] + """Encryption type of the capacity pool, set encryption type for data at rest for this pool and + all volumes in it. This value can only be set when creating new pool. Known values are: + \"Single\" and \"Double\".""" + + +class QueryNetworkSiblingSetRequest(TypedDict, total=False): + """Network sibling set query. + + :ivar network_sibling_set_id: Network Sibling Set ID for a group of volumes sharing networking + resources in a subnet. Required. + :vartype network_sibling_set_id: str + :ivar subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Example + /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + Required. + :vartype subnet_id: str + """ + + networkSiblingSetId: Required[str] + """Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + Required.""" + subnetId: Required[str] + """The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Example + /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + Required.""" + + +class QuotaAvailabilityRequest(TypedDict, total=False): + """Quota availability request content. + + :ivar name: Name of the resource to verify. Required. + :vartype name: str + :ivar type: Resource type used for verification. Required. Known values are: + "Microsoft.NetApp/netAppAccounts", "Microsoft.NetApp/netAppAccounts/capacityPools", + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots", + "Microsoft.NetApp/netAppAccounts/backupVaults/backups", and + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups". + :vartype type: Union[str, "CheckQuotaNameResourceTypes"] + :ivar resource_group: Resource group name. Required. + :vartype resource_group: str + """ + + name: Required[str] + """Name of the resource to verify. Required.""" + type: Required[Union[str, "CheckQuotaNameResourceTypes"]] + """Resource type used for verification. Required. Known values are: + \"Microsoft.NetApp/netAppAccounts\", \"Microsoft.NetApp/netAppAccounts/capacityPools\", + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\", + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\", + \"Microsoft.NetApp/netAppAccounts/backupVaults/backups\", and + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\".""" + resourceGroup: Required[str] + """Resource group name. Required.""" + + +class QuotaReportFilterRequest(TypedDict, total=False): + """Quota report filters. When filtering by quotaType or quotaTarget, both properties must be + supplied together. This constraint is enforced by the service/API at runtime, and requests + violating this rule will return a validation error. The usageThresholdPercentage filter is + independent and can be used alone or in combination with quotaType and quotaTarget to further + refine results. + + :ivar quota_type: Type of quota. If provided, quotaTarget must also be specified. The quotaType + and quotaTarget properties are optional, but when filtering by quota type, quotaType and + quotaTarget must be supplied together. Service/API will return an error if only one is + provided. Known values are: "DefaultUserQuota", "DefaultGroupQuota", "IndividualUserQuota", and + "IndividualGroupQuota". + :vartype quota_type: Union[str, "QuotaType"] + :ivar quota_target: 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 . If provided, quotaType must also be + specified. The quotaType and quotaTarget properties are optional, but when filtering by quota + target, quotaType and quotaTarget must be supplied together. Service/API will return an error + if only one is provided. + :vartype quota_target: str + :ivar usage_threshold_percentage: The usageThresholdPercentage filter takes the usage threshold + percentage and returns records where the usage is greater than or equal to the input value. + This is an optional property. + :vartype usage_threshold_percentage: int + """ + + quotaType: Union[str, "QuotaType"] + """Type of quota. If provided, quotaTarget must also be specified. The quotaType and quotaTarget + properties are optional, but when filtering by quota type, quotaType and quotaTarget must be + supplied together. Service/API will return an error if only one is provided. Known values are: + \"DefaultUserQuota\", \"DefaultGroupQuota\", \"IndividualUserQuota\", and + \"IndividualGroupQuota\".""" + quotaTarget: str + """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 . If provided, quotaType must also be specified. The + quotaType and quotaTarget properties are optional, but when filtering by quota target, + quotaType and quotaTarget must be supplied together. Service/API will return an error if only + one is provided.""" + usageThresholdPercentage: int + """The usageThresholdPercentage filter takes the usage threshold percentage and returns records + where the usage is greater than or equal to the input value. This is an optional property.""" + + +class RansomwareProtectionPatchSettings(TypedDict, total=False): + """Advanced Ransomware Protection reports (ARP) updatable settings. + + :ivar desired_ransomware_protection_state: The desired value of the ARP feature state available + to the volume. Known values are: "Disabled" and "Enabled". + :vartype desired_ransomware_protection_state: Union[str, "DesiredRansomwareProtectionState"] + """ + + desiredRansomwareProtectionState: Union[str, "DesiredRansomwareProtectionState"] + """The desired value of the ARP feature state available to the volume. Known values are: + \"Disabled\" and \"Enabled\".""" + + +class RansomwareProtectionSettings(TypedDict, total=False): + """Advanced Ransomware Protection reports (ARP) settings. + + :ivar desired_ransomware_protection_state: The desired value of the Advanced Ransomware + Protection feature state available to the volume. Known values are: "Disabled" and "Enabled". + :vartype desired_ransomware_protection_state: Union[str, "DesiredRansomwareProtectionState"] + :ivar actual_ransomware_protection_state: The actual state of the Advanced Ransomware + Protection feature currently active on the volume. Known values are: "Disabled", "Enabled", + "Learning", and "Paused". + :vartype actual_ransomware_protection_state: Union[str, "ActualRansomwareProtectionState"] + """ + + desiredRansomwareProtectionState: Union[str, "DesiredRansomwareProtectionState"] + """The desired value of the Advanced Ransomware Protection feature state available to the volume. + Known values are: \"Disabled\" and \"Enabled\".""" + actualRansomwareProtectionState: Union[str, "ActualRansomwareProtectionState"] + """The actual state of the Advanced Ransomware Protection feature currently active on the volume. + Known values are: \"Disabled\", \"Enabled\", \"Learning\", and \"Paused\".""" + + +class RansomwareSuspectsClearRequest(TypedDict, total=False): + """Clear suspects for Advanced Ransomware Protection (ARP) report. + + :ivar resolution: ARP report suspect resolution. Required. Known values are: "PotentialThreat" + and "FalsePositive". + :vartype resolution: Union[str, "RansomwareSuspectResolution"] + :ivar extensions: List of file extensions resolved (PotentialThreat or FalsePositive). + Required. + :vartype extensions: list[str] + """ + + resolution: Required[Union[str, "RansomwareSuspectResolution"]] + """ARP report suspect resolution. Required. Known values are: \"PotentialThreat\" and + \"FalsePositive\".""" + extensions: Required[list[str]] + """List of file extensions resolved (PotentialThreat or FalsePositive). Required.""" + + +class ReestablishReplicationRequest(TypedDict, total=False): + """Re-establish request object supplied in the body of the operation. + + :ivar source_volume_id: Resource id of the source volume for the replication. + :vartype source_volume_id: str + """ + + sourceVolumeId: str + """Resource id of the source volume for the replication.""" + + +class RelocateVolumeRequest(TypedDict, total=False): + """Relocate volume request. + + :ivar creation_token: New creation token for the volume that controls the mount point name. + :vartype creation_token: str + """ + + creationToken: str + """New creation token for the volume that controls the mount point name.""" + + +class RemotePath(TypedDict, total=False): + """The full path to a volume that is to be migrated into ANF. Required for Migration volumes. + + :ivar external_host_name: The Path to a ONTAP Host. Required. + :vartype external_host_name: str + :ivar server_name: The name of a server on the ONTAP Host. Required. + :vartype server_name: str + :ivar volume_name: The name of a volume on the server. Required. + :vartype volume_name: str + """ + + externalHostName: Required[str] + """The Path to a ONTAP Host. Required.""" + serverName: Required[str] + """The name of a server on the ONTAP Host. Required.""" + volumeName: Required[str] + """The name of a volume on the server. Required.""" + + +class ReplicationObject(TypedDict, total=False): + """Replication properties. + + :ivar replication_id: Id. + :vartype replication_id: str + :ivar endpoint_type: Indicates whether the local volume is the source or destination for the + Volume Replication. Known values are: "src" and "dst". + :vartype endpoint_type: Union[str, "EndpointType"] + :ivar replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily". + :vartype replication_schedule: Union[str, "ReplicationSchedule"] + :ivar remote_volume_resource_id: The resource ID of the remote volume. Required for cross + region and cross zone replication. + :vartype remote_volume_resource_id: str + :ivar remote_path: The full path to a volume that is to be migrated into ANF. Required for + Migration volumes. + :vartype remote_path: "RemotePath" + :ivar remote_volume_region: The remote region for the other end of the Volume Replication. + :vartype remote_volume_region: str + :ivar destination_replications: A list of destination replications. + :vartype destination_replications: list["DestinationReplication"] + :ivar external_replication_setup_status: Property that only applies to external replications. + Provides a machine-readable value for the status of the external replication setup. Known + values are: "ClusterPeerRequired", "ClusterPeerPending", "VServerPeerRequired", + "ReplicationCreateRequired", and "NoActionRequired". + :vartype external_replication_setup_status: Union[str, "ExternalReplicationSetupStatus"] + :ivar external_replication_setup_info: Contains human-readable instructions on what the next + step is to finish the external replication setup. + :vartype external_replication_setup_info: str + :ivar mirror_state: 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. Known values are: + "Uninitialized", "Mirrored", and "Broken". + :vartype mirror_state: Union[str, "MirrorState"] + :ivar relationship_status: The status of the Volume Replication. Known values are: "Idle" and + "Transferring". + :vartype relationship_status: Union[str, "VolumeReplicationRelationshipStatus"] + """ + + replicationId: str + """Id.""" + endpointType: Union[str, "EndpointType"] + """Indicates whether the local volume is the source or destination for the Volume Replication. + Known values are: \"src\" and \"dst\".""" + replicationSchedule: Union[str, "ReplicationSchedule"] + """Schedule. Known values are: \"_10minutely\", \"hourly\", and \"daily\".""" + remoteVolumeResourceId: str + """The resource ID of the remote volume. Required for cross region and cross zone replication.""" + remotePath: "RemotePath" + """The full path to a volume that is to be migrated into ANF. Required for Migration volumes.""" + remoteVolumeRegion: str + """The remote region for the other end of the Volume Replication.""" + destinationReplications: list["DestinationReplication"] + """A list of destination replications.""" + externalReplicationSetupStatus: Union[str, "ExternalReplicationSetupStatus"] + """Property that only applies to external replications. Provides a machine-readable value for the + status of the external replication setup. Known values are: \"ClusterPeerRequired\", + \"ClusterPeerPending\", \"VServerPeerRequired\", \"ReplicationCreateRequired\", and + \"NoActionRequired\".""" + externalReplicationSetupInfo: str + """Contains human-readable instructions on what the next step is to finish the external + replication setup.""" + mirrorState: Union[str, "MirrorState"] + """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. Known values are: + \"Uninitialized\", \"Mirrored\", and \"Broken\".""" + relationshipStatus: Union[str, "VolumeReplicationRelationshipStatus"] + """The status of the Volume Replication. Known values are: \"Idle\" and \"Transferring\".""" + + +class ResourceNameAvailabilityRequest(TypedDict, total=False): + """Resource name availability request content. + + :ivar name: Resource name to verify. Required. + :vartype name: str + :ivar type: Resource type used for verification. Required. Known values are: + "Microsoft.NetApp/netAppAccounts", "Microsoft.NetApp/netAppAccounts/capacityPools", + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots", + "Microsoft.NetApp/netAppAccounts/backupVaults/backups", and + "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups". + :vartype type: Union[str, "CheckNameResourceTypes"] + :ivar resource_group: Resource group name. Required. + :vartype resource_group: str + """ + + name: Required[str] + """Resource name to verify. Required.""" + type: Required[Union[str, "CheckNameResourceTypes"]] + """Resource type used for verification. Required. Known values are: + \"Microsoft.NetApp/netAppAccounts\", \"Microsoft.NetApp/netAppAccounts/capacityPools\", + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\", + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\", + \"Microsoft.NetApp/netAppAccounts/backupVaults/backups\", and + \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\".""" + resourceGroup: Required[str] + """Resource group name. Required.""" + + +class SmbSettings(TypedDict, total=False): + """SMB settings for the cache. + + :ivar smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol cache. Known values are: "Disabled" and "Enabled". + :vartype smb_encryption: Union[str, "SmbEncryptionState"] + :ivar smb_access_based_enumeration: Enables access-based enumeration share property for SMB + Shares. Only applicable for SMB/DualProtocol volume. Known values are: "Disabled" and + "Enabled". + :vartype smb_access_based_enumeration: Union[str, "SmbAccessBasedEnumeration"] + :ivar smb_non_browsable: Enables non-browsable property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: "Disabled" and "Enabled". + :vartype smb_non_browsable: Union[str, "SmbNonBrowsable"] + """ + + smbEncryption: Union[str, "SmbEncryptionState"] + """Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. Known + values are: \"Disabled\" and \"Enabled\".""" + smbAccessBasedEnumeration: Union[str, "SmbAccessBasedEnumeration"] + """Enables access-based enumeration share property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: \"Disabled\" and \"Enabled\".""" + smbNonBrowsable: Union[str, "SmbNonBrowsable"] + """Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + Known values are: \"Disabled\" and \"Enabled\".""" + + +class Snapshot(ProxyResource): + """Snapshot of a Volume. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Snapshot Properties. + :vartype properties: "SnapshotProperties" + :ivar location: Resource location. Required. + :vartype location: str + """ + + properties: "SnapshotProperties" + """Snapshot Properties.""" + location: Required[str] + """Resource location. Required.""" + + +class SnapshotPatch(TypedDict, total=False): + """Snapshot of a Volume.""" + + +class SnapshotPolicy(TrackedResource): + """Snapshot policy information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Snapshot policy Properties. Required. + :vartype properties: "SnapshotPolicyProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + """ + + properties: Required["SnapshotPolicyProperties"] + """Snapshot policy Properties. Required.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + +class SnapshotPolicyPatch(TypedDict, total=False): + """Snapshot policy Details for create and update. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Snapshot Policy properties. + :vartype properties: "SnapshotPolicyProperties" + """ + + location: str + """Resource location.""" + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + properties: "SnapshotPolicyProperties" + """Snapshot Policy properties.""" + + +class SnapshotPolicyProperties(TypedDict, total=False): + """Snapshot policy properties. + + :ivar hourly_schedule: Schedule for hourly snapshots. + :vartype hourly_schedule: "HourlySchedule" + :ivar daily_schedule: Schedule for daily snapshots. + :vartype daily_schedule: "DailySchedule" + :ivar weekly_schedule: Schedule for weekly snapshots. + :vartype weekly_schedule: "WeeklySchedule" + :ivar monthly_schedule: Schedule for monthly snapshots. + :vartype monthly_schedule: "MonthlySchedule" + :ivar enabled: The property to decide policy is enabled or not. + :vartype enabled: bool + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + """ + + hourlySchedule: "HourlySchedule" + """Schedule for hourly snapshots.""" + dailySchedule: "DailySchedule" + """Schedule for daily snapshots.""" + weeklySchedule: "WeeklySchedule" + """Schedule for weekly snapshots.""" + monthlySchedule: "MonthlySchedule" + """Schedule for monthly snapshots.""" + enabled: bool + """The property to decide policy is enabled or not.""" + provisioningState: str + """Azure lifecycle management.""" + + +class SnapshotProperties(TypedDict, total=False): + """Snapshot properties. + + :ivar snapshot_id: UUID v4 used to identify the Snapshot. + :vartype snapshot_id: str + :ivar created: The creation date of the snapshot. + :vartype created: str + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + """ + + snapshotId: str + """UUID v4 used to identify the Snapshot.""" + created: str + """The creation date of the snapshot.""" + provisioningState: str + """Azure lifecycle management.""" + + +class SnapshotRestoreFiles(TypedDict, total=False): + """Restore payload for Single File Snapshot Restore. + + :ivar file_paths: List of files to be restored. Required. + :vartype file_paths: list[str] + :ivar destination_path: Destination folder where the files will be restored. + :vartype destination_path: str + """ + + filePaths: Required[list[str]] + """List of files to be restored. Required.""" + destinationPath: str + """Destination folder where the files will be restored.""" + + +class SubvolumeInfo(ProxyResource): + """Subvolume Information properties Deprecated. This resource type will be removed in a future API + version. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Subvolume Properties. + :vartype properties: "SubvolumeProperties" + """ + + properties: "SubvolumeProperties" + """Subvolume Properties.""" + + +class SubvolumePatchParams(TypedDict, total=False): + """Parameters with which a subvolume can be updated. + + :ivar size: Truncate subvolume to the provided size in bytes. + :vartype size: int + :ivar path: path to the subvolume. + :vartype path: str + """ + + size: Optional[int] + """Truncate subvolume to the provided size in bytes.""" + path: str + """path to the subvolume.""" + + +class SubvolumePatchRequest(TypedDict, total=False): + """Subvolume Patch Request properties. + + :ivar properties: Subvolume Properties. + :vartype properties: "SubvolumePatchParams" + """ + + properties: "SubvolumePatchParams" + """Subvolume Properties.""" + + +class SubvolumeProperties(TypedDict, total=False): + """This represents path associated with the subvolume. + + :ivar path: Path to the subvolume. + :vartype path: str + :ivar size: Truncate subvolume to the provided size in bytes. + :vartype size: int + :ivar parent_path: parent path to the subvolume. + :vartype parent_path: str + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + """ + + path: str + """Path to the subvolume.""" + size: Optional[int] + """Truncate subvolume to the provided size in bytes.""" + parentPath: Optional[str] + """parent path to the subvolume.""" + provisioningState: str + """Azure lifecycle management.""" + + +class SystemData(TypedDict, total=False): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: Union[str, "CreatedByType"] + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: str + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: Union[str, "CreatedByType"] + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: str + """ + + createdBy: str + """The identity that created the resource.""" + createdByType: Union[str, "CreatedByType"] + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + createdAt: str + """The timestamp of resource creation (UTC).""" + lastModifiedBy: str + """The identity that last modified the resource.""" + lastModifiedByType: Union[str, "CreatedByType"] + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + lastModifiedAt: str + """The timestamp of resource last modification (UTC).""" + + +class UpdateNetworkSiblingSetRequest(TypedDict, total=False): + """Network sibling set update. + + :ivar network_sibling_set_id: Network Sibling Set ID for a group of volumes sharing networking + resources in a subnet. Required. + :vartype network_sibling_set_id: str + :ivar subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Example + /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + Required. + :vartype subnet_id: str + :ivar network_sibling_set_state_id: Network sibling set state Id identifying the current state + of the sibling set. Required. + :vartype network_sibling_set_state_id: str + :ivar network_features: Network features available to the volume. Required. Known values are: + "Basic", "Standard", "Basic_Standard", and "Standard_Basic". + :vartype network_features: Union[str, "NetworkFeatures"] + """ + + networkSiblingSetId: Required[str] + """Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + Required.""" + subnetId: Required[str] + """The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Example + /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + Required.""" + networkSiblingSetStateId: Required[str] + """Network sibling set state Id identifying the current state of the sibling set. Required.""" + networkFeatures: Required[Union[str, "NetworkFeatures"]] + """Network features available to the volume. Required. Known values are: \"Basic\", \"Standard\", + \"Basic_Standard\", and \"Standard_Basic\".""" + + +class UserAssignedIdentity(TypedDict, total=False): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principalId: str + """The principal ID of the assigned identity.""" + clientId: str + """The client ID of the assigned identity.""" + + +class Volume(TrackedResource): + """Volume resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Volume properties. Required. + :vartype properties: "VolumeProperties" + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + :ivar zones: The availability zones. + :vartype zones: list[str] + """ + + properties: Required["VolumeProperties"] + """Volume properties. Required.""" + etag: str + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + zones: list[str] + """The availability zones.""" + + +class VolumeBackupProperties(TypedDict, total=False): + """Volume Backup Properties. + + :ivar backup_policy_id: Backup Policy Resource ID. + :vartype backup_policy_id: str + :ivar policy_enforced: Policy Enforced. + :vartype policy_enforced: bool + :ivar backup_vault_id: Backup Vault Resource ID. + :vartype backup_vault_id: str + """ + + backupPolicyId: str + """Backup Policy Resource ID.""" + policyEnforced: bool + """Policy Enforced.""" + backupVaultId: str + """Backup Vault Resource ID.""" + + +class VolumeBackups(TypedDict, total=False): + """Volume details using the backup policy. + + :ivar volume_name: Volume name. + :vartype volume_name: str + :ivar volume_resource_id: ResourceId used to identify the Volume. + :vartype volume_resource_id: str + :ivar backups_count: Total count of backups for volume. + :vartype backups_count: int + :ivar policy_enabled: Policy enabled. + :vartype policy_enabled: bool + """ + + volumeName: str + """Volume name.""" + volumeResourceId: str + """ResourceId used to identify the Volume.""" + backupsCount: int + """Total count of backups for volume.""" + policyEnabled: bool + """Policy enabled.""" + + +class VolumeGroupDetails(ProxyResource): + """Volume group resource for create. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar properties: Volume group properties. + :vartype properties: "VolumeGroupProperties" + :ivar location: Resource location. + :vartype location: str + """ + + properties: "VolumeGroupProperties" + """Volume group properties.""" + location: str + """Resource location.""" + + +class VolumeGroupMetaData(TypedDict, total=False): + """Volume group properties. + + :ivar group_description: Group Description. + :vartype group_description: str + :ivar application_type: Application Type. Known values are: "SAP-HANA" and "ORACLE". + :vartype application_type: Union[str, "ApplicationType"] + :ivar application_identifier: Application specific identifier. + :vartype application_identifier: str + :ivar global_placement_rules: Application specific placement rules for the volume group. + :vartype global_placement_rules: list["PlacementKeyValuePairs"] + :ivar volumes_count: Number of volumes in volume group. + :vartype volumes_count: int + """ + + groupDescription: str + """Group Description.""" + applicationType: Union[str, "ApplicationType"] + """Application Type. Known values are: \"SAP-HANA\" and \"ORACLE\".""" + applicationIdentifier: str + """Application specific identifier.""" + globalPlacementRules: list["PlacementKeyValuePairs"] + """Application specific placement rules for the volume group.""" + volumesCount: int + """Number of volumes in volume group.""" + + +class VolumeGroupProperties(TypedDict, total=False): + """Volume group properties. + + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar group_meta_data: Volume group details. + :vartype group_meta_data: "VolumeGroupMetaData" + :ivar volumes: List of volumes from group. + :vartype volumes: list["VolumeGroupVolumeProperties"] + """ + + provisioningState: str + """Azure lifecycle management.""" + groupMetaData: "VolumeGroupMetaData" + """Volume group details.""" + volumes: list["VolumeGroupVolumeProperties"] + """List of volumes from group.""" + + +class VolumeGroupVolumeProperties(TypedDict, total=False): + """Volume resource. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar zones: Availability Zone. + :vartype zones: list[str] + :ivar properties: Volume properties. Required. + :vartype properties: "VolumeProperties" + """ + + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + zones: list[str] + """Availability Zone.""" + properties: Required["VolumeProperties"] + """Volume properties. Required.""" + + +class VolumePatch(TypedDict, total=False): + """Volume patch resource. + + :ivar location: Resource location. + :vartype location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Patchable volume properties. + :vartype properties: "VolumePatchProperties" + """ + + location: str + """Resource location.""" + id: str + """Resource Id.""" + name: str + """Resource name.""" + type: str + """Resource type.""" + tags: dict[str, str] + """Resource tags.""" + properties: "VolumePatchProperties" + """Patchable volume properties.""" + + +class VolumePatchProperties(TypedDict, total=False): + """Patchable volume properties. + + :ivar service_level: The service level of the file system. Known values are: "Standard", + "Premium", "Ultra", "StandardZRS", and "Flexible". + :vartype service_level: Union[str, "ServiceLevel"] + :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft + quota used for alerting only. For regular volumes, valid values are in the range 50GiB to + 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an + exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + :vartype usage_threshold: int + :ivar export_policy: Set of export policy rules. + :vartype export_policy: "VolumePatchPropertiesExportPolicy" + :ivar protocol_types: Set of protocol types, default NFSv3, CIFS for SMB protocol. + :vartype protocol_types: list[str] + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. + :vartype throughput_mibps: float + :ivar data_protection: DataProtection type volumes include an object containing details of the + replication. + :vartype data_protection: "VolumePatchPropertiesDataProtection" + :ivar is_default_quota_enabled: Specifies if default quota is enabled for the volume. + :vartype is_default_quota_enabled: bool + :ivar default_user_quota_in_ki_bs: Default user quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + :vartype default_user_quota_in_ki_bs: int + :ivar default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + :vartype default_group_quota_in_ki_bs: int + :ivar unix_permissions: UNIX permissions for NFS volume accepted in octal 4 digit format. First + digit selects the set user ID(4), set group ID (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. + :vartype unix_permissions: str + :ivar cool_access: Specifies whether Cool Access(tiering) is enabled for the volume. + :vartype cool_access: bool + :ivar coolness_period: Specifies the number of days after which data that is not accessed by + clients will be tiered. + :vartype coolness_period: int + :ivar cool_access_retrieval_policy: coolAccessRetrievalPolicy determines the data retrieval + behavior from the cool tier to standard storage based on the read pattern for cool access + enabled volumes. The possible values for this field are: Default - Data will be pulled from + cool tier to standard storage on random reads. This policy is the default. OnRead - All + client-driven data read is pulled from cool tier to standard storage on both sequential and + random reads. Never - No client-driven data is pulled from cool tier to standard storage. Known + values are: "Default", "OnRead", and "Never". + :vartype cool_access_retrieval_policy: Union[str, "CoolAccessRetrievalPolicy"] + :ivar cool_access_tiering_policy: coolAccessTieringPolicy determines which cold data blocks are + moved to cool tier. The possible values for this field are: Auto - Moves cold user data blocks + in both the Snapshot copies and the active file system to the cool tier tier. This policy is + the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot copies that are not + associated with the active file system to the cool tier. Known values are: "Auto" and + "SnapshotOnly". + :vartype cool_access_tiering_policy: Union[str, "CoolAccessTieringPolicy"] + :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only + snapshot directory which provides access to each of the volume's snapshots. + :vartype snapshot_directory_visible: bool + :ivar smb_access_based_enumeration: Enables access-based enumeration share property for SMB + Shares. Only applicable for SMB/DualProtocol volume. Known values are: "Disabled" and + "Enabled". + :vartype smb_access_based_enumeration: Union[str, "SmbAccessBasedEnumeration"] + :ivar smb_non_browsable: Enables non-browsable property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: "Disabled" and "Enabled". + :vartype smb_non_browsable: Union[str, "SmbNonBrowsable"] + """ + + serviceLevel: Union[str, "ServiceLevel"] + """The service level of the file system. Known values are: \"Standard\", \"Premium\", \"Ultra\", + \"StandardZRS\", and \"Flexible\".""" + usageThreshold: int + """Maximum storage quota allowed for a file system in bytes. This is a soft quota used for + alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large + volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.""" + exportPolicy: "VolumePatchPropertiesExportPolicy" + """Set of export policy rules.""" + protocolTypes: list[str] + """Set of protocol types, default NFSv3, CIFS for SMB protocol.""" + throughputMibps: float + """Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as + input only for manual qosType volume.""" + dataProtection: "VolumePatchPropertiesDataProtection" + """DataProtection type volumes include an object containing details of the replication.""" + isDefaultQuotaEnabled: bool + """Specifies if default quota is enabled for the volume.""" + defaultUserQuotaInKiBs: int + """Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 + KiBs applies .""" + defaultGroupQuotaInKiBs: int + """Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 + KiBs applies.""" + unixPermissions: Optional[str] + """UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set + user ID(4), set group ID (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.""" + coolAccess: bool + """Specifies whether Cool Access(tiering) is enabled for the volume.""" + coolnessPeriod: int + """Specifies the number of days after which data that is not accessed by clients will be tiered.""" + coolAccessRetrievalPolicy: Union[str, "CoolAccessRetrievalPolicy"] + """coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard + storage based on the read pattern for cool access enabled volumes. The possible values for this + field are: Default - Data will be pulled from cool tier to standard storage on random reads. + This policy is the default. OnRead - All client-driven data read is pulled from cool tier to + standard storage on both sequential and random reads. Never - No client-driven data is pulled + from cool tier to standard storage. Known values are: \"Default\", \"OnRead\", and \"Never\".""" + coolAccessTieringPolicy: Union[str, "CoolAccessTieringPolicy"] + """coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible + values for this field are: Auto - Moves cold user data blocks in both the Snapshot copies and + the active file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves + user data blocks of the Volume Snapshot copies that are not associated with the active file + system to the cool tier. Known values are: \"Auto\" and \"SnapshotOnly\".""" + snapshotDirectoryVisible: bool + """If enabled (true) the volume will contain a read-only snapshot directory which provides access + to each of the volume's snapshots.""" + smbAccessBasedEnumeration: Optional[Union[str, "SmbAccessBasedEnumeration"]] + """Enables access-based enumeration share property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: \"Disabled\" and \"Enabled\".""" + smbNonBrowsable: Union[str, "SmbNonBrowsable"] + """Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + Known values are: \"Disabled\" and \"Enabled\".""" + + +class VolumePatchPropertiesDataProtection(TypedDict, total=False): + """DataProtection type volumes include an object containing details of the replication. + + :ivar backup: Backup Properties. + :vartype backup: "VolumeBackupProperties" + :ivar snapshot: Snapshot properties. + :vartype snapshot: "VolumeSnapshotProperties" + :ivar ransomware_protection: Advanced Ransomware Protection updatable settings. + :vartype ransomware_protection: "RansomwareProtectionPatchSettings" + """ + + backup: "VolumeBackupProperties" + """Backup Properties.""" + snapshot: "VolumeSnapshotProperties" + """Snapshot properties.""" + ransomwareProtection: "RansomwareProtectionPatchSettings" + """Advanced Ransomware Protection updatable settings.""" + + +class VolumePatchPropertiesExportPolicy(TypedDict, total=False): + """Set of export policy rules. + + :ivar rules: Export policy rule. + :vartype rules: list["ExportPolicyRule"] + """ + + rules: list["ExportPolicyRule"] + """Export policy rule.""" + + +class VolumeProperties(TypedDict, total=False): + """Volume properties. + + :ivar file_system_id: Unique FileSystem Identifier. + :vartype file_system_id: str + :ivar creation_token: A unique file path for the volume. Used when creating mount targets. + Required. + :vartype creation_token: str + :ivar service_level: The service level of the file system. Known values are: "Standard", + "Premium", "Ultra", "StandardZRS", and "Flexible". + :vartype service_level: Union[str, "ServiceLevel"] + :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft + quota used for alerting only. For regular volumes, valid values are in the range 50GiB to + 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an + exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + Required. + :vartype usage_threshold: int + :ivar export_policy: Set of export policy rules. + :vartype export_policy: "VolumePropertiesExportPolicy" + :ivar protocol_types: Set of protocol types, default NFSv3, CIFS for SMB protocol. + :vartype protocol_types: list[str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :ivar snapshot_id: Resource identifier used to identify the Snapshot. + :vartype snapshot_id: str + :ivar delete_base_snapshot: If enabled (true) the snapshot the volume was created from will be + automatically deleted after the volume create operation has finished. Defaults to false. + :vartype delete_base_snapshot: bool + :ivar backup_id: Resource identifier used to identify the Backup. + :vartype backup_id: str + :ivar baremetal_tenant_id: Unique Baremetal Tenant Identifier. + :vartype baremetal_tenant_id: str + :ivar subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Required. + :vartype subnet_id: str + :ivar network_features: The original value of the network features type available to the volume + at the time it was created. Known values are: "Basic", "Standard", "Basic_Standard", and + "Standard_Basic". + :vartype network_features: Union[str, "NetworkFeatures"] + :ivar effective_network_features: The effective value of the network features type available to + the volume, or current effective state of update. Known values are: "Basic", "Standard", + "Basic_Standard", and "Standard_Basic". + :vartype effective_network_features: Union[str, "NetworkFeatures"] + :ivar network_sibling_set_id: Network Sibling Set ID for the the group of volumes sharing + networking resources. + :vartype network_sibling_set_id: str + :ivar storage_to_network_proximity: Provides storage to network proximity information for the + volume. Known values are: "Default", "T1", "T2", and "AcrossT2". + :vartype storage_to_network_proximity: Union[str, "VolumeStorageToNetworkProximity"] + :ivar mount_targets: List of mount targets. + :vartype mount_targets: list["MountTargetProperties"] + :ivar volume_type: 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. + :vartype volume_type: str + :ivar data_protection: DataProtection type volumes include an object containing details of the + replication. + :vartype data_protection: "VolumePropertiesDataProtection" + :ivar accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short term + clone volume, if the parent pool does not have enough space to accommodate the volume after + split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :vartype accept_grow_capacity_pool_for_short_term_clone_split: Union[str, + "AcceptGrowCapacityPoolForShortTermCloneSplit"] + :ivar is_restoring: Restoring. + :vartype is_restoring: bool + :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only + snapshot directory which provides access to each of the volume's snapshots (defaults to true). + :vartype snapshot_directory_visible: bool + :ivar kerberos_enabled: Describe if a volume is KerberosEnabled. To be use with swagger version + 2020-05-01 or later. + :vartype kerberos_enabled: bool + :ivar security_style: The security style of volume, default unix, defaults to ntfs for dual + protocol or CIFS protocol. Known values are: "ntfs" and "unix". + :vartype security_style: Union[str, "SecurityStyle"] + :ivar smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + :vartype smb_encryption: bool + :ivar smb_access_based_enumeration: Enables access-based enumeration share property for SMB + Shares. Only applicable for SMB/DualProtocol volume. Known values are: "Disabled" and + "Enabled". + :vartype smb_access_based_enumeration: Union[str, "SmbAccessBasedEnumeration"] + :ivar smb_non_browsable: Enables non-browsable property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: "Disabled" and "Enabled". + :vartype smb_non_browsable: Union[str, "SmbNonBrowsable"] + :ivar smb_continuously_available: Enables continuously available share property for smb volume. + Only applicable for SMB volume. + :vartype smb_continuously_available: bool + :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. + :vartype throughput_mibps: float + :ivar actual_throughput_mibps: Actual throughput in MiB/s for auto qosType volumes calculated + based on size and serviceLevel. + :vartype actual_throughput_mibps: float + :ivar encryption_key_source: Source of key used to encrypt data in volume. Applicable if NetApp + account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) + are: 'Microsoft.NetApp, Microsoft.KeyVault'. Known values are: "Microsoft.NetApp" and + "Microsoft.KeyVault". + :vartype encryption_key_source: Union[str, "EncryptionKeySource"] + :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault. + It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = + 'Microsoft.KeyVault'. + :vartype key_vault_private_endpoint_resource_id: str + :ivar ldap_enabled: Specifies whether LDAP is enabled or not for a given NFS volume. + :vartype ldap_enabled: bool + :ivar cool_access: Specifies whether Cool Access(tiering) is enabled for the volume. + :vartype cool_access: bool + :ivar coolness_period: Specifies the number of days after which data that is not accessed by + clients will be tiered. + :vartype coolness_period: int + :ivar cool_access_retrieval_policy: coolAccessRetrievalPolicy determines the data retrieval + behavior from the cool tier to standard storage based on the read pattern for cool access + enabled volumes. The possible values for this field are: Default - Data will be pulled from + cool tier to standard storage on random reads. This policy is the default. OnRead - All + client-driven data read is pulled from cool tier to standard storage on both sequential and + random reads. Never - No client-driven data is pulled from cool tier to standard storage. Known + values are: "Default", "OnRead", and "Never". + :vartype cool_access_retrieval_policy: Union[str, "CoolAccessRetrievalPolicy"] + :ivar cool_access_tiering_policy: coolAccessTieringPolicy determines which cold data blocks are + moved to cool tier. The possible values for this field are: Auto - Moves cold user data blocks + in both the Snapshot copies and the active file system to the cool tier tier. This policy is + the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot copies that are not + associated with the active file system to the cool tier. Known values are: "Auto" and + "SnapshotOnly". + :vartype cool_access_tiering_policy: Union[str, "CoolAccessTieringPolicy"] + :ivar unix_permissions: UNIX permissions for NFS volume accepted in octal 4 digit format. First + digit selects the set user ID(4), set group ID (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. + :vartype unix_permissions: str + :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show + the percentage completion of this cloning process. When this value is empty/null there is no + cloning process currently happening on this volume. This value will update every 5 minutes + during cloning. + :vartype clone_progress: int + :ivar file_access_logs: Flag indicating whether file access logs are enabled for the volume, + based on active diagnostic settings present on the volume. Known values are: "Enabled" and + "Disabled". + :vartype file_access_logs: Union[str, "FileAccessLogs"] + :ivar avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) + datastore purpose. Known values are: "Enabled" and "Disabled". + :vartype avs_data_store: Union[str, "AvsDataStore"] + :ivar data_store_resource_id: Data store resource unique identifier. + :vartype data_store_resource_id: list[str] + :ivar is_default_quota_enabled: Specifies if default quota is enabled for the volume. + :vartype is_default_quota_enabled: bool + :ivar default_user_quota_in_ki_bs: Default user quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + :vartype default_user_quota_in_ki_bs: int + :ivar default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + :vartype default_group_quota_in_ki_bs: int + :ivar maximum_number_of_files: Maximum number of files allowed. Needs a service request in + order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + :vartype maximum_number_of_files: int + :ivar volume_group_name: Volume Group Name. + :vartype volume_group_name: str + :ivar capacity_pool_resource_id: Pool Resource Id used in case of creating a volume through + volume group. + :vartype capacity_pool_resource_id: str + :ivar proximity_placement_group: Proximity placement group associated with the volume. + :vartype proximity_placement_group: str + :ivar t2_network: T2 network information. + :vartype t2_network: str + :ivar volume_spec_name: Volume spec name is the application specific designation or identifier + for the particular volume in a volume group for e.g. data, log. + :vartype volume_spec_name: str + :ivar encrypted: Specifies if the volume is encrypted or not. Only available on volumes created + or updated after 2022-01-01. + :vartype encrypted: bool + :ivar placement_rules: Application specific placement rules for the particular volume. + :vartype placement_rules: list["PlacementKeyValuePairs"] + :ivar enable_subvolumes: Flag indicating whether subvolume operations are enabled on the volume + Deprecated. Subvolume operations and this flag will be removed in a future API version. Known + values are: "Enabled" and "Disabled". + :vartype enable_subvolumes: Union[str, "EnableSubvolumes"] + :ivar provisioned_availability_zone: The availability zone where the volume is provisioned. + This refers to the logical availability zone where the volume resides. + :vartype provisioned_availability_zone: str + :ivar is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. + :vartype is_large_volume: bool + :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. + :vartype originating_resource_id: str + :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in + bytes. + :vartype inherited_size_in_bytes: int + :ivar breakthrough_mode_old: Specifies whether the volume operates in Breakthrough Mode. Known + values are: "Enabled" and "Disabled". + :vartype breakthrough_mode_old: Union[str, "BreakthroughMode"] + :ivar breakthrough_mode: Specifies whether the volume operates in Breakthrough Mode. Known + values are: "Enabled" and "Disabled". + :vartype breakthrough_mode: Union[str, "BreakthroughMode"] + """ + + fileSystemId: str + """Unique FileSystem Identifier.""" + creationToken: Required[str] + """A unique file path for the volume. Used when creating mount targets. Required.""" + serviceLevel: Union[str, "ServiceLevel"] + """The service level of the file system. Known values are: \"Standard\", \"Premium\", \"Ultra\", + \"StandardZRS\", and \"Flexible\".""" + usageThreshold: Required[int] + """Maximum storage quota allowed for a file system in bytes. This is a soft quota used for + alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large + volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. Required.""" + exportPolicy: "VolumePropertiesExportPolicy" + """Set of export policy rules.""" + protocolTypes: list[str] + """Set of protocol types, default NFSv3, CIFS for SMB protocol.""" + provisioningState: str + """Azure lifecycle management.""" + snapshotId: Optional[str] + """Resource identifier used to identify the Snapshot.""" + deleteBaseSnapshot: bool + """If enabled (true) the snapshot the volume was created from will be automatically deleted after + the volume create operation has finished. Defaults to false.""" + backupId: Optional[str] + """Resource identifier used to identify the Backup.""" + baremetalTenantId: str + """Unique Baremetal Tenant Identifier.""" + subnetId: Required[str] + """The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. Required.""" + networkFeatures: Union[str, "NetworkFeatures"] + """The original value of the network features type available to the volume at the time it was + created. Known values are: \"Basic\", \"Standard\", \"Basic_Standard\", and \"Standard_Basic\".""" + effectiveNetworkFeatures: Union[str, "NetworkFeatures"] + """The effective value of the network features type available to the volume, or current effective + state of update. Known values are: \"Basic\", \"Standard\", \"Basic_Standard\", and + \"Standard_Basic\".""" + networkSiblingSetId: str + """Network Sibling Set ID for the the group of volumes sharing networking resources.""" + storageToNetworkProximity: Union[str, "VolumeStorageToNetworkProximity"] + """Provides storage to network proximity information for the volume. Known values are: + \"Default\", \"T1\", \"T2\", and \"AcrossT2\".""" + mountTargets: list["MountTargetProperties"] + """List of mount targets.""" + volumeType: str + """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.""" + dataProtection: "VolumePropertiesDataProtection" + """DataProtection type volumes include an object containing details of the replication.""" + acceptGrowCapacityPoolForShortTermCloneSplit: Union[str, "AcceptGrowCapacityPoolForShortTermCloneSplit"] + """While auto splitting the short term clone volume, if the parent pool does not have enough space + to accommodate the volume after split, it will be automatically resized, which will lead to + increased billing. To accept capacity pool size auto grow and create a short term clone volume, + set the property as accepted. Known values are: \"Accepted\" and \"Declined\".""" + isRestoring: bool + """Restoring.""" + snapshotDirectoryVisible: bool + """If enabled (true) the volume will contain a read-only snapshot directory which provides access + to each of the volume's snapshots (defaults to true).""" + kerberosEnabled: bool + """Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later.""" + securityStyle: Union[str, "SecurityStyle"] + """The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS + protocol. Known values are: \"ntfs\" and \"unix\".""" + smbEncryption: bool + """Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be + used with swagger version 2020-08-01 or later.""" + smbAccessBasedEnumeration: Optional[Union[str, "SmbAccessBasedEnumeration"]] + """Enables access-based enumeration share property for SMB Shares. Only applicable for + SMB/DualProtocol volume. Known values are: \"Disabled\" and \"Enabled\".""" + smbNonBrowsable: Union[str, "SmbNonBrowsable"] + """Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + Known values are: \"Disabled\" and \"Enabled\".""" + smbContinuouslyAvailable: bool + """Enables continuously available share property for smb volume. Only applicable for SMB volume.""" + throughputMibps: Optional[float] + """Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as + input only for manual qosType volume.""" + actualThroughputMibps: float + """Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel.""" + encryptionKeySource: Union[str, "EncryptionKeySource"] + """Source of key used to encrypt data in volume. Applicable if NetApp account has + encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + 'Microsoft.NetApp, Microsoft.KeyVault'. Known values are: \"Microsoft.NetApp\" and + \"Microsoft.KeyVault\".""" + keyVaultPrivateEndpointResourceId: str + """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the + volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'.""" + ldapEnabled: bool + """Specifies whether LDAP is enabled or not for a given NFS volume.""" + coolAccess: bool + """Specifies whether Cool Access(tiering) is enabled for the volume.""" + coolnessPeriod: int + """Specifies the number of days after which data that is not accessed by clients will be tiered.""" + coolAccessRetrievalPolicy: Union[str, "CoolAccessRetrievalPolicy"] + """coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard + storage based on the read pattern for cool access enabled volumes. The possible values for this + field are: Default - Data will be pulled from cool tier to standard storage on random reads. + This policy is the default. OnRead - All client-driven data read is pulled from cool tier to + standard storage on both sequential and random reads. Never - No client-driven data is pulled + from cool tier to standard storage. Known values are: \"Default\", \"OnRead\", and \"Never\".""" + coolAccessTieringPolicy: Union[str, "CoolAccessTieringPolicy"] + """coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible + values for this field are: Auto - Moves cold user data blocks in both the Snapshot copies and + the active file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves + user data blocks of the Volume Snapshot copies that are not associated with the active file + system to the cool tier. Known values are: \"Auto\" and \"SnapshotOnly\".""" + unixPermissions: Optional[str] + """UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set + user ID(4), set group ID (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.""" + cloneProgress: Optional[int] + """When a volume is being restored from another volume's snapshot, will show the percentage + completion of this cloning process. When this value is empty/null there is no cloning process + currently happening on this volume. This value will update every 5 minutes during cloning.""" + fileAccessLogs: Union[str, "FileAccessLogs"] + """Flag indicating whether file access logs are enabled for the volume, based on active diagnostic + settings present on the volume. Known values are: \"Enabled\" and \"Disabled\".""" + avsDataStore: Union[str, "AvsDataStore"] + """Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + Known values are: \"Enabled\" and \"Disabled\".""" + dataStoreResourceId: list[str] + """Data store resource unique identifier.""" + isDefaultQuotaEnabled: bool + """Specifies if default quota is enabled for the volume.""" + defaultUserQuotaInKiBs: int + """Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 + KiBs applies .""" + defaultGroupQuotaInKiBs: int + """Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 + KiBs applies.""" + maximumNumberOfFiles: int + """Maximum number of files allowed. Needs a service request in order to be changed. Only allowed + to be changed if volume quota is more than 4TiB.""" + volumeGroupName: str + """Volume Group Name.""" + capacityPoolResourceId: str + """Pool Resource Id used in case of creating a volume through volume group.""" + proximityPlacementGroup: str + """Proximity placement group associated with the volume.""" + t2Network: str + """T2 network information.""" + volumeSpecName: str + """Volume spec name is the application specific designation or identifier for the particular + volume in a volume group for e.g. data, log.""" + encrypted: bool + """Specifies if the volume is encrypted or not. Only available on volumes created or updated after + 2022-01-01.""" + placementRules: list["PlacementKeyValuePairs"] + """Application specific placement rules for the particular volume.""" + enableSubvolumes: Union[str, "EnableSubvolumes"] + """Flag indicating whether subvolume operations are enabled on the volume Deprecated. Subvolume + operations and this flag will be removed in a future API version. Known values are: \"Enabled\" + and \"Disabled\".""" + provisionedAvailabilityZone: Optional[str] + """The availability zone where the volume is provisioned. This refers to the logical availability + zone where the volume resides.""" + isLargeVolume: bool + """Specifies whether volume is a Large Volume or Regular Volume.""" + originatingResourceId: Optional[str] + """Id of the snapshot or backup that the volume is restored from.""" + inheritedSizeInBytes: Optional[int] + """Space shared by short term clone volume with parent volume in bytes.""" + breakthroughModeOld: Union[str, "BreakthroughMode"] + """Specifies whether the volume operates in Breakthrough Mode. Known values are: \"Enabled\" and + \"Disabled\".""" + breakthroughMode: Union[str, "BreakthroughMode"] + """Specifies whether the volume operates in Breakthrough Mode. Known values are: \"Enabled\" and + \"Disabled\".""" + + +class VolumePropertiesDataProtection(TypedDict, total=False): + """DataProtection type volumes include an object containing details of the replication. + + :ivar backup: Backup Properties. + :vartype backup: "VolumeBackupProperties" + :ivar replication: Replication properties. + :vartype replication: "ReplicationObject" + :ivar snapshot: Snapshot properties. + :vartype snapshot: "VolumeSnapshotProperties" + :ivar volume_relocation: VolumeRelocation properties. + :vartype volume_relocation: "VolumeRelocationProperties" + :ivar ransomware_protection: Advanced Ransomware Protection settings. + :vartype ransomware_protection: "RansomwareProtectionSettings" + """ + + backup: "VolumeBackupProperties" + """Backup Properties.""" + replication: "ReplicationObject" + """Replication properties.""" + snapshot: "VolumeSnapshotProperties" + """Snapshot properties.""" + volumeRelocation: "VolumeRelocationProperties" + """VolumeRelocation properties.""" + ransomwareProtection: "RansomwareProtectionSettings" + """Advanced Ransomware Protection settings.""" + + +class VolumePropertiesExportPolicy(TypedDict, total=False): + """Set of export policy rules. + + :ivar rules: Export policy rule. + :vartype rules: list["ExportPolicyRule"] + """ + + rules: list["ExportPolicyRule"] + """Export policy rule.""" + + +class VolumeQuotaRule(TrackedResource): + """Quota Rule of a Volume. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Volume Quota Rule Properties. + :vartype properties: "VolumeQuotaRulesProperties" + """ + + properties: "VolumeQuotaRulesProperties" + """Volume Quota Rule Properties.""" + + +class VolumeQuotaRulePatch(TypedDict, total=False): + """Patchable Quota Rule of a Volume. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Volume Quota Rule Properties. + :vartype properties: "VolumeQuotaRulesProperties" + """ + + tags: dict[str, str] + """Resource tags.""" + properties: "VolumeQuotaRulesProperties" + """Volume Quota Rule Properties.""" + + +class VolumeQuotaRulesProperties(TypedDict, total=False): + """Volume Quota Rule properties. + + :ivar provisioning_state: Gets the status of the VolumeQuotaRule at the time the operation was + called. Known values are: "Accepted", "Creating", "Patching", "Updating", "Deleting", "Moving", + "Failed", and "Succeeded". + :vartype provisioning_state: Union[str, "NetAppProvisioningState"] + :ivar quota_size_in_ki_bs: Size of quota. + :vartype quota_size_in_ki_bs: int + :ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota", + "IndividualUserQuota", and "IndividualGroupQuota". + :vartype quota_type: Union[str, "QuotaType"] + :ivar quota_target: 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 . + :vartype quota_target: str + """ + + provisioningState: Union[str, "NetAppProvisioningState"] + """Gets the status of the VolumeQuotaRule at the time the operation was called. Known values are: + \"Accepted\", \"Creating\", \"Patching\", \"Updating\", \"Deleting\", \"Moving\", \"Failed\", + and \"Succeeded\".""" + quotaSizeInKiBs: int + """Size of quota.""" + quotaType: Union[str, "QuotaType"] + """Type of quota. Known values are: \"DefaultUserQuota\", \"DefaultGroupQuota\", + \"IndividualUserQuota\", and \"IndividualGroupQuota\".""" + quotaTarget: str + """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 .""" + + +class VolumeRelocationProperties(TypedDict, total=False): + """Volume relocation properties. + + :ivar relocation_requested: Has relocation been requested for this volume. + :vartype relocation_requested: bool + :ivar ready_to_be_finalized: Has relocation finished and is ready to be cleaned up. + :vartype ready_to_be_finalized: bool + """ + + relocationRequested: bool + """Has relocation been requested for this volume.""" + readyToBeFinalized: bool + """Has relocation finished and is ready to be cleaned up.""" + + +class VolumeRevert(TypedDict, total=False): + """revert a volume to the snapshot. + + :ivar snapshot_id: Resource id of the snapshot. + :vartype snapshot_id: str + """ + + snapshotId: str + """Resource id of the snapshot.""" + + +class VolumeSnapshotProperties(TypedDict, total=False): + """Volume Snapshot Properties. + + :ivar snapshot_policy_id: Snapshot Policy ResourceId. + :vartype snapshot_policy_id: str + """ + + snapshotPolicyId: str + """Snapshot Policy ResourceId.""" + + +class WeeklySchedule(TypedDict, total=False): + """Weekly Schedule properties, make a snapshot every week at a specific day or days. + + :ivar snapshots_to_keep: Weekly snapshot count to keep. + :vartype snapshots_to_keep: int + :ivar day: Indicates which weekdays snapshot should be taken, accepts a comma separated list of + week day names in english. + :vartype day: str + :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken. + :vartype hour: int + :ivar minute: Indicates which minute snapshot should be taken. + :vartype minute: int + :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes. + :vartype used_bytes: int + """ + + snapshotsToKeep: int + """Weekly snapshot count to keep.""" + day: str + """Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day + names in english.""" + hour: int + """Indicates which hour in UTC timezone a snapshot should be taken.""" + minute: int + """Indicates which minute snapshot should be taken.""" + usedBytes: int + """Resource size in bytes, current storage usage for the volume in bytes.""" diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py index f3e0e494380f..6e8e9d3ced96 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Accounts_ChangeKeyVault.json +# x-ms-original-file: 2026-05-01/Accounts_ChangeKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py index 44f1c4800278..8c83fad6cb5d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Accounts_CreateOrUpdate.json +# x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py index aa48c7892193..408738a418f0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py @@ -44,7 +44,7 @@ def main(): "ldapOverTLS": False, "ldapSigning": False, "organizationalUnit": "OU=Engineering", - "password": "", + "password": "ad_password", "site": "SiteName", "smbServerName": "SMBServer", "username": "ad_user_name", @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Accounts_CreateOrUpdateAD.json +# x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdateAD.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ldap_config.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ldap_config.py deleted file mode 100644 index 934327eb1ea6..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ldap_config.py +++ /dev/null @@ -1,62 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python accounts_create_or_update_ldap_config.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.accounts.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - body={ - "location": "eastus", - "properties": { - "ldapConfiguration": { - "bindAuthenticationLevel": "Simple", - "bindDN": "cn=user,dc=domain,dc=com", - "bindPasswordAkvConfig": { - "azureKeyVaultUri": "https://myvault.vault.azure.net/", - "secretName": "bindPassword", - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - }, - "certificateCNHost": "ldap.krypton.com", - "domain": "example.com", - "ldapOverTLS": False, - "ldapServers": ["192.0.2.1", "192.0.2.2"], - "serverCACertificate": "", - } - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/Accounts_CreateOrUpdateLdapConfig.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py index c1423d962d28..2a60c8b31239 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Accounts_Delete.json +# x-ms-original-file: 2026-05-01/Accounts_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py index f1aad824c14e..cc462272cd29 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Accounts_Get.json +# x-ms-original-file: 2026-05-01/Accounts_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py index 6246ed16c3ad..60db90c8f1cd 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Accounts_GetChangeKeyVaultInformation.json +# x-ms-original-file: 2026-05-01/Accounts_GetChangeKeyVaultInformation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py index 60ef6ff00a9d..c6f261ff612c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Accounts_List.json +# x-ms-original-file: 2026-05-01/Accounts_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py index 3b6373bd8aa0..0294a52ca4a5 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Accounts_ListBySubscription.json +# x-ms-original-file: 2026-05-01/Accounts_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_refresh_ldap_bind_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_refresh_ldap_bind_password.py deleted file mode 100644 index 187e883720b0..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_refresh_ldap_bind_password.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python accounts_refresh_ldap_bind_password.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.accounts.begin_refresh_ldap_bind_password( - resource_group_name="myRG", - account_name="account1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/Accounts_RefreshLdapBindPassword.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py index f888c905377f..ff3c25f28542 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Accounts_RenewCredentials.json +# x-ms-original-file: 2026-05-01/Accounts_RenewCredentials.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py index ac08b93367d2..17f763a530ff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Accounts_TransitionEncryptionKey.json +# x-ms-original-file: 2026-05-01/Accounts_TransitionEncryptionKey.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py index d16408df1f7c..fab17b8fd25c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Accounts_Update.json +# x-ms-original-file: 2026-05-01/Accounts_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py deleted file mode 100644 index 01e0a862ed17..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py +++ /dev/null @@ -1,73 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.active_directory_configs.begin_create_or_update( - resource_group_name="myRG", - active_directory_config_name="adconfig1", - body={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1": {} - }, - }, - "location": "eastus", - "properties": { - "administrators": ["admin1"], - "backupOperators": ["backupOp1"], - "dns": ["10.10.10.4", "10.10.10.5"], - "domain": "example.net", - "organizationalUnit": "OU=Computers,DC=corp,DC=contoso,DC=com", - "secretPassword": { - "identity": { - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1" - }, - "keyVaultProperties": { - "keyVaultUri": "https://example.vault.azure.net/", - "secretName": "activeDirectoryPassword", - }, - }, - "securityOperators": ["secOp1"], - "site": "Default-First-Site-Name", - "smbServerName": "smbServer", - "userName": "admin1", - }, - "tags": {"ac-tag1": "activeDirectoryConfig1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py deleted file mode 100644 index 89c56f068f88..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.active_directory_configs.begin_delete( - resource_group_name="myRG", - active_directory_config_name="adconfig1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py deleted file mode 100644 index ae22e19b0778..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.active_directory_configs.get( - resource_group_name="myRG", - active_directory_config_name="adconfig1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py deleted file mode 100644 index d7ec715e88ba..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_list_by_resource_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.active_directory_configs.list_by_resource_group( - resource_group_name="myRG", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_ListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py deleted file mode 100644 index 780d719c5460..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_list_by_subscription.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.active_directory_configs.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_ListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py deleted file mode 100644 index afdde4afbbb8..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python active_directory_configs_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.active_directory_configs.begin_update( - resource_group_name="myRG", - active_directory_config_name="adconfig1", - body={"properties": {"smbServerName": "smbServer2"}}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ActiveDirectoryConfigs_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py index 784419ec7bdd..77b7df8c1534 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupPolicies_Create.json +# x-ms-original-file: 2026-05-01/BackupPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py index e800bd8ddb77..51862bf0a340 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupPolicies_Delete.json +# x-ms-original-file: 2026-05-01/BackupPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py index 22486f02115e..d6051005de31 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupPolicies_Get.json +# x-ms-original-file: 2026-05-01/BackupPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py index 28b8708032b4..48b23062c56c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/BackupPolicies_List.json +# x-ms-original-file: 2026-05-01/BackupPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py index 2bb22694e97d..60a449258ac9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupPolicies_Update.json +# x-ms-original-file: 2026-05-01/BackupPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py index 6b01236fb476..eca387a33da6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupVaults_Create.json +# x-ms-original-file: 2026-05-01/BackupVaults_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py index 8a4943b16db7..050d223b1894 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupVaults_Delete.json +# x-ms-original-file: 2026-05-01/BackupVaults_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py index f84304e50b84..d06f0c5dd799 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupVaults_Get.json +# x-ms-original-file: 2026-05-01/BackupVaults_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py index 97d281a206d5..ef8624e47231 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/BackupVaults_List.json +# x-ms-original-file: 2026-05-01/BackupVaults_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py index 07f998e92af7..46fcec610618 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupVaults_Update.json +# x-ms-original-file: 2026-05-01/BackupVaults_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py index dc31f3cc32f8..a6ca232049fe 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupsUnderAccount_Migrate.json +# x-ms-original-file: 2026-05-01/BackupsUnderAccount_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py index 89c938b7f69f..f161e45f6ab8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupsUnderBackupVault_Create.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py index 79e72a3ce85b..795d38fbdece 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupsUnderBackupVault_Delete.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py index 4328ac89a483..0574aa4b2c1a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupsUnderBackupVault_Get.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py similarity index 92% rename from sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py rename to sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py index 171a1231327b..a6708545b3e8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-netapp # USAGE - python backups_list_by_vault.py + python backups_under_backup_vault_list.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Backups_ListByVault.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py index 6a8a8f947cea..a9922697b97f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py @@ -43,6 +43,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupsUnderBackupVault_SingleFileRestore.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py index f756d6080286..f09777bc1eb6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/BackupsUnderBackupVault_Update.json +# x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py index 1c0fea1099f2..534474345372 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/BackupsUnderVolume_Migrate.json +# x-ms-original-file: 2026-05-01/BackupsUnderVolume_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py index b04fbf4df4f8..10588c111464 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_CreateOrUpdate.json +# x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update_with_akv.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update_with_akv.py index cd1f26ba6391..23348210c947 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update_with_akv.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update_with_akv.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,12 +42,10 @@ def main(): "certificateAkvDetails": { "certificateKeyVaultUri": "https://REDACTED.vault.azure.net/", "certificateName": "my-certificate", - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", }, "credentialsAkvDetails": { "credentialsKeyVaultUri": "https://REDACTED.vault.azure.net/", "secretName": "my-secret", - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", }, }, "fileSystemUser": {"nfsUser": {"groupId": 1000, "userId": 1001}}, @@ -61,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_CreateOrUpdateWithAkv.json +# x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdateWithAkv.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py index 50e28697e8c0..89ec9efea995 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Buckets_Delete.json +# x-ms-original-file: 2026-05-01/Buckets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_akv_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_akv_credentials.py index 4c887151bce8..824a2dacc4d8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_akv_credentials.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_akv_credentials.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Buckets_GenerateAkvCredentials.json +# x-ms-original-file: 2026-05-01/Buckets_GenerateAkvCredentials.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py index 6995d5e8abfd..e2404effda8b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_GenerateCredentials.json +# x-ms-original-file: 2026-05-01/Buckets_GenerateCredentials.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py index 2f56b63bd1a2..7b2ae229bf18 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_Get.json +# x-ms-original-file: 2026-05-01/Buckets_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py index 2b883a09ad74..dbed6d970183 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Buckets_List.json +# x-ms-original-file: 2026-05-01/Buckets_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_refresh_certificate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_refresh_certificate.py index 8be94b98e22d..732242e27eea 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_refresh_certificate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_refresh_certificate.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Buckets_RefreshCertificate.json +# x-ms-original-file: 2026-05-01/Buckets_RefreshCertificate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py index e385c152c772..69dddea3d675 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_Update.json +# x-ms-original-file: 2026-05-01/Buckets_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update_with_akv.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update_with_akv.py index 012426356faa..869f01748287 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update_with_akv.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update_with_akv.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,12 +42,10 @@ def main(): "certificateAkvDetails": { "certificateKeyVaultUri": "https://REDACTED.vault.azure.net/", "certificateName": "my-certificate", - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", }, "credentialsAkvDetails": { "credentialsKeyVaultUri": "https://REDACTED.vault.azure.net/", "secretName": "my-secret", - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", }, }, "permissions": "ReadOnly", @@ -59,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Buckets_UpdateWithAkv.json +# x-ms-original-file: 2026-05-01/Buckets_UpdateWithAkv.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py index b4c8c9115fa6..e74bda8de2e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_CreateOrUpdate.json +# x-ms-original-file: 2026-05-01/Caches_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py index 548e057c3a41..0102d853c942 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Caches_Delete.json +# x-ms-original-file: 2026-05-01/Caches_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py index 70706ade9891..0d8999b838e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_Get.json +# x-ms-original-file: 2026-05-01/Caches_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list.py index 0fb55cdc5437..925fc4a83051 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Caches_List.json +# x-ms-original-file: 2026-05-01/Caches_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py index 4ad739c92dfa..7de70898a7fa 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_ListPeeringPassphrases.json +# x-ms-original-file: 2026-05-01/Caches_ListPeeringPassphrases.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py index 3144ff37ff2c..f7aad11ca9ef 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_PoolChange.json +# x-ms-original-file: 2026-05-01/Caches_PoolChange.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_reset_smb_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_reset_smb_password.py index cbe897aed078..c637c8e4a6bc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_reset_smb_password.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_reset_smb_password.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_ResetSmbPassword.json +# x-ms-original-file: 2026-05-01/Caches_ResetSmbPassword.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py index 05ff1455f943..b7126cbc2726 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Caches_Update.json +# x-ms-original-file: 2026-05-01/Caches_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py index ddcae91bf6a1..33c040074b8c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py @@ -34,13 +34,13 @@ def main(): response = client.net_app_resource.check_file_path_availability( location="eastus", body={ - "name": "my-exact-filepath", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", + "name": "my-exact-filepth", + "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", }, ) print(response) -# x-ms-original-file: 2026-04-15-preview/CheckFilePathAvailability.json +# x-ms-original-file: 2026-05-01/CheckFilePathAvailability.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py index ac60b0f36cee..c299d537607d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/CheckNameAvailability.json +# x-ms-original-file: 2026-05-01/CheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py index 7c3e87e5213f..03b8861422ac 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/CheckQuotaAvailability.json +# x-ms-original-file: 2026-05-01/CheckQuotaAvailability.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py deleted file mode 100644 index 9cf98b7a4c92..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_accounts.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - body={"location": "eastus", "properties": {}, "tags": {"ac-tag1": "account1"}}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py deleted file mode 100644 index 886e266170c2..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_accounts.begin_delete( - resource_group_name="myRG", - account_name="account1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py deleted file mode 100644 index 0a5fd4c8de42..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_accounts.get( - resource_group_name="myRG", - account_name="account1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py deleted file mode 100644 index 5b0a2d949755..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_list_by_resource_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_accounts.list_by_resource_group( - resource_group_name="myRG", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_ListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py deleted file mode 100644 index 44f4b0ef5cde..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_list_by_subscription.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_accounts.list_by_subscription() - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_ListBySubscription.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py deleted file mode 100644 index 142a42a0829a..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_accounts_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_accounts.begin_update( - resource_group_name="myRG", - account_name="account1", - body={"tags": {"Tag1": "Value1"}}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticAccounts_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py deleted file mode 100644 index b296a2d7808f..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_policies_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_policies.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - backup_policy_name="backupPolicyName", - body={ - "location": "westus", - "properties": { - "dailyBackupsToKeep": 10, - "monthlyBackupsToKeep": 10, - "policyState": "Enabled", - "weeklyBackupsToKeep": 10, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupPolicies_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py deleted file mode 100644 index 7dd2e6edc10f..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_policies_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_backup_policies.begin_delete( - resource_group_name="resourceGroup", - account_name="accountName", - backup_policy_name="backupPolicyName", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupPolicies_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py deleted file mode 100644 index 870529fecc05..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_policies_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_policies.get( - resource_group_name="myRG", - account_name="account1", - backup_policy_name="backupPolicyName", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupPolicies_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py deleted file mode 100644 index f97dd388edf2..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_policies_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_policies.list_by_elastic_account( - resource_group_name="myRG", - account_name="account1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupPolicies_List.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py deleted file mode 100644 index c7c75cc9e78b..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_policies_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_policies.begin_update( - resource_group_name="myRG", - account_name="account1", - backup_policy_name="backupPolicyName", - body={ - "properties": { - "dailyBackupsToKeep": 5, - "monthlyBackupsToKeep": 10, - "policyState": "Enabled", - "weeklyBackupsToKeep": 10, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupPolicies_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py deleted file mode 100644 index e62663edf40a..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_vaults_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_vaults.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - body={"location": "eastus"}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupVaults_Create.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py deleted file mode 100644 index b3a3261e0638..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_vaults_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_backup_vaults.begin_delete( - resource_group_name="resourceGroup", - account_name="account1", - backup_vault_name="backupVault1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupVaults_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py deleted file mode 100644 index bf7c3a44c58c..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_vaults_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_vaults.get( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupVaults_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py deleted file mode 100644 index 7d58556a05c6..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_vaults_list_by_elastic_account.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_vaults.list_by_elastic_account( - resource_group_name="myRG", - account_name="account1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupVaults_ListByElasticAccount.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py deleted file mode 100644 index bce27f2fd893..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backup_vaults_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backup_vaults.begin_update( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - body={"tags": {"Tag1": "Value1"}}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackupVaults_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py deleted file mode 100644 index 615547dac757..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py +++ /dev/null @@ -1,53 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backups_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backups.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - backup_name="backup1", - body={ - "properties": { - "elasticSnapshotResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1", - "elasticVolumeResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1", - "label": "myLabel", - "snapshotUsage": "UseExistingSnapshot", - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackups_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py deleted file mode 100644 index 97b5f6cc971c..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backups_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_backups.begin_delete( - resource_group_name="resourceGroup", - account_name="account1", - backup_vault_name="backupVault1", - backup_name="backup1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackups_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py deleted file mode 100644 index b3674de3075d..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backups_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backups.get( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - backup_name="backup1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackups_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py deleted file mode 100644 index 48d887584dab..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backups_list_by_vault.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backups.list_by_vault( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackups_ListByVault.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_update.py deleted file mode 100644 index 4f682d173776..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_update.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_backups_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_backups.begin_update( - resource_group_name="myRG", - account_name="account1", - backup_vault_name="backupVault1", - backup_name="backup1", - body={ - "id": "str", - "name": "str", - "properties": { - "elasticVolumeResourceId": "str", - "backupType": "str", - "completionDate": "2020-02-20 00:00:00", - "creationDate": "2020-02-20 00:00:00", - "elasticBackupPolicyResourceId": "str", - "elasticSnapshotResourceId": "str", - "failureReason": "str", - "label": "str", - "provisioningState": "str", - "size": 0, - "snapshotCreationDate": "2020-02-20 00:00:00", - "snapshotUsage": "str", - "volumeSize": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticBackups_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py deleted file mode 100644 index 8fa96a2c7f7f..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_change_zone.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.begin_change_zone( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - body={"newZone": "3"}, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_ChangeZone.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py deleted file mode 100644 index 3b84aaed25b3..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_check_volume_file_path_availability.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.check_volume_file_path_availability( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - body={"filePath": "my-exact-filepath"}, - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py deleted file mode 100644 index c11b335ea947..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - body={ - "location": "eastus", - "properties": { - "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1", - "serviceLevel": "ZoneRedundant", - "size": 4398046511104, - "subnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - }, - "zones": ["1", "2", "3"], - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py deleted file mode 100644 index b5a21bd097ad..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py +++ /dev/null @@ -1,58 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_create_or_update_cmk.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - body={ - "location": "eastus", - "properties": { - "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1", - "encryption": { - "elasticPoolEncryptionKeySource": "NetApp", - "keyVaultPrivateEndpointResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myKeyVault/privateEndpointConnections/myKeyVaultPec", - }, - "serviceLevel": "ZoneRedundant", - "size": 4398046511104, - "subnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - }, - "zones": ["1", "2", "3"], - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_CreateOrUpdateCMK.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py deleted file mode 100644 index ee5c00a4a45b..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_capacity_pools.begin_delete( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py deleted file mode 100644 index 56a7f8b7307b..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.get( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py deleted file mode 100644 index 4a9fd749de00..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_list_by_elastic_account.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.list_by_elastic_account( - resource_group_name="myRG", - account_name="account1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_ListByElasticAccount.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py deleted file mode 100644 index 8937e37665fc..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py +++ /dev/null @@ -1,50 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_capacity_pools_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_capacity_pools.begin_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - body={ - "properties": { - "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1", - "size": 4398046511104, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticCapacityPools_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py deleted file mode 100644 index d75e13e869b4..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshot_policies.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - snapshot_policy_name="snapshotPolicyName", - body={ - "location": "eastus", - "properties": { - "dailySchedule": {"hour": 14, "minute": 30, "snapshotsToKeep": 4}, - "hourlySchedule": {"minute": 50, "snapshotsToKeep": 2}, - "monthlySchedule": {"daysOfMonth": [10, 11, 12], "hour": 14, "minute": 15, "snapshotsToKeep": 5}, - "policyStatus": "Enabled", - "weeklySchedule": {"days": ["Wednesday"], "hour": 14, "minute": 45, "snapshotsToKeep": 3}, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py deleted file mode 100644 index df3cb91fcd45..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_snapshot_policies.begin_delete( - resource_group_name="resourceGroup", - account_name="accountName", - snapshot_policy_name="snapshotPolicyName", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py deleted file mode 100644 index d6aed58e99d4..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshot_policies.get( - resource_group_name="myRG", - account_name="account1", - snapshot_policy_name="snapshotPolicyName", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py deleted file mode 100644 index db6936d7b3d7..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_list_by_elastic_account.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshot_policies.list_by_elastic_account( - resource_group_name="myRG", - account_name="account1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_ListByElasticAccount.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py deleted file mode 100644 index 29079c73553c..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_list_elastic_volumes.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshot_policies.list_elastic_volumes( - resource_group_name="myRG", - account_name="account1", - snapshot_policy_name="snapshotPolicyName", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_ListElasticVolumes.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py deleted file mode 100644 index 512e32909a7b..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshot_policies_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshot_policies.begin_update( - resource_group_name="myRG", - account_name="account1", - snapshot_policy_name="snapshotPolicyName", - body={ - "properties": { - "dailySchedule": {"hour": 14, "minute": 30, "snapshotsToKeep": 4}, - "hourlySchedule": {"minute": 50, "snapshotsToKeep": 2}, - "monthlySchedule": {"daysOfMonth": [10, 11, 12], "hour": 14, "minute": 15, "snapshotsToKeep": 5}, - "policyStatus": "Enabled", - "weeklySchedule": {"days": ["Wednesday"], "hour": 14, "minute": 45, "snapshotsToKeep": 3}, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshotPolicies_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_create_or_update.py deleted file mode 100644 index 0086ab198ce3..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_create_or_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshots_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshots.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - snapshot_name="snapshot1", - body={ - "id": "str", - "name": "str", - "properties": {"provisioningState": "str"}, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshots_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py deleted file mode 100644 index 4425d260dff8..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshots_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_snapshots.begin_delete( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - snapshot_name="snapshot1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshots_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py deleted file mode 100644 index 745c5e19c764..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshots_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshots.get( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - snapshot_name="snapshot1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshots_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py deleted file mode 100644 index 0977a957805d..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_snapshots_list_by_elastic_volume.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_snapshots.list_by_elastic_volume( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticSnapshots_ListByElasticVolume.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py deleted file mode 100644 index b5fe1a2fdb7b..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py +++ /dev/null @@ -1,75 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_volumes.begin_create_or_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - body={ - "location": "eastus", - "properties": { - "dataProtection": { - "backup": { - "elasticBackupPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1", - "elasticBackupVaultResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1", - "policyEnforcement": "Enforced", - }, - "snapshot": { - "snapshotPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1" - }, - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["0.0.0.0/0"], - "nfsv3": "Enabled", - "nfsv4": "Disabled", - "rootAccess": "Disabled", - "ruleIndex": 1, - "unixAccessRule": "ReadOnly", - } - ] - }, - "filePath": "my-unique-file-path", - "protocolTypes": ["NFSv3"], - "size": 107374182400, - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py deleted file mode 100644 index d9cf3749a37a..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.elastic_volumes.begin_delete( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - ).result() - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py deleted file mode 100644 index 7017501b20df..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_volumes.get( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py deleted file mode 100644 index 374f9acbec5f..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_list_by_elastic_pool.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_volumes.list_by_elastic_pool( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_ListByElasticPool.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py deleted file mode 100644 index 354a5f7ba937..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py +++ /dev/null @@ -1,48 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_revert.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_volumes.begin_revert( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - body={ - "snapshotResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1" - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_Revert.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py deleted file mode 100644 index 9e36014a4ba4..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py +++ /dev/null @@ -1,66 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python elastic_volumes_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.elastic_volumes.begin_update( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - body={ - "properties": { - "dataProtection": { - "snapshot": { - "snapshotPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1" - } - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["0.0.0.0/0"], - "nfsv3": "Enabled", - "nfsv4": "Disabled", - "rootAccess": "Disabled", - "ruleIndex": 1, - "unixAccessRule": "ReadOnly", - } - ] - }, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/ElasticVolumes_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py index 66c9f40678a1..6079ddd36123 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/GroupIdListForLDAPUser.json +# x-ms-original-file: 2026-05-01/GroupIdListForLDAPUser.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py index d7d3bcd4874a..940b3412430b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/NetAppResourceQuotaLimitsAccount_Get.json +# x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py index 48f4a7f8dee4..8c0aede9fdc1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/NetAppResourceQuotaLimitsAccount_List.json +# x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py index 1c8a2f5ef54d..27d5686f5aff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/NetAppResourceQuotaLimits_Get.json +# x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py index e64bf10dcaee..afa2fc2e4700 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/NetAppResourceQuotaLimits_List.json +# x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py index 0259d7c4c548..b4cb743e93e9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py @@ -35,12 +35,12 @@ def main(): location="eastus", body={ "networkSiblingSetId": "9760acf5-4638-11e7-9bdb-020073ca3333", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet", + "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet", }, ) print(response) -# x-ms-original-file: 2026-04-15-preview/NetworkSiblingSet_Query.json +# x-ms-original-file: 2026-05-01/NetworkSiblingSet_Query.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py index bab31a781a65..35ddc158f115 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py @@ -37,12 +37,12 @@ def main(): "networkFeatures": "Standard", "networkSiblingSetId": "9760acf5-4638-11e7-9bdb-020073ca3333", "networkSiblingSetStateId": "12345_44420.8001578125", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet", + "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet", }, ).result() print(response) -# x-ms-original-file: 2026-04-15-preview/NetworkSiblingSet_Update.json +# x-ms-original-file: 2026-05-01/NetworkSiblingSet_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py index b6a303ddd510..01c5d9724d16 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/OperationList.json +# x-ms-original-file: 2026-05-01/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py index 8dc8690eccbe..3a928e584c15 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_CreateOrUpdate.json +# x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py index 3ce765e58f02..5e1f1168ca01 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_CreateOrUpdate_CustomThroughput.json +# x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate_CustomThroughput.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py index b78ebf799f06..fcd4237d5827 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Pools_Delete.json +# x-ms-original-file: 2026-05-01/Pools_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py index 18f373529d60..4f3c9a7765d2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_Get.json +# x-ms-original-file: 2026-05-01/Pools_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py index ae109ddb0ce0..a33a2fdd2d3b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_Get_CustomThroughput.json +# x-ms-original-file: 2026-05-01/Pools_Get_CustomThroughput.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py index b1245f09ec54..e0c375898071 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Pools_List.json +# x-ms-original-file: 2026-05-01/Pools_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py index ac9729e4a6a5..0f47d8e5c80f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_Update.json +# x-ms-original-file: 2026-05-01/Pools_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py index fc0b05a4a63d..2e9848342810 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Pools_Update_CustomThroughput.json +# x-ms-original-file: 2026-05-01/Pools_Update_CustomThroughput.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py index 5791e7d3cafe..4e70e7507fea 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/RansomwareReports_ClearSuspects.json +# x-ms-original-file: 2026-05-01/RansomwareReports_ClearSuspects.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py index 748714f93c0c..918f5f24a5ca 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/RansomwareReports_Get.json +# x-ms-original-file: 2026-05-01/RansomwareReports_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py index e65e13f8b6f0..1f9b2cb119ff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/RansomwareReports_List.json +# x-ms-original-file: 2026-05-01/RansomwareReports_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py index 24ea2e3e74ee..2e7911e3e1dd 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/RegionInfo.json +# x-ms-original-file: 2026-05-01/RegionInfo.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py index 4942a428173e..377c4ed70df2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/RegionInfos_Get.json +# x-ms-original-file: 2026-05-01/RegionInfos_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py index 251d59b6ab7d..0b1d8be69853 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/RegionInfos_List.json +# x-ms-original-file: 2026-05-01/RegionInfos_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py index ac89714fa9ff..63d5cefb6808 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_Create.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py index f807f25165c8..b528eb455104 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_Delete.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py index 95ac3b045b19..ad20b50d9055 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_Get.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py index 4879eba525fd..320916fc705d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_List.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py index aa9fcc37eb55..75d6bf1220d2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_ListVolumes.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_ListVolumes.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py index 4ad0e0ab8339..38024c271df2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/SnapshotPolicies_Update.json +# x-ms-original-file: 2026-05-01/SnapshotPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py index f207efc99885..cd51b2326a7c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Snapshots_Create.json +# x-ms-original-file: 2026-05-01/Snapshots_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py index 73f787c9939f..9884648b7c4d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Snapshots_Delete.json +# x-ms-original-file: 2026-05-01/Snapshots_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py index 3ff8aff793cc..0d5e3779f556 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Snapshots_Get.json +# x-ms-original-file: 2026-05-01/Snapshots_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py index 8cbd29f8f506..20fabf6a123c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Snapshots_List.json +# x-ms-original-file: 2026-05-01/Snapshots_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py index 7f81402913df..5de1d49075df 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Snapshots_SingleFileRestore.json +# x-ms-original-file: 2026-05-01/Snapshots_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py index 1a147e27ea82..ffe4b48cf353 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Snapshots_Update.json +# x-ms-original-file: 2026-05-01/Snapshots_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py index c2239206f3a5..3c7df79ff1fe 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Subvolumes_Create.json +# x-ms-original-file: 2026-05-01/Subvolumes_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py index 99a66aa98240..ff107dfe376e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Subvolumes_Delete.json +# x-ms-original-file: 2026-05-01/Subvolumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py index a1eb23ba3b52..28beff2e6fb3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Subvolumes_Get.json +# x-ms-original-file: 2026-05-01/Subvolumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py index b6e3a7ffbf50..02eba5c2999e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Subvolumes_List.json +# x-ms-original-file: 2026-05-01/Subvolumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py index b9138d6dde26..e19ac8c52634 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Subvolumes_Metadata.json +# x-ms-original-file: 2026-05-01/Subvolumes_Metadata.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py index 650a995fab86..4cbf0e4967e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Subvolumes_Update.json +# x-ms-original-file: 2026-05-01/Subvolumes_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py index e730a0db6cb2..ad975144ec9d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Usages_Get.json +# x-ms-original-file: 2026-05-01/Usages_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py index 17a193dd0058..8bce20bbdaaf 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Usages_List.json +# x-ms-original-file: 2026-05-01/Usages_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom.py deleted file mode 100644 index d6d433139e12..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom.py +++ /dev/null @@ -1,464 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volume_groups_create_custom.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volume_groups.begin_create( - resource_group_name="myRG", - account_name="account1", - volume_group_name="group1", - body={ - "location": "westus", - "properties": { - "groupMetaData": { - "applicationIdentifier": "CU2", - "applicationType": "CUSTOM", - "groupDescription": "Volume group", - }, - "volumes": [ - { - "name": "test-cus-data1", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data1", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data1", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data2", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data2", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data2", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data3", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data3", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data3", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data4", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data4", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data4", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data5", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data5", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data5", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data6", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data6", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data6", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data7", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data7", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data7", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data8", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data8", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data8", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data9", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data9", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data9", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data10", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data10", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data10", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data11", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data11", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data11", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data12", - "properties": { - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data12", - "exportPolicy": { - "rules": [ - { - "allowedClients": "0.0.0.0/0", - "cifs": False, - "hasRootAccess": True, - "kerberos5ReadOnly": False, - "kerberos5ReadWrite": False, - "kerberos5iReadOnly": False, - "kerberos5iReadWrite": False, - "kerberos5pReadOnly": False, - "kerberos5pReadWrite": False, - "nfsv3": False, - "nfsv41": True, - "ruleIndex": 1, - "unixReadOnly": True, - "unixReadWrite": True, - } - ] - }, - "protocolTypes": ["NFSv4.1"], - "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data12", - }, - "zones": ["1"], - }, - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Create_Custom.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom_smb.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom_smb.py deleted file mode 100644 index 8fbb2c0adfef..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_custom_smb.py +++ /dev/null @@ -1,284 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volume_groups_create_custom_smb.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volume_groups.begin_create( - resource_group_name="myRG", - account_name="account1", - volume_group_name="group1", - body={ - "location": "westus", - "properties": { - "groupMetaData": { - "applicationIdentifier": "CU2", - "applicationType": "CUSTOM", - "groupDescription": "Volume group", - }, - "volumes": [ - { - "name": "test-cus-data1", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data1", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data1", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data2", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data2", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data2", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data3", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data3", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data3", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data4", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data4", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data4", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data5", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data5", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data5", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data6", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data6", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data6", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data7", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data7", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data7", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data8", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data8", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data8", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data9", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data9", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data9", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data10", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data10", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data10", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data11", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data11", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data11", - }, - "zones": ["1"], - }, - { - "name": "test-cus-data12", - "properties": { - "avsDataStore": "Disabled", - "capacityPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1", - "creationToken": "test-cus-data12", - "protocolTypes": ["CIFS"], - "serviceLevel": "Premium", - "smbAccessBasedEnumeration": "Disabled", - "smbContinuouslyAvailable": False, - "smbEncryption": False, - "smbNonBrowsable": "Disabled", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", - "throughputMibps": 10, - "usageThreshold": 107374182400, - "volumeSpecName": "cus-data12", - }, - "zones": ["1"], - }, - ], - }, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Create_Custom_SMB.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py index 14a933e11707..48ee37f34ea0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py @@ -459,6 +459,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Create_Oracle.json +# x-ms-original-file: 2026-05-01/VolumeGroups_Create_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py index e54c078370c7..3e8e7797ca5e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py @@ -221,6 +221,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Create_SapHana.json +# x-ms-original-file: 2026-05-01/VolumeGroups_Create_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py index 78258495627e..e7d162f18dd2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Delete.json +# x-ms-original-file: 2026-05-01/VolumeGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom.py deleted file mode 100644 index e64bdbf9b8ab..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volume_groups_get_custom.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volume_groups.get( - resource_group_name="myRG", - account_name="account1", - volume_group_name="group1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Get_Custom.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom_smb.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom_smb.py deleted file mode 100644 index 1c95ea0c4e96..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_custom_smb.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volume_groups_get_custom_smb.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volume_groups.get( - resource_group_name="myRG", - account_name="account1", - volume_group_name="group1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Get_Custom_SMB.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py index 2c6851756b1a..fcd0d4a510e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Get_Oracle.json +# x-ms-original-file: 2026-05-01/VolumeGroups_Get_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py index 66f416eca3d5..a06c9e02a0a0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_Get_SapHana.json +# x-ms-original-file: 2026-05-01/VolumeGroups_Get_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_custom.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_custom.py deleted file mode 100644 index fb68e5f1fdfe..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volume_groups_list_custom.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volume_groups.list_by_net_app_account( - resource_group_name="myRG", - account_name="account1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_List_Custom.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py index 245a798fd563..6303a2bdd97e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_List_Oracle.json +# x-ms-original-file: 2026-05-01/VolumeGroups_List_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py index 418c26c7d5c9..7033f001b9c1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/VolumeGroups_List_SapHana.json +# x-ms-original-file: 2026-05-01/VolumeGroups_List_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py index feb34ab62a34..83e39046759f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeQuotaRules_Create.json +# x-ms-original-file: 2026-05-01/VolumeQuotaRules_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py index f522471ac60b..5e29fa4983dc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/VolumeQuotaRules_Delete.json +# x-ms-original-file: 2026-05-01/VolumeQuotaRules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py index 27dbb4bb484b..998e7f2a2597 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeQuotaRules_Get.json +# x-ms-original-file: 2026-05-01/VolumeQuotaRules_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py index e548ab0395aa..8a2ca508e5a5 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/VolumeQuotaRules_List.json +# x-ms-original-file: 2026-05-01/VolumeQuotaRules_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py index 8f26a7fdd374..8c7ca8261296 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/VolumeQuotaRules_Update.json +# x-ms-original-file: 2026-05-01/VolumeQuotaRules_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py index 0f92e23ec1f2..bfdc095875e7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_AuthorizeExternalReplication.json +# x-ms-original-file: 2026-05-01/Volumes_AuthorizeExternalReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py index c99eb79789c8..9512f5d6e699 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_AuthorizeReplication.json +# x-ms-original-file: 2026-05-01/Volumes_AuthorizeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py index 14f9cd0925e1..1de0041903f2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_BreakFileLocks.json +# x-ms-original-file: 2026-05-01/Volumes_BreakFileLocks.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py index 5329a1041c9d..ea142d575019 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_BreakReplication.json +# x-ms-original-file: 2026-05-01/Volumes_BreakReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py index 3b9edfd13aab..52dea7287864 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py @@ -41,7 +41,7 @@ def main(): "properties": { "creationToken": "my-unique-file-path", "serviceLevel": "Premium", - "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", + "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3", "usageThreshold": 107374182400, }, }, @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_CreateOrUpdate.json +# x-ms-original-file: 2026-05-01/Volumes_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py index e18c8f363c9b..a53fd99d5c10 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_Delete.json +# x-ms-original-file: 2026-05-01/Volumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py index f2e05910e17a..2c7d0ef7c807 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_DeleteReplication.json +# x-ms-original-file: 2026-05-01/Volumes_DeleteReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py deleted file mode 100644 index c84fa87554b4..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volumes_extra_large_volumes_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volumes.get( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - volume_name="volume1", - ) - print(response) - - -# x-ms-original-file: 2026-04-15-preview/Volumes_ExtraLargeVolumes_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py deleted file mode 100644 index d7ac1022a159..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.netapp import NetAppManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-netapp -# USAGE - python volumes_extra_large_volumes_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = NetAppManagementClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.volumes.list( - resource_group_name="myRG", - account_name="account1", - pool_name="pool1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-04-15-preview/Volumes_ExtraLargeVolumes_List.json -if __name__ == "__main__": - main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py index a2027c662ba6..538971074bde 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_FinalizeExternalReplication.json +# x-ms-original-file: 2026-05-01/Volumes_FinalizeExternalReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py index 3bba9cd02b10..82042cc17443 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_FinalizeRelocation.json +# x-ms-original-file: 2026-05-01/Volumes_FinalizeRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py index 273369e9ee9c..bdbb94d68b65 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_Get.json +# x-ms-original-file: 2026-05-01/Volumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py index 1ec80d68345e..e38891d62f24 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_LatestBackupStatus.json +# x-ms-original-file: 2026-05-01/Volumes_LatestBackupStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py index c3e19700077a..1c570646bcb6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_LatestRestoreStatus.json +# x-ms-original-file: 2026-05-01/Volumes_LatestRestoreStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py index 8d5c6d5b1265..97b0987e8294 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Volumes_List.json +# x-ms-original-file: 2026-05-01/Volumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py index f486574151e1..9509beb958fe 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_ListQuotaReport.json +# x-ms-original-file: 2026-05-01/Volumes_ListQuotaReport.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py index 1c5171a23a67..e141defc67af 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: 2026-04-15-preview/Volumes_ListReplications.json +# x-ms-original-file: 2026-05-01/Volumes_ListReplications.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py index ca157510883a..963339b5240c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_PeerExternalCluster.json +# x-ms-original-file: 2026-05-01/Volumes_PeerExternalCluster.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py index b620b23a7003..ecc87b4d939c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_PerformReplicationTransfer.json +# x-ms-original-file: 2026-05-01/Volumes_PerformReplicationTransfer.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py index b0b0dc65a38f..92c472cc7ab5 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_PoolChange.json +# x-ms-original-file: 2026-05-01/Volumes_PoolChange.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py index 8c49ca6f8a5d..9e07aa3e0e25 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_PopulateAvailabilityZones.json +# x-ms-original-file: 2026-05-01/Volumes_PopulateAvailabilityZones.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py index 10d557490ae6..c187a3895051 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_ReInitializeReplication.json +# x-ms-original-file: 2026-05-01/Volumes_ReInitializeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py index 6a1cea80fb9d..9c65a6c13d6a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_ReestablishReplication.json +# x-ms-original-file: 2026-05-01/Volumes_ReestablishReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py index 10788c9a8bf8..b2d2e1c55ca7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_Relocate.json +# x-ms-original-file: 2026-05-01/Volumes_Relocate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py index a027c7605393..d139950cd01a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_ReplicationStatus.json +# x-ms-original-file: 2026-05-01/Volumes_ReplicationStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py index 09d7525ec823..08df16012249 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_ResetCifsPassword.json +# x-ms-original-file: 2026-05-01/Volumes_ResetCifsPassword.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py index 2add281dd76a..283d34f2d7be 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_ResyncReplication.json +# x-ms-original-file: 2026-05-01/Volumes_ResyncReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py index b9674764e3a1..e9555011dc88 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_Revert.json +# x-ms-original-file: 2026-05-01/Volumes_Revert.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py index 1c636d5ac5c9..6f2bde2894a2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-04-15-preview/Volumes_RevertRelocation.json +# x-ms-original-file: 2026-05-01/Volumes_RevertRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py index edad96825293..e98c0056977b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_SplitClone.json +# x-ms-original-file: 2026-05-01/Volumes_SplitClone.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py index 2b76b9546a38..9d7054b75559 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py @@ -89,6 +89,6 @@ def main(): print(response) -# x-ms-original-file: 2026-04-15-preview/Volumes_Update.json +# x-ms-original-file: 2026-05-01/Volumes_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py index d81906bd223b..cfc07091c547 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py @@ -86,30 +86,6 @@ def test_accounts_begin_create_or_update(self, resource_group): "status": "str", }, }, - "entraIdConfig": { - "applicationId": "str", - "domain": "str", - "serverNamePrefix": "str", - "entraIdAkvConfig": { - "azureKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - }, - "ldapConfiguration": { - "bindAuthenticationLevel": "str", - "bindDN": "str", - "bindPasswordAkvConfig": { - "azureKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, - "certificateCNHost": "str", - "domain": "str", - "ldapOverTLS": bool, - "ldapServers": ["str"], - "serverCACertificate": "str", - }, "multiAdStatus": "str", "nfsV4IDDomain": "str", "provisioningState": "str", @@ -137,12 +113,15 @@ def test_accounts_begin_update(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={ + "id": "str", "identity": { "type": "str", "principalId": "str", "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "location": "str", + "name": "str", "properties": { "activeDirectories": [ { @@ -171,6 +150,7 @@ def test_accounts_begin_update(self, resource_group): "username": "str", } ], + "disableShowmount": bool, "encryption": { "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "str", @@ -182,33 +162,12 @@ def test_accounts_begin_update(self, resource_group): "status": "str", }, }, - "entraIdConfig": { - "applicationId": "str", - "domain": "str", - "entraIdAkvConfig": { - "azureKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "serverNamePrefix": "str", - }, - "ldapConfiguration": { - "bindAuthenticationLevel": "str", - "bindDN": "str", - "bindPasswordAkvConfig": { - "azureKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, - "certificateCNHost": "str", - "domain": "str", - "ldapOverTLS": bool, - "ldapServers": ["str"], - "serverCACertificate": "str", - }, + "multiAdStatus": "str", "nfsV4IDDomain": "str", + "provisioningState": "str", }, "tags": {"str": "str"}, + "type": "str", }, ).result() # call '.result()' to poll until service return final result @@ -287,14 +246,3 @@ def test_accounts_begin_change_key_vault(self, resource_group): # please add some check logic here by yourself # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_accounts_begin_refresh_ldap_bind_password(self, resource_group): - response = self.client.accounts.begin_refresh_ldap_bind_password( - resource_group_name=resource_group.name, - account_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py index f63e9b7b5e25..2eeec0aab482 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py @@ -92,30 +92,6 @@ async def test_accounts_begin_create_or_update(self, resource_group): "status": "str", }, }, - "entraIdConfig": { - "applicationId": "str", - "domain": "str", - "serverNamePrefix": "str", - "entraIdAkvConfig": { - "azureKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - }, - "ldapConfiguration": { - "bindAuthenticationLevel": "str", - "bindDN": "str", - "bindPasswordAkvConfig": { - "azureKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, - "certificateCNHost": "str", - "domain": "str", - "ldapOverTLS": bool, - "ldapServers": ["str"], - "serverCACertificate": "str", - }, "multiAdStatus": "str", "nfsV4IDDomain": "str", "provisioningState": "str", @@ -145,12 +121,15 @@ async def test_accounts_begin_update(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={ + "id": "str", "identity": { "type": "str", "principalId": "str", "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "location": "str", + "name": "str", "properties": { "activeDirectories": [ { @@ -179,6 +158,7 @@ async def test_accounts_begin_update(self, resource_group): "username": "str", } ], + "disableShowmount": bool, "encryption": { "identity": { "federatedClientId": "str", @@ -194,33 +174,12 @@ async def test_accounts_begin_update(self, resource_group): "status": "str", }, }, - "entraIdConfig": { - "applicationId": "str", - "domain": "str", - "entraIdAkvConfig": { - "azureKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "serverNamePrefix": "str", - }, - "ldapConfiguration": { - "bindAuthenticationLevel": "str", - "bindDN": "str", - "bindPasswordAkvConfig": { - "azureKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, - "certificateCNHost": "str", - "domain": "str", - "ldapOverTLS": bool, - "ldapServers": ["str"], - "serverCACertificate": "str", - }, + "multiAdStatus": "str", "nfsV4IDDomain": "str", + "provisioningState": "str", }, "tags": {"str": "str"}, + "type": "str", }, ) ).result() # call '.result()' to poll until service return final result @@ -310,16 +269,3 @@ async def test_accounts_begin_change_key_vault(self, resource_group): # please add some check logic here by yourself # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_accounts_begin_refresh_ldap_bind_password(self, resource_group): - response = await ( - await self.client.accounts.begin_refresh_ldap_bind_password( - resource_group_name=resource_group.name, - account_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py deleted file mode 100644 index 97f9bd69acea..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementActiveDirectoryConfigsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_get(self, resource_group): - response = self.client.active_directory_configs.get( - resource_group_name=resource_group.name, - active_directory_config_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_begin_create_or_update(self, resource_group): - response = self.client.active_directory_configs.begin_create_or_update( - resource_group_name=resource_group.name, - active_directory_config_name="str", - body={ - "location": "str", - "etag": "str", - "id": "str", - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "name": "str", - "properties": { - "domain": "str", - "secretPassword": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, - "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"}, - }, - "site": "str", - "activeDirectoryStatus": "str", - "administrators": ["str"], - "backupOperators": ["str"], - "dns": ["str"], - "organizationalUnit": "str", - "provisioningState": "str", - "securityOperators": ["str"], - "smbServerName": "str", - "userName": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_begin_update(self, resource_group): - response = self.client.active_directory_configs.begin_update( - resource_group_name=resource_group.name, - active_directory_config_name="str", - body={ - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "properties": { - "administrators": ["str"], - "backupOperators": ["str"], - "dns": ["str"], - "domain": "str", - "organizationalUnit": "str", - "secretPassword": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, - "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"}, - }, - "securityOperators": ["str"], - "site": "str", - "smbServerName": "str", - "userName": "str", - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_begin_delete(self, resource_group): - response = self.client.active_directory_configs.begin_delete( - resource_group_name=resource_group.name, - active_directory_config_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_list_by_resource_group(self, resource_group): - response = self.client.active_directory_configs.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_active_directory_configs_list_by_subscription(self, resource_group): - response = self.client.active_directory_configs.list_by_subscription() - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py deleted file mode 100644 index f51c4b09ae4c..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementActiveDirectoryConfigsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_get(self, resource_group): - response = await self.client.active_directory_configs.get( - resource_group_name=resource_group.name, - active_directory_config_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_begin_create_or_update(self, resource_group): - response = await ( - await self.client.active_directory_configs.begin_create_or_update( - resource_group_name=resource_group.name, - active_directory_config_name="str", - body={ - "location": "str", - "etag": "str", - "id": "str", - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "name": "str", - "properties": { - "domain": "str", - "secretPassword": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, - "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"}, - }, - "site": "str", - "activeDirectoryStatus": "str", - "administrators": ["str"], - "backupOperators": ["str"], - "dns": ["str"], - "organizationalUnit": "str", - "provisioningState": "str", - "securityOperators": ["str"], - "smbServerName": "str", - "userName": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_begin_update(self, resource_group): - response = await ( - await self.client.active_directory_configs.begin_update( - resource_group_name=resource_group.name, - active_directory_config_name="str", - body={ - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "properties": { - "administrators": ["str"], - "backupOperators": ["str"], - "dns": ["str"], - "domain": "str", - "organizationalUnit": "str", - "secretPassword": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, - "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"}, - }, - "securityOperators": ["str"], - "site": "str", - "smbServerName": "str", - "userName": "str", - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_begin_delete(self, resource_group): - response = await ( - await self.client.active_directory_configs.begin_delete( - resource_group_name=resource_group.name, - active_directory_config_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_list_by_resource_group(self, resource_group): - response = self.client.active_directory_configs.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_active_directory_configs_list_by_subscription(self, resource_group): - response = self.client.active_directory_configs.list_by_subscription() - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py index b53eb57ce51b..06d0980b940f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py @@ -46,16 +46,8 @@ def test_buckets_begin_create_or_update(self, resource_group): "name": "str", "properties": { "akvDetails": { - "certificateAkvDetails": { - "certificateKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "credentialsAkvDetails": { - "credentialsKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, + "certificateAkvDetails": {"certificateKeyVaultUri": "str", "certificateName": "str"}, + "credentialsAkvDetails": {"credentialsKeyVaultUri": "str", "secretName": "str"}, }, "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}}, "path": "str", @@ -100,16 +92,8 @@ def test_buckets_begin_update(self, resource_group): "name": "str", "properties": { "akvDetails": { - "certificateAkvDetails": { - "certificateKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "credentialsAkvDetails": { - "credentialsKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, + "certificateAkvDetails": {"certificateKeyVaultUri": "str", "certificateName": "str"}, + "credentialsAkvDetails": {"credentialsKeyVaultUri": "str", "secretName": "str"}, }, "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}}, "permissions": "str", diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py index b2b3488eae8a..a416510b68d9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py @@ -48,16 +48,8 @@ async def test_buckets_begin_create_or_update(self, resource_group): "name": "str", "properties": { "akvDetails": { - "certificateAkvDetails": { - "certificateKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "credentialsAkvDetails": { - "credentialsKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, + "certificateAkvDetails": {"certificateKeyVaultUri": "str", "certificateName": "str"}, + "credentialsAkvDetails": {"credentialsKeyVaultUri": "str", "secretName": "str"}, }, "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}}, "path": "str", @@ -104,16 +96,8 @@ async def test_buckets_begin_update(self, resource_group): "name": "str", "properties": { "akvDetails": { - "certificateAkvDetails": { - "certificateKeyVaultUri": "str", - "certificateName": "str", - "userAssignedIdentity": "str", - }, - "credentialsAkvDetails": { - "credentialsKeyVaultUri": "str", - "secretName": "str", - "userAssignedIdentity": "str", - }, + "certificateAkvDetails": {"certificateKeyVaultUri": "str", "certificateName": "str"}, + "credentialsAkvDetails": {"credentialsKeyVaultUri": "str", "secretName": "str"}, }, "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}}, "permissions": "str", diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py deleted file mode 100644 index 8c04a6f2050a..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticAccountsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_get(self, resource_group): - response = self.client.elastic_accounts.get( - resource_group_name=resource_group.name, - account_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_begin_create_or_update(self, resource_group): - response = self.client.elastic_accounts.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "name": "str", - "properties": { - "encryption": { - "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, - "keySource": "str", - "keyVaultProperties": { - "keyName": "str", - "keyVaultResourceId": "str", - "keyVaultUri": "str", - "status": "str", - }, - }, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_begin_update(self, resource_group): - response = self.client.elastic_accounts.begin_update( - resource_group_name=resource_group.name, - account_name="str", - body={ - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "properties": { - "encryption": { - "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, - "keySource": "str", - "keyVaultProperties": { - "keyName": "str", - "keyVaultResourceId": "str", - "keyVaultUri": "str", - "status": "str", - }, - } - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_begin_delete(self, resource_group): - response = self.client.elastic_accounts.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_list_by_resource_group(self, resource_group): - response = self.client.elastic_accounts.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_accounts_list_by_subscription(self, resource_group): - response = self.client.elastic_accounts.list_by_subscription() - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py deleted file mode 100644 index f70e3d724df8..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticAccountsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_get(self, resource_group): - response = await self.client.elastic_accounts.get( - resource_group_name=resource_group.name, - account_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_accounts.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "name": "str", - "properties": { - "encryption": { - "identity": { - "federatedClientId": "str", - "principalId": "str", - "userAssignedIdentity": "str", - }, - "keySource": "str", - "keyVaultProperties": { - "keyName": "str", - "keyVaultResourceId": "str", - "keyVaultUri": "str", - "status": "str", - }, - }, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_begin_update(self, resource_group): - response = await ( - await self.client.elastic_accounts.begin_update( - resource_group_name=resource_group.name, - account_name="str", - body={ - "identity": { - "type": "str", - "principalId": "str", - "tenantId": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, - }, - "properties": { - "encryption": { - "identity": { - "federatedClientId": "str", - "principalId": "str", - "userAssignedIdentity": "str", - }, - "keySource": "str", - "keyVaultProperties": { - "keyName": "str", - "keyVaultResourceId": "str", - "keyVaultUri": "str", - "status": "str", - }, - } - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_accounts.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_list_by_resource_group(self, resource_group): - response = self.client.elastic_accounts.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_accounts_list_by_subscription(self, resource_group): - response = self.client.elastic_accounts.list_by_subscription() - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py deleted file mode 100644 index 2a5975f76da1..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupPoliciesOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_policies_get(self, resource_group): - response = self.client.elastic_backup_policies.get( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_policies_begin_create_or_update(self, resource_group): - response = self.client.elastic_backup_policies.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "assignedVolumesCount": 0, - "dailyBackupsToKeep": 0, - "monthlyBackupsToKeep": 0, - "policyState": "str", - "provisioningState": "str", - "weeklyBackupsToKeep": 0, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_policies_begin_update(self, resource_group): - response = self.client.elastic_backup_policies.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - body={ - "properties": { - "dailyBackupsToKeep": 0, - "monthlyBackupsToKeep": 0, - "policyState": "str", - "weeklyBackupsToKeep": 0, - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_policies_begin_delete(self, resource_group): - response = self.client.elastic_backup_policies.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_policies_list_by_elastic_account(self, resource_group): - response = self.client.elastic_backup_policies.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py deleted file mode 100644 index c3111a40262a..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupPoliciesOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_policies_get(self, resource_group): - response = await self.client.elastic_backup_policies.get( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_policies_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_backup_policies.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "assignedVolumesCount": 0, - "dailyBackupsToKeep": 0, - "monthlyBackupsToKeep": 0, - "policyState": "str", - "provisioningState": "str", - "weeklyBackupsToKeep": 0, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_policies_begin_update(self, resource_group): - response = await ( - await self.client.elastic_backup_policies.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - body={ - "properties": { - "dailyBackupsToKeep": 0, - "monthlyBackupsToKeep": 0, - "policyState": "str", - "weeklyBackupsToKeep": 0, - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_policies_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_backup_policies.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_policy_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_policies_list_by_elastic_account(self, resource_group): - response = self.client.elastic_backup_policies.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py deleted file mode 100644 index 89de70ca5ea6..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupVaultsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_vaults_get(self, resource_group): - response = self.client.elastic_backup_vaults.get( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_vaults_begin_create_or_update(self, resource_group): - response = self.client.elastic_backup_vaults.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": {"provisioningState": "str"}, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_vaults_begin_update(self, resource_group): - response = self.client.elastic_backup_vaults.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - body={"tags": {"str": "str"}}, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_vaults_begin_delete(self, resource_group): - response = self.client.elastic_backup_vaults.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backup_vaults_list_by_elastic_account(self, resource_group): - response = self.client.elastic_backup_vaults.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py deleted file mode 100644 index 432076357ee9..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupVaultsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_vaults_get(self, resource_group): - response = await self.client.elastic_backup_vaults.get( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_vaults_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_backup_vaults.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": {"provisioningState": "str"}, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_vaults_begin_update(self, resource_group): - response = await ( - await self.client.elastic_backup_vaults.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - body={"tags": {"str": "str"}}, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_vaults_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_backup_vaults.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backup_vaults_list_by_elastic_account(self, resource_group): - response = self.client.elastic_backup_vaults.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py deleted file mode 100644 index aca78bdf7488..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backups_get(self, resource_group): - response = self.client.elastic_backups.get( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backups_begin_create_or_update(self, resource_group): - response = self.client.elastic_backups.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - body={ - "id": "str", - "name": "str", - "properties": { - "elasticVolumeResourceId": "str", - "backupType": "str", - "completionDate": "2020-02-20 00:00:00", - "creationDate": "2020-02-20 00:00:00", - "elasticBackupPolicyResourceId": "str", - "elasticSnapshotResourceId": "str", - "failureReason": "str", - "label": "str", - "provisioningState": "str", - "size": 0, - "snapshotCreationDate": "2020-02-20 00:00:00", - "snapshotUsage": "str", - "volumeSize": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backups_begin_update(self, resource_group): - response = self.client.elastic_backups.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - body={ - "id": "str", - "name": "str", - "properties": { - "elasticVolumeResourceId": "str", - "backupType": "str", - "completionDate": "2020-02-20 00:00:00", - "creationDate": "2020-02-20 00:00:00", - "elasticBackupPolicyResourceId": "str", - "elasticSnapshotResourceId": "str", - "failureReason": "str", - "label": "str", - "provisioningState": "str", - "size": 0, - "snapshotCreationDate": "2020-02-20 00:00:00", - "snapshotUsage": "str", - "volumeSize": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backups_begin_delete(self, resource_group): - response = self.client.elastic_backups.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_backups_list_by_vault(self, resource_group): - response = self.client.elastic_backups.list_by_vault( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py deleted file mode 100644 index 9449eb50fcc7..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticBackupsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backups_get(self, resource_group): - response = await self.client.elastic_backups.get( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backups_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_backups.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - body={ - "id": "str", - "name": "str", - "properties": { - "elasticVolumeResourceId": "str", - "backupType": "str", - "completionDate": "2020-02-20 00:00:00", - "creationDate": "2020-02-20 00:00:00", - "elasticBackupPolicyResourceId": "str", - "elasticSnapshotResourceId": "str", - "failureReason": "str", - "label": "str", - "provisioningState": "str", - "size": 0, - "snapshotCreationDate": "2020-02-20 00:00:00", - "snapshotUsage": "str", - "volumeSize": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backups_begin_update(self, resource_group): - response = await ( - await self.client.elastic_backups.begin_update( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - body={ - "id": "str", - "name": "str", - "properties": { - "elasticVolumeResourceId": "str", - "backupType": "str", - "completionDate": "2020-02-20 00:00:00", - "creationDate": "2020-02-20 00:00:00", - "elasticBackupPolicyResourceId": "str", - "elasticSnapshotResourceId": "str", - "failureReason": "str", - "label": "str", - "provisioningState": "str", - "size": 0, - "snapshotCreationDate": "2020-02-20 00:00:00", - "snapshotUsage": "str", - "volumeSize": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backups_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_backups.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - backup_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_backups_list_by_vault(self, resource_group): - response = self.client.elastic_backups.list_by_vault( - resource_group_name=resource_group.name, - account_name="str", - backup_vault_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py deleted file mode 100644 index e07a93fc8f9d..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticCapacityPoolsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_get(self, resource_group): - response = self.client.elastic_capacity_pools.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_begin_create_or_update(self, resource_group): - response = self.client.elastic_capacity_pools.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "serviceLevel": "str", - "size": 0, - "subnetResourceId": "str", - "activeDirectoryConfigResourceId": "str", - "availabilityStatus": "str", - "currentZone": "str", - "encryption": {"elasticPoolEncryptionKeySource": "str", "keyVaultPrivateEndpointResourceId": "str"}, - "provisioningState": "str", - "totalThroughputMibps": 0.0, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - "zones": ["str"], - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_begin_update(self, resource_group): - response = self.client.elastic_capacity_pools.begin_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={ - "properties": { - "activeDirectoryConfigResourceId": "str", - "encryption": {"elasticPoolEncryptionKeySource": "str", "keyVaultPrivateEndpointResourceId": "str"}, - "size": 0, - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_begin_delete(self, resource_group): - response = self.client.elastic_capacity_pools.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_list_by_elastic_account(self, resource_group): - response = self.client.elastic_capacity_pools.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_begin_change_zone(self, resource_group): - response = self.client.elastic_capacity_pools.begin_change_zone( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={"newZone": "str"}, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_capacity_pools_check_volume_file_path_availability(self, resource_group): - response = self.client.elastic_capacity_pools.check_volume_file_path_availability( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={"filePath": "str"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py deleted file mode 100644 index 464803929ce1..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticCapacityPoolsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_get(self, resource_group): - response = await self.client.elastic_capacity_pools.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_capacity_pools.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "serviceLevel": "str", - "size": 0, - "subnetResourceId": "str", - "activeDirectoryConfigResourceId": "str", - "availabilityStatus": "str", - "currentZone": "str", - "encryption": { - "elasticPoolEncryptionKeySource": "str", - "keyVaultPrivateEndpointResourceId": "str", - }, - "provisioningState": "str", - "totalThroughputMibps": 0.0, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - "zones": ["str"], - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_begin_update(self, resource_group): - response = await ( - await self.client.elastic_capacity_pools.begin_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={ - "properties": { - "activeDirectoryConfigResourceId": "str", - "encryption": { - "elasticPoolEncryptionKeySource": "str", - "keyVaultPrivateEndpointResourceId": "str", - }, - "size": 0, - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_capacity_pools.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_list_by_elastic_account(self, resource_group): - response = self.client.elastic_capacity_pools.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_begin_change_zone(self, resource_group): - response = await ( - await self.client.elastic_capacity_pools.begin_change_zone( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={"newZone": "str"}, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_capacity_pools_check_volume_file_path_availability(self, resource_group): - response = await self.client.elastic_capacity_pools.check_volume_file_path_availability( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - body={"filePath": "str"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py deleted file mode 100644 index 786cf72f5f52..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticSnapshotPoliciesOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_get(self, resource_group): - response = self.client.elastic_snapshot_policies.get( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_begin_create_or_update(self, resource_group): - response = self.client.elastic_snapshot_policies.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0}, - "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "policyStatus": "str", - "provisioningState": "str", - "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_begin_update(self, resource_group): - response = self.client.elastic_snapshot_policies.begin_update( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - body={ - "properties": { - "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0}, - "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "policyStatus": "str", - "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_begin_delete(self, resource_group): - response = self.client.elastic_snapshot_policies.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_list_by_elastic_account(self, resource_group): - response = self.client.elastic_snapshot_policies.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshot_policies_list_elastic_volumes(self, resource_group): - response = self.client.elastic_snapshot_policies.list_elastic_volumes( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py deleted file mode 100644 index c891e271a4be..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticSnapshotPoliciesOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_get(self, resource_group): - response = await self.client.elastic_snapshot_policies.get( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_snapshot_policies.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0}, - "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "policyStatus": "str", - "provisioningState": "str", - "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_begin_update(self, resource_group): - response = await ( - await self.client.elastic_snapshot_policies.begin_update( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - body={ - "properties": { - "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0}, - "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - "policyStatus": "str", - "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0}, - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_snapshot_policies.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_list_by_elastic_account(self, resource_group): - response = self.client.elastic_snapshot_policies.list_by_elastic_account( - resource_group_name=resource_group.name, - account_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshot_policies_list_elastic_volumes(self, resource_group): - response = self.client.elastic_snapshot_policies.list_elastic_volumes( - resource_group_name=resource_group.name, - account_name="str", - snapshot_policy_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py deleted file mode 100644 index 9ec309a1ac18..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticSnapshotsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshots_get(self, resource_group): - response = self.client.elastic_snapshots.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshots_begin_create_or_update(self, resource_group): - response = self.client.elastic_snapshots.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - body={ - "id": "str", - "name": "str", - "properties": {"provisioningState": "str"}, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshots_begin_delete(self, resource_group): - response = self.client.elastic_snapshots.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_snapshots_list_by_elastic_volume(self, resource_group): - response = self.client.elastic_snapshots.list_by_elastic_volume( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py deleted file mode 100644 index b191f7f9e9c9..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticSnapshotsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshots_get(self, resource_group): - response = await self.client.elastic_snapshots.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshots_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_snapshots.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - body={ - "id": "str", - "name": "str", - "properties": {"provisioningState": "str"}, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshots_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_snapshots.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - snapshot_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_snapshots_list_by_elastic_volume(self, resource_group): - response = self.client.elastic_snapshots.list_by_elastic_volume( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py deleted file mode 100644 index 89d83270afc8..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticVolumesOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_get(self, resource_group): - response = self.client.elastic_volumes.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_begin_create_or_update(self, resource_group): - response = self.client.elastic_volumes.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "filePath": "str", - "protocolTypes": ["str"], - "size": 0, - "availabilityStatus": "str", - "backupResourceId": "str", - "dataProtection": { - "backup": { - "elasticBackupPolicyResourceId": "str", - "elasticBackupVaultResourceId": "str", - "policyEnforcement": "str", - }, - "snapshot": {"snapshotPolicyResourceId": "str"}, - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["str"], - "nfsv3": "str", - "nfsv4": "str", - "rootAccess": "str", - "ruleIndex": 0, - "unixAccessRule": "str", - } - ] - }, - "mountTargets": [{"ipAddress": "str", "smbServerFqdn": "str"}], - "provisioningState": "str", - "restorationState": "str", - "smbProperties": {"smbEncryption": "str"}, - "snapshotDirectoryVisibility": "str", - "snapshotResourceId": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - "zones": ["str"], - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_begin_update(self, resource_group): - response = self.client.elastic_volumes.begin_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={ - "properties": { - "dataProtection": { - "backup": { - "elasticBackupPolicyResourceId": "str", - "elasticBackupVaultResourceId": "str", - "policyEnforcement": "str", - }, - "snapshot": {"snapshotPolicyResourceId": "str"}, - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["str"], - "nfsv3": "str", - "nfsv4": "str", - "rootAccess": "str", - "ruleIndex": 0, - "unixAccessRule": "str", - } - ] - }, - "size": 0, - "smbProperties": {"smbEncryption": "str"}, - "snapshotDirectoryVisibility": "str", - }, - "tags": {"str": "str"}, - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_begin_delete(self, resource_group): - response = self.client.elastic_volumes.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_list_by_elastic_pool(self, resource_group): - response = self.client.elastic_volumes.list_by_elastic_pool( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_elastic_volumes_begin_revert(self, resource_group): - response = self.client.elastic_volumes.begin_revert( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={"snapshotResourceId": "str"}, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py deleted file mode 100644 index 0e7a23ba2dde..000000000000 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.netapp.aio import NetAppManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNetAppManagementElasticVolumesOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_get(self, resource_group): - response = await self.client.elastic_volumes.get( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_begin_create_or_update(self, resource_group): - response = await ( - await self.client.elastic_volumes.begin_create_or_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={ - "location": "str", - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "filePath": "str", - "protocolTypes": ["str"], - "size": 0, - "availabilityStatus": "str", - "backupResourceId": "str", - "dataProtection": { - "backup": { - "elasticBackupPolicyResourceId": "str", - "elasticBackupVaultResourceId": "str", - "policyEnforcement": "str", - }, - "snapshot": {"snapshotPolicyResourceId": "str"}, - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["str"], - "nfsv3": "str", - "nfsv4": "str", - "rootAccess": "str", - "ruleIndex": 0, - "unixAccessRule": "str", - } - ] - }, - "mountTargets": [{"ipAddress": "str", "smbServerFqdn": "str"}], - "provisioningState": "str", - "restorationState": "str", - "smbProperties": {"smbEncryption": "str"}, - "snapshotDirectoryVisibility": "str", - "snapshotResourceId": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - "zones": ["str"], - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_begin_update(self, resource_group): - response = await ( - await self.client.elastic_volumes.begin_update( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={ - "properties": { - "dataProtection": { - "backup": { - "elasticBackupPolicyResourceId": "str", - "elasticBackupVaultResourceId": "str", - "policyEnforcement": "str", - }, - "snapshot": {"snapshotPolicyResourceId": "str"}, - }, - "exportPolicy": { - "rules": [ - { - "allowedClients": ["str"], - "nfsv3": "str", - "nfsv4": "str", - "rootAccess": "str", - "ruleIndex": 0, - "unixAccessRule": "str", - } - ] - }, - "size": 0, - "smbProperties": {"smbEncryption": "str"}, - "snapshotDirectoryVisibility": "str", - }, - "tags": {"str": "str"}, - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_begin_delete(self, resource_group): - response = await ( - await self.client.elastic_volumes.begin_delete( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_list_by_elastic_pool(self, resource_group): - response = self.client.elastic_volumes.list_by_elastic_pool( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_elastic_volumes_begin_revert(self, resource_group): - response = await ( - await self.client.elastic_volumes.begin_revert( - resource_group_name=resource_group.name, - account_name="str", - pool_name="str", - volume_name="str", - body={"snapshotResourceId": "str"}, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py index fa7b11b561e5..454365782c9f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py @@ -62,6 +62,7 @@ def test_volume_groups_begin_create(self, resource_group): "backupId": "str", "baremetalTenantId": "str", "breakthroughMode": "str", + "breakthroughModeOld": "str", "capacityPoolResourceId": "str", "cloneProgress": 0, "coolAccess": bool, @@ -138,10 +139,7 @@ def test_volume_groups_begin_create(self, resource_group): "isRestoring": bool, "kerberosEnabled": bool, "keyVaultPrivateEndpointResourceId": "str", - "language": "str", - "largeVolumeType": "str", "ldapEnabled": bool, - "ldapServerType": "str", "maximumNumberOfFiles": 0, "mountTargets": [ { diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py index e9c6c1e9013e..3b91ef8cb274 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py @@ -64,6 +64,7 @@ async def test_volume_groups_begin_create(self, resource_group): "backupId": "str", "baremetalTenantId": "str", "breakthroughMode": "str", + "breakthroughModeOld": "str", "capacityPoolResourceId": "str", "cloneProgress": 0, "coolAccess": bool, @@ -144,10 +145,7 @@ async def test_volume_groups_begin_create(self, resource_group): "isRestoring": bool, "kerberosEnabled": bool, "keyVaultPrivateEndpointResourceId": "str", - "language": "str", - "largeVolumeType": "str", "ldapEnabled": bool, - "ldapServerType": "str", "maximumNumberOfFiles": 0, "mountTargets": [ { diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py index c246e210b195..1e8fb3351058 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py @@ -51,6 +51,7 @@ def test_volumes_begin_create_or_update(self, resource_group): "backupId": "str", "baremetalTenantId": "str", "breakthroughMode": "str", + "breakthroughModeOld": "str", "capacityPoolResourceId": "str", "cloneProgress": 0, "coolAccess": bool, @@ -118,10 +119,7 @@ def test_volumes_begin_create_or_update(self, resource_group): "isRestoring": bool, "kerberosEnabled": bool, "keyVaultPrivateEndpointResourceId": "str", - "language": "str", - "largeVolumeType": "str", "ldapEnabled": bool, - "ldapServerType": "str", "maximumNumberOfFiles": 0, "mountTargets": [ {"fileSystemId": "str", "ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"} diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py index 4ff5a7f6cc0a..fe7b83e1a482 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py @@ -53,6 +53,7 @@ async def test_volumes_begin_create_or_update(self, resource_group): "backupId": "str", "baremetalTenantId": "str", "breakthroughMode": "str", + "breakthroughModeOld": "str", "capacityPoolResourceId": "str", "cloneProgress": 0, "coolAccess": bool, @@ -120,10 +121,7 @@ async def test_volumes_begin_create_or_update(self, resource_group): "isRestoring": bool, "kerberosEnabled": bool, "keyVaultPrivateEndpointResourceId": "str", - "language": "str", - "largeVolumeType": "str", "ldapEnabled": bool, - "ldapServerType": "str", "maximumNumberOfFiles": 0, "mountTargets": [ {"fileSystemId": "str", "ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"} diff --git a/sdk/netapp/azure-mgmt-netapp/pyproject.toml b/sdk/netapp/azure-mgmt-netapp/pyproject.toml index 6738596cfaad..d89eeae0a296 100644 --- a/sdk/netapp/azure-mgmt-netapp/pyproject.toml +++ b/sdk/netapp/azure-mgmt-netapp/pyproject.toml @@ -13,7 +13,7 @@ authors = [ description = "Microsoft Azure Netapp Management Client Library for Python" license = "MIT" classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", @@ -78,7 +78,7 @@ verifytypes = false package_name = "azure-mgmt-netapp" package_pprint_name = "NetApp Files Management" package_doc_id = "" -is_stable = false +is_stable = true is_arm = true title = "NetAppManagementClient" package_nspkg = "azure-mgmt-nspkg" diff --git a/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml b/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml index 1f05723ecad8..b071a0ba6895 100644 --- a/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml +++ b/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/netapp/resource-manager/Microsoft.NetApp/NetApp -commit: 5bfc5b62dd18f5767b3254cc93e695eeb3d5d689 +commit: 0ba9ed818bc5bd36e877ad025777534adf8b62ae repo: Azure/azure-rest-api-specs additionalDirectories: