зеркало из
1
0
Форкнуть 0

[AutoRelease] t2-netapp-2024-11-08-58381(can only be merged by SDK owner) (#38411)

* code and test

* Update CHANGELOG.md

* Update CHANGELOG.md

* assets

* update-format

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
Co-authored-by: Audunn Baldvinsson <audunn.baldvinsson@netapp.com>
Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-11-17 21:37:49 -08:00 коммит произвёл GitHub
Родитель fd343b8334
Коммит 4e62b4f7bf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
176 изменённых файлов: 4098 добавлений и 797 удалений

Просмотреть файл

@ -1,5 +1,40 @@
# Release History
## 13.4.0b1 (2024-11-18)
### Features Added
- Model `Backup` added property `is_large_volume`
- Model `CapacityPool` added property `custom_throughput_mibps`
- Model `CapacityPoolPatch` added property `custom_throughput_mibps`
- Model `EncryptionIdentity` added property `federated_client_id`
- Model `NetAppAccount` added property `nfs_v4_id_domain`
- Model `NetAppAccount` added property `is_multi_ad_enabled`
- Model `NetAppAccountPatch` added property `nfs_v4_id_domain`
- Model `NetAppAccountPatch` added property `is_multi_ad_enabled`
- Model `ReplicationObject` added property `destination_replications`
- Enum `ServiceLevel` added member `FLEXIBLE`
- Model `Volume` added property `accept_grow_capacity_pool_for_short_term_clone_split`
- Model `Volume` added property `inherited_size_in_bytes`
- Model `Volume` added property `language`
- Model `VolumeGroupVolumeProperties` added property `accept_grow_capacity_pool_for_short_term_clone_split`
- Model `VolumeGroupVolumeProperties` added property `inherited_size_in_bytes`
- Model `VolumeGroupVolumeProperties` added property `language`
- Added enum `AcceptGrowCapacityPoolForShortTermCloneSplit`
- Added model `ChangeKeyVault`
- Added model `DestinationReplication`
- Added model `EncryptionTransitionRequest`
- Added model `KeyVaultPrivateEndpoint`
- Added model `ListQuotaReportResponse`
- Added model `QuotaReport`
- Added enum `ReplicationType`
- Added enum `VolumeLanguage`
- Operation group `AccountsOperations` added method `begin_change_key_vault`
- Operation group `AccountsOperations` added method `begin_get_change_key_vault_information`
- Operation group `AccountsOperations` added method `begin_transition_to_cmk`
- Operation group `VolumesOperations` added method `begin_list_quota_report`
- Operation group `VolumesOperations` added method `begin_split_clone_from_parent`
## 13.3.0 (2024-10-21)
### Features Added

Просмотреть файл

@ -1,11 +1,11 @@
{
"commit": "7a848fa439e779117793063aff964d7082a7f6f8",
"commit": "c4dc3cd6256c8a7525079f2b98285cd5b1c8bee6",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.19.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-preview-2024-07-01-preview --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/netapp/resource-manager/readme.md"
}

Просмотреть файл

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/netapp/azure-mgmt-netapp",
"Tag": "python/netapp/azure-mgmt-netapp_7f4c96bada"
"Tag": "python/netapp/azure-mgmt-netapp_d458e8b242"
}

Просмотреть файл

@ -28,13 +28,13 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance-
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-07-01")
api_version: str = kwargs.pop("api_version", "2024-07-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")

Просмотреть файл

@ -92,8 +92,8 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-07-01-preview". 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.

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "13.3.0"
VERSION = "13.4.0b1"

Просмотреть файл

@ -28,13 +28,13 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance-
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-07-01")
api_version: str = kwargs.pop("api_version", "2024-07-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")

Просмотреть файл

@ -92,8 +92,8 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-07-01-preview". 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.

Просмотреть файл

@ -33,12 +33,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
from ...operations._accounts_operations import (
build_change_key_vault_request,
build_create_or_update_request,
build_delete_request,
build_get_change_key_vault_information_request,
build_get_request,
build_list_by_subscription_request,
build_list_request,
build_renew_credentials_request,
build_transition_to_cmk_request,
build_update_request,
)
@ -898,3 +901,527 @@ class AccountsOperations:
deserialization_callback=get_long_running_output,
)
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
async def _transition_to_cmk_initial(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None,
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
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 = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "EncryptionTransitionRequest")
else:
_json = None
_request = build_transition_to_cmk_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@overload
async def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[_models.EncryptionTransitionRequest] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 body: The required parameters to perform encryption transition. Default value is None.
:type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest
: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 either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
async def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 body: The required parameters to perform encryption transition. 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 AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace_async
async def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 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 IO[bytes]
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_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", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
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._transition_to_cmk_initial(
resource_group_name=resource_group_name,
account_name=account_name,
body=body,
api_version=api_version,
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): # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, {}) # type: ignore
if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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
async def _get_change_key_vault_information_initial( # pylint: disable=name-too-long
self, resource_group_name: str, account_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_change_key_vault_information_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@distributed_trace_async
async def begin_get_change_key_vault_information(
self, resource_group_name: str, account_name: str, **kwargs: Any
) -> AsyncLROPoller[None]:
"""Get information about how volumes under NetApp account are encrypted.
Contains data from encryption.keyVaultProperties as well as information about which private
endpoint is used by each encryption sibling set. Response from this endpoint can be modified
and used as request body for POST request.
:param resource_group_name: 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 either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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._get_change_key_vault_information_initial(
resource_group_name=resource_group_name,
account_name=account_name,
api_version=api_version,
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
if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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
async def _change_key_vault_initial(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None,
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
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 = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "ChangeKeyVault")
else:
_json = None
_request = build_change_key_vault_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@overload
async def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[_models.ChangeKeyVault] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
:param body: The required parameters to perform encryption migration. Default value is None.
:type body: ~azure.mgmt.netapp.models.ChangeKeyVault
: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 either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
async def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
:param body: The required parameters to perform encryption migration. 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 AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace_async
async def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
: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 IO[bytes]
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_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", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
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._change_key_vault_initial(
resource_group_name=resource_group_name,
account_name=account_name,
body=body,
api_version=api_version,
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): # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, {}) # type: ignore
if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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

Просмотреть файл

@ -44,6 +44,7 @@ from ...operations._volumes_operations import (
build_finalize_relocation_request,
build_get_request,
build_list_get_group_id_list_for_ldap_user_request,
build_list_quota_report_request,
build_list_replications_request,
build_list_request,
build_peer_external_cluster_request,
@ -58,6 +59,7 @@ from ...operations._volumes_operations import (
build_resync_replication_request,
build_revert_relocation_request,
build_revert_request,
build_split_clone_from_parent_request,
build_update_request,
)
@ -1293,6 +1295,127 @@ class VolumesOperations: # pylint: disable=too-many-public-methods
)
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
async def _split_clone_from_parent_initial(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_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=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@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[None]:
"""Split clone from parent 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 AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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._split_clone_from_parent_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
api_version=api_version,
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
if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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
async def _break_file_locks_initial(
self,
resource_group_name: str,
@ -1752,6 +1875,133 @@ class VolumesOperations: # pylint: disable=too-many-public-methods
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
async def _list_quota_report_initial(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_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,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_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"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@distributed_trace_async
async def begin_list_quota_report(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> AsyncLROPoller[_models.ListQuotaReportResponse]:
"""Lists Quota Report for the volume.
Returns report of quotas for 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 instance of AsyncLROPoller that returns either ListQuotaReportResponse or the
result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ListQuotaReportResponse] = 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._list_quota_report_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
api_version=api_version,
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):
deserialized = self._deserialize("ListQuotaReportResponse", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
)
elif polling is False:
polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
else:
polling_method = polling
if cont_token:
return AsyncLROPoller[_models.ListQuotaReportResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return AsyncLROPoller[_models.ListQuotaReportResponse](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
async def _break_replication_initial(
self,
resource_group_name: str,

Просмотреть файл

@ -26,12 +26,15 @@ from ._models_py3 import BreakReplicationRequest
from ._models_py3 import CapacityPool
from ._models_py3 import CapacityPoolList
from ._models_py3 import CapacityPoolPatch
from ._models_py3 import ChangeKeyVault
from ._models_py3 import CheckAvailabilityResponse
from ._models_py3 import CloudErrorBody
from ._models_py3 import ClusterPeerCommandResponse
from ._models_py3 import DailySchedule
from ._models_py3 import DestinationReplication
from ._models_py3 import Dimension
from ._models_py3 import EncryptionIdentity
from ._models_py3 import EncryptionTransitionRequest
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse
@ -40,8 +43,10 @@ from ._models_py3 import FilePathAvailabilityRequest
from ._models_py3 import GetGroupIdListForLDAPUserRequest
from ._models_py3 import GetGroupIdListForLDAPUserResponse
from ._models_py3 import HourlySchedule
from ._models_py3 import KeyVaultPrivateEndpoint
from ._models_py3 import KeyVaultProperties
from ._models_py3 import LdapSearchScopeOpt
from ._models_py3 import ListQuotaReportResponse
from ._models_py3 import ListReplications
from ._models_py3 import LogSpecification
from ._models_py3 import ManagedServiceIdentity
@ -63,6 +68,7 @@ from ._models_py3 import PoolChangeRequest
from ._models_py3 import ProxyResource
from ._models_py3 import QueryNetworkSiblingSetRequest
from ._models_py3 import QuotaAvailabilityRequest
from ._models_py3 import QuotaReport
from ._models_py3 import ReestablishReplicationRequest
from ._models_py3 import RegionInfo
from ._models_py3 import RegionInfoAvailabilityZoneMappingsItem
@ -119,6 +125,7 @@ from ._models_py3 import VolumeRevert
from ._models_py3 import VolumeSnapshotProperties
from ._models_py3 import WeeklySchedule
from ._net_app_management_client_enums import AcceptGrowCapacityPoolForShortTermCloneSplit
from ._net_app_management_client_enums import ActiveDirectoryStatus
from ._net_app_management_client_enums import ApplicationType
from ._net_app_management_client_enums import AvsDataStore
@ -146,11 +153,13 @@ from ._net_app_management_client_enums import QosType
from ._net_app_management_client_enums import RegionStorageToNetworkProximity
from ._net_app_management_client_enums import RelationshipStatus
from ._net_app_management_client_enums import ReplicationSchedule
from ._net_app_management_client_enums import ReplicationType
from ._net_app_management_client_enums import SecurityStyle
from ._net_app_management_client_enums import ServiceLevel
from ._net_app_management_client_enums import SmbAccessBasedEnumeration
from ._net_app_management_client_enums import SmbNonBrowsable
from ._net_app_management_client_enums import Type
from ._net_app_management_client_enums import VolumeLanguage
from ._net_app_management_client_enums import VolumeStorageToNetworkProximity
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
@ -177,12 +186,15 @@ __all__ = [
"CapacityPool",
"CapacityPoolList",
"CapacityPoolPatch",
"ChangeKeyVault",
"CheckAvailabilityResponse",
"CloudErrorBody",
"ClusterPeerCommandResponse",
"DailySchedule",
"DestinationReplication",
"Dimension",
"EncryptionIdentity",
"EncryptionTransitionRequest",
"ErrorAdditionalInfo",
"ErrorDetail",
"ErrorResponse",
@ -191,8 +203,10 @@ __all__ = [
"GetGroupIdListForLDAPUserRequest",
"GetGroupIdListForLDAPUserResponse",
"HourlySchedule",
"KeyVaultPrivateEndpoint",
"KeyVaultProperties",
"LdapSearchScopeOpt",
"ListQuotaReportResponse",
"ListReplications",
"LogSpecification",
"ManagedServiceIdentity",
@ -214,6 +228,7 @@ __all__ = [
"ProxyResource",
"QueryNetworkSiblingSetRequest",
"QuotaAvailabilityRequest",
"QuotaReport",
"ReestablishReplicationRequest",
"RegionInfo",
"RegionInfoAvailabilityZoneMappingsItem",
@ -269,6 +284,7 @@ __all__ = [
"VolumeRevert",
"VolumeSnapshotProperties",
"WeeklySchedule",
"AcceptGrowCapacityPoolForShortTermCloneSplit",
"ActiveDirectoryStatus",
"ApplicationType",
"AvsDataStore",
@ -296,11 +312,13 @@ __all__ = [
"RegionStorageToNetworkProximity",
"RelationshipStatus",
"ReplicationSchedule",
"ReplicationType",
"SecurityStyle",
"ServiceLevel",
"SmbAccessBasedEnumeration",
"SmbNonBrowsable",
"Type",
"VolumeLanguage",
"VolumeStorageToNetworkProximity",
]
__all__.extend([p for p in _patch_all if p not in __all__])

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -10,6 +10,20 @@ from enum import Enum
from azure.core import CaseInsensitiveEnumMeta
class AcceptGrowCapacityPoolForShortTermCloneSplit(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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.
"""
ACCEPTED = "Accepted"
"""Auto grow capacity pool for short term clone split is accepted."""
DECLINED = "Declined"
"""Auto grow capacity pool for short term clone split is declined. Short term clone volume
creation will not be allowed, to create short term clone volume accept auto grow capacity pool."""
class ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the Active Directory."""
@ -299,6 +313,15 @@ class ReplicationSchedule(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DAILY = "daily"
class ReplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether the replication is cross zone or cross region."""
CROSS_REGION_REPLICATION = "CrossRegionReplication"
"""Cross region replication"""
CROSS_ZONE_REPLICATION = "CrossZoneReplication"
"""Cross zone replication"""
class SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS
protocol.
@ -319,6 +342,8 @@ class ServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Ultra service level"""
STANDARD_ZRS = "StandardZRS"
"""Zone redundant storage service level"""
FLEXIBLE = "Flexible"
"""Flexible service level"""
class SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@ -342,7 +367,7 @@ class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta):
class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of quota."""
"""Type of quota rule."""
DEFAULT_USER_QUOTA = "DefaultUserQuota"
"""Default user quota"""
@ -354,6 +379,149 @@ class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Individual group quota"""
class VolumeLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Language supported for volume."""
C_UTF8 = "c.utf-8"
"""Posix with UTF-8"""
UTF8_MB4 = "utf8mb4"
"""UTF-8 with 4 byte character support"""
AR = "ar"
"""Arabic - Deprecated"""
AR_UTF8 = "ar.utf-8"
"""Arabic with UTF-8"""
HR = "hr"
"""Croatian - Deprecated"""
HR_UTF8 = "hr.utf-8"
"""Croatian with UTF-8"""
CS = "cs"
"""Czech - Deprecated"""
CS_UTF8 = "cs.utf-8"
"""Czech with UTF-8"""
DA = "da"
"""Danish - Deprecated"""
DA_UTF8 = "da.utf-8"
"""Danish with UTF-8"""
NL = "nl"
"""Dutch - Deprecated"""
NL_UTF8 = "nl.utf-8"
"""Dutch with UTF-8"""
EN = "en"
"""English - Deprecated"""
EN_UTF8 = "en.utf-8"
"""English with UTF-8"""
FI = "fi"
"""Finnish - Deprecated"""
FI_UTF8 = "fi.utf-8"
"""Finnish with UTF-8"""
FR = "fr"
"""French - Deprecated"""
FR_UTF8 = "fr.utf-8"
"""French with UTF-8"""
DE = "de"
"""German - Deprecated"""
DE_UTF8 = "de.utf-8"
"""German with UTF-8"""
HE = "he"
"""Hebrew - Deprecated"""
HE_UTF8 = "he.utf-8"
"""Hebrew with UTF-8"""
HU = "hu"
"""Hungarian - Deprecated"""
HU_UTF8 = "hu.utf-8"
"""Hungarian with UTF-8"""
IT = "it"
"""Italian - Deprecated"""
IT_UTF8 = "it.utf-8"
"""Italian with UTF-8"""
JA = "ja"
"""Japanese euc-j - Deprecated"""
JA_UTF8 = "ja.utf-8"
"""Japanese euc-j with UTF-8"""
JA_V1 = "ja-v1"
"""Japanese euc-j - Deprecated"""
JA_V1_UTF8 = "ja-v1.utf-8"
"""Japanese euc-j with UTF-8"""
JA_JP_PCK = "ja-jp.pck"
"""Japanese pck"""
JA_JP_PCK_UTF8 = "ja-jp.pck.utf-8"
"""Japanese pck with UTF-8 - Deprecated"""
JA_JP932 = "ja-jp.932"
"""Japanese cp932"""
JA_JP932_UTF8 = "ja-jp.932.utf-8"
"""Japanese cp932 with UTF-8 - Deprecated"""
JA_JP_PCK_V2 = "ja-jp.pck-v2"
"""Japanese pck - sjis"""
JA_JP_PCK_V2_UTF8 = "ja-jp.pck-v2.utf-8"
"""Japanese pck - sjis with UTF-8 - Deprecated"""
KO = "ko"
"""Korean - Deprecated"""
KO_UTF8 = "ko.utf-8"
"""Korean with UTF-8"""
NO = "no"
"""Norwegian - Deprecated"""
NO_UTF8 = "no.utf-8"
"""Norwegian with UTF-8"""
PL = "pl"
"""Polish - Deprecated"""
PL_UTF8 = "pl.utf-8"
"""Polish with UTF-8"""
PT = "pt"
"""Portuguese - Deprecated"""
PT_UTF8 = "pt.utf-8"
"""Portuguese with UTF-8"""
C = "c"
"""Posix - Deprecated"""
RO = "ro"
"""Romanian - Deprecated"""
RO_UTF8 = "ro.utf-8"
"""Romanian with UTF-8"""
RU = "ru"
"""Russian - Deprecated"""
RU_UTF8 = "ru.utf-8"
"""Russian with UTF-8"""
ZH = "zh"
"""Simplified Chinese - Deprecated"""
ZH_UTF8 = "zh.utf-8"
"""Simplified Chinese with UTF-8"""
ZH_GBK = "zh.gbk"
"""Simplified gbk Chinese"""
ZH_GBK_UTF8 = "zh.gbk.utf-8"
"""Simplified gbk Chinese with UTF-8 - Deprecated"""
ZH_TW_BIG5 = "zh-tw.big5"
"""Traditional Chinese BIG 5"""
ZH_TW_BIG5_UTF8 = "zh-tw.big5.utf-8"
"""Traditional Chinese BIG 5 with UTF-8 - Deprecated"""
ZH_TW = "zh-tw"
"""Traditional Chinese EUC-TW"""
ZH_TW_UTF8 = "zh-tw.utf-8"
"""Traditional Chinese EUC-TW with UTF-8 - Deprecated"""
SK = "sk"
"""Slovak - Deprecated"""
SK_UTF8 = "sk.utf-8"
"""Slovak with UTF-8"""
SL = "sl"
"""Slovenian - Deprecated"""
SL_UTF8 = "sl.utf-8"
"""Slovenian with UTF-8"""
ES = "es"
"""Spanish - Deprecated"""
ES_UTF8 = "es.utf-8"
"""Spanish with UTF-8"""
SV = "sv"
"""Swedish - Deprecated"""
SV_UTF8 = "sv.utf-8"
"""Swedish with UTF-8"""
TR = "tr"
"""Turkish - Deprecated"""
TR_UTF8 = "tr.utf-8"
"""Turkish with UTF-8"""
EN_US = "en-us"
"""US English - Deprecated"""
EN_US_UTF8 = "en-us.utf-8"
"""US English with UTF-8"""
class VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provides storage to network proximity information for the volume."""

Просмотреть файл

@ -48,7 +48,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -72,7 +72,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs:
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -102,7 +102,7 @@ def build_get_request(resource_group_name: str, account_name: str, subscription_
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -137,7 +137,7 @@ def build_create_or_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -175,7 +175,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -210,7 +210,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -248,7 +248,7 @@ def build_renew_credentials_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -277,6 +277,117 @@ def build_renew_credentials_request(
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
def build_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 {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1
),
"accountName": _SERIALIZER.url(
"account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$"
),
}
_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_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", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1
),
"accountName": _SERIALIZER.url(
"account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$"
),
}
_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_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 {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1
),
"accountName": _SERIALIZER.url(
"account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$"
),
}
_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)
class AccountsOperations:
"""
.. warning::
@ -1119,3 +1230,527 @@ class AccountsOperations:
deserialization_callback=get_long_running_output,
)
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
def _transition_to_cmk_initial(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
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 = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "EncryptionTransitionRequest")
else:
_json = None
_request = build_transition_to_cmk_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@overload
def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[_models.EncryptionTransitionRequest] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 body: The required parameters to perform encryption transition. Default value is None.
:type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest
: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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 body: The required parameters to perform encryption transition. 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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_transition_to_cmk(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None,
**kwargs: Any
) -> LROPoller[None]:
"""Transition volumes encryption from PMK to CMK.
Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key
or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with
volumes from another account.
:param resource_group_name: 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 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 IO[bytes]
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_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", self._config.api_version))
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._transition_to_cmk_initial(
resource_group_name=resource_group_name,
account_name=account_name,
body=body,
api_version=api_version,
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
if polling is True:
polling_method: PollingMethod = cast(
PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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 _get_change_key_vault_information_initial( # pylint: disable=name-too-long
self, resource_group_name: str, account_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_change_key_vault_information_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@distributed_trace
def begin_get_change_key_vault_information(
self, resource_group_name: str, account_name: str, **kwargs: Any
) -> LROPoller[None]:
"""Get information about how volumes under NetApp account are encrypted.
Contains data from encryption.keyVaultProperties as well as information about which private
endpoint is used by each encryption sibling set. Response from this endpoint can be modified
and used as request body for POST request.
:param resource_group_name: 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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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._get_change_key_vault_information_initial(
resource_group_name=resource_group_name,
account_name=account_name,
api_version=api_version,
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 polling is True:
polling_method: PollingMethod = cast(
PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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 _change_key_vault_initial(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
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 = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "ChangeKeyVault")
else:
_json = None
_request = build_change_key_vault_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@overload
def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[_models.ChangeKeyVault] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
:param body: The required parameters to perform encryption migration. Default value is None.
:type body: ~azure.mgmt.netapp.models.ChangeKeyVault
: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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
:param body: The required parameters to perform encryption migration. 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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_change_key_vault(
self,
resource_group_name: str,
account_name: str,
body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None,
**kwargs: Any
) -> LROPoller[None]:
"""Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account.
Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes.
Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to 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
: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 IO[bytes]
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_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", self._config.api_version))
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._change_key_vault_initial(
resource_group_name=resource_group_name,
account_name=account_name,
body=body,
api_version=api_version,
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
if polling is True:
polling_method: PollingMethod = cast(
PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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

Просмотреть файл

@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -83,7 +83,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -119,7 +119,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -158,7 +158,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -197,7 +197,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -50,7 +50,7 @@ def build_list_by_net_app_account_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -85,7 +85,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -123,7 +123,7 @@ def build_create_or_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -164,7 +164,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -205,7 +205,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -50,7 +50,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -91,7 +91,7 @@ def build_get_volume_latest_restore_status_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -138,7 +138,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -183,7 +183,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -229,7 +229,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -278,7 +278,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -327,7 +327,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -48,7 +48,7 @@ def build_migrate_backups_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")

Просмотреть файл

@ -53,7 +53,7 @@ def build_restore_files_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")

Просмотреть файл

@ -48,7 +48,7 @@ def build_migrate_backups_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")

Просмотреть файл

@ -45,7 +45,7 @@ def build_check_name_availability_request(location: str, subscription_id: str, *
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -78,7 +78,7 @@ def build_check_file_path_availability_request( # pylint: disable=name-too-long
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -109,7 +109,7 @@ def build_check_quota_availability_request(location: str, subscription_id: str,
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -140,7 +140,7 @@ def build_query_region_info_request(location: str, subscription_id: str, **kwarg
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -167,7 +167,7 @@ def build_query_network_sibling_set_request(location: str, subscription_id: str,
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -198,7 +198,7 @@ def build_update_network_sibling_set_request(location: str, subscription_id: str
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")

Просмотреть файл

@ -43,7 +43,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -70,7 +70,7 @@ def build_get_request(location: str, quota_limit_name: str, subscription_id: str
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -43,7 +43,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -70,7 +70,7 @@ def build_get_request(location: str, subscription_id: str, **kwargs: Any) -> Htt
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -43,7 +43,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -83,7 +83,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -121,7 +121,7 @@ def build_create_or_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -162,7 +162,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -203,7 +203,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -83,7 +83,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -119,7 +119,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -158,7 +158,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -197,7 +197,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -233,7 +233,7 @@ def build_list_volumes_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -51,7 +51,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -98,7 +98,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -146,7 +146,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -199,7 +199,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -250,7 +250,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -298,7 +298,7 @@ def build_restore_files_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")

Просмотреть файл

@ -50,7 +50,7 @@ def build_list_by_volume_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -97,7 +97,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -152,7 +152,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -210,7 +210,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -268,7 +268,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -323,7 +323,7 @@ def build_get_metadata_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -50,7 +50,7 @@ def build_list_by_net_app_account_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -85,7 +85,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -128,7 +128,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -174,7 +174,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -50,7 +50,7 @@ def build_list_by_volume_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -97,7 +97,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -145,7 +145,7 @@ def build_create_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -196,7 +196,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -247,7 +247,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL

Просмотреть файл

@ -50,7 +50,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -88,7 +88,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -129,7 +129,7 @@ def build_create_or_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -173,7 +173,7 @@ def build_update_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -224,7 +224,7 @@ def build_delete_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -267,7 +267,7 @@ def build_populate_availability_zone_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -308,7 +308,7 @@ def build_revert_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -352,7 +352,7 @@ def build_reset_cifs_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -387,13 +387,54 @@ def build_reset_cifs_password_request(
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
def build_split_clone_from_parent_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", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/splitCloneFromParent",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1
),
"accountName": _SERIALIZER.url(
"account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$"
),
"poolName": _SERIALIZER.url(
"pool_name", pool_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$"
),
"volumeName": _SERIALIZER.url(
"volume_name", volume_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$"
),
}
_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_break_file_locks_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -437,7 +478,7 @@ def build_list_get_group_id_list_for_ldap_user_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -475,13 +516,54 @@ def build_list_get_group_id_list_for_ldap_user_request( # pylint: disable=name-
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
def build_list_quota_report_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", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1
),
"accountName": _SERIALIZER.url(
"account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$"
),
"poolName": _SERIALIZER.url(
"pool_name", pool_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$"
),
"volumeName": _SERIALIZER.url(
"volume_name", volume_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$"
),
}
_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_break_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -525,7 +607,7 @@ def build_reestablish_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -569,7 +651,7 @@ def build_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -610,7 +692,7 @@ def build_list_replications_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -651,7 +733,7 @@ def build_resync_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -692,7 +774,7 @@ def build_delete_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -733,7 +815,7 @@ def build_authorize_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -777,7 +859,7 @@ def build_re_initialize_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -818,7 +900,7 @@ def build_peer_external_cluster_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -862,7 +944,7 @@ def build_authorize_external_replication_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -903,7 +985,7 @@ def build_finalize_external_replication_request( # pylint: disable=name-too-lon
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -944,7 +1026,7 @@ def build_perform_replication_transfer_request( # pylint: disable=name-too-long
_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -985,7 +1067,7 @@ def build_pool_change_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -1029,7 +1111,7 @@ def build_relocate_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@ -1073,7 +1155,7 @@ def build_finalize_relocation_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -1114,7 +1196,7 @@ def build_revert_relocation_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", "2024-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@ -2365,6 +2447,127 @@ class VolumesOperations: # pylint: disable=too-many-public-methods
)
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[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_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=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
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[None]:
"""Split clone from parent 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 either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
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._split_clone_from_parent_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
api_version=api_version,
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 polling is True:
polling_method: PollingMethod = cast(
PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **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 _break_file_locks_initial(
self,
resource_group_name: str,
@ -2824,6 +3027,133 @@ class VolumesOperations: # pylint: disable=too-many-public-methods
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
def _list_quota_report_initial(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_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,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)
_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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_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"))
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@distributed_trace
def begin_list_quota_report(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> LROPoller[_models.ListQuotaReportResponse]:
"""Lists Quota Report for the volume.
Returns report of quotas for 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 instance of LROPoller that returns either ListQuotaReportResponse or the result of
cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ListQuotaReportResponse] = 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,
api_version=api_version,
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):
deserialized = self._deserialize("ListQuotaReportResponse", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
if polling is True:
polling_method: PollingMethod = cast(
PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
)
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller[_models.ListQuotaReportResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller[_models.ListQuotaReportResponse](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
def _break_replication_initial(
self,
resource_group_name: str,

Просмотреть файл

@ -0,0 +1,41 @@
# 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) AutoRest 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_change_key_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="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
)
client.accounts.begin_change_key_vault(
resource_group_name="myRG",
account_name="account1",
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_ChangeKeyVault.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdate.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_CreateOrUpdate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -56,6 +56,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdateAD.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_CreateOrUpdateAD.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -36,6 +36,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1,41 @@
# 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) AutoRest 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_get_change_key_vault_information.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="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
)
client.accounts.begin_get_change_key_vault_information(
resource_group_name="myRG",
account_name="account1",
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -36,6 +36,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_RenewCredentials.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_RenewCredentials.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1,41 @@
# 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) AutoRest 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_transition_encryption_key.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="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
)
client.accounts.begin_transition_to_cmk(
resource_group_name="myRG",
account_name="account1",
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_TransitionEncryptionKey.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -47,6 +47,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -47,6 +47,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderAccount_Migrate.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderAccount_Migrate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -45,6 +45,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -42,6 +42,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_SingleFileRestore.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -41,6 +41,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderVolume_Migrate.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderVolume_Migrate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/GroupIdListForLDAPUser.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/GroupIdListForLDAPUser.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -35,6 +35,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/OperationList.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/OperationList.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -42,6 +42,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_CreateOrUpdate.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_CreateOrUpdate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1,52 @@
# 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) AutoRest 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 pools_create_or_update_custom_throughput.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="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
)
response = client.pools.begin_create_or_update(
resource_group_name="myRG",
account_name="account1",
pool_name="customPool1",
body={
"location": "eastus",
"properties": {
"customThroughputMibps": 128,
"qosType": "Manual",
"serviceLevel": "Flexible",
"size": 4398046511104,
},
},
).result()
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_CreateOrUpdate_CustomThroughput.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1,43 @@
# 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) AutoRest 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 pools_get_custom_throughput.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="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
)
response = client.pools.get(
resource_group_name="myRG",
account_name="account1",
pool_name="customPool1",
)
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Get_CustomThroughput.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/QuotaLimits_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/QuotaLimits_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -36,6 +36,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfo.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfo.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -36,6 +36,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfos_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfos_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -48,6 +48,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_ListVolumes.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_ListVolumes.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -48,6 +48,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -41,6 +41,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_SingleFileRestore.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_SingleFileRestore.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -41,6 +41,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_List.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Metadata.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Metadata.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -41,6 +41,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Update.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Update.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -458,6 +458,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_Oracle.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Create_Oracle.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -220,6 +220,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_SapHana.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Create_SapHana.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -37,6 +37,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Get_Oracle.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Get_SapHana.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_Oracle.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_List_Oracle.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -38,6 +38,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_SapHana.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_List_SapHana.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -44,6 +44,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Create.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Create.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -39,6 +39,6 @@ def main():
).result()
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Delete.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Delete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(response)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Get.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -40,6 +40,6 @@ def main():
print(item)
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_List.json
# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_List.json
if __name__ == "__main__":
main()

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше