diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json index cd92c50cb4b1..67f26f2f2768 100644 --- a/sdk/netapp/azure-mgmt-netapp/_meta.json +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -1,11 +1,11 @@ { - "commit": "8516fa819794ea879bc13bc4137300b67b58de1f", + "commit": "31ea62f8768aa418cc2a2a0dd0595a065e9afb51", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.17.0", + "@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=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.17.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/s/azure-sdk-for-python/sdk --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" } \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py index c76e0f0e7fa8..892684ca411c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py @@ -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-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-05-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-03-01") + api_version: str = kwargs.pop("api_version", "2024-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py index a4c104a27733..d4cc7b884987 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py @@ -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-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-05-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. diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py index 0b30e0e18f03..e786ca9d2565 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "13.2.0" +VERSION = "5.1.0" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py index 5b0fbaba00c5..d9df3594d2f9 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py @@ -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-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-05-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-03-01") + api_version: str = kwargs.pop("api_version", "2024-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py index 8f50d90552a2..09d1babaabdd 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py @@ -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-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-05-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. diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py index 943956bf1a00..35e28eab093c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py @@ -33,12 +33,15 @@ 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 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- 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 diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py index f44ef082fe2a..99cbc50d33ca 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py @@ -142,7 +142,7 @@ async def check_name_availability( @distributed_trace_async async def check_file_path_availability( - self, location: str, name: str, subnet_id: str, **kwargs: Any + self, location: str, name: str, subnet_id: str, availability_zone: Optional[str] = None, **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -155,6 +155,10 @@ async def check_file_path_availability( :param subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Required. :type subnet_id: str + :param availability_zone: The Azure Resource logical availability zone which is used within + zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone + where volume is placed. Default value is None. + :type availability_zone: str :return: CheckAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -174,7 +178,7 @@ async def check_file_path_availability( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.CheckAvailabilityResponse] = kwargs.pop("cls", None) - _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) + _body = _models.FilePathAvailabilityRequest(availability_zone=availability_zone, name=name, subnet_id=subnet_id) _json = self._serialize.body(_body, "FilePathAvailabilityRequest") _request = build_check_file_path_availability_request( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py index 37afc6cf23ac..03b8a7e03871 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py @@ -33,17 +33,22 @@ from ... import models as _models from ...operations._volumes_operations import ( + build_authorize_external_replication_request, build_authorize_replication_request, build_break_file_locks_request, build_break_replication_request, build_create_or_update_request, build_delete_replication_request, build_delete_request, + build_finalize_external_replication_request, 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, + build_perform_replication_transfer_request, build_pool_change_request, build_populate_availability_zone_request, build_re_initialize_replication_request, @@ -54,6 +59,7 @@ build_resync_replication_request, build_revert_relocation_request, build_revert_request, + build_split_clone_from_parent_request, build_update_request, ) @@ -1289,6 +1295,127 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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, @@ -1748,6 +1875,133 @@ def get_long_running_output(pipeline_response): 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, @@ -2922,6 +3176,609 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _peer_external_cluster_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Union[_models.PeerClusterForVolumeMigrationRequest, IO[bytes]], + **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: + _json = self._serialize.body(body, "PeerClusterForVolumeMigrationRequest") + + _request = build_peer_external_cluster_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + 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 [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 + + @overload + async def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _models.PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either ClusterPeerCommandResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either ClusterPeerCommandResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Union[_models.PeerClusterForVolumeMigrationRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Is either a + PeerClusterForVolumeMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either ClusterPeerCommandResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :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[_models.ClusterPeerCommandResponse] = 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._peer_external_cluster_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_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): + deserialized = self._deserialize("ClusterPeerCommandResponse", 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.ClusterPeerCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ClusterPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _authorize_external_replication_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_authorize_external_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_authorize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.SvmPeerCommandResponse]: + """Start migration process. + + Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once + the SVM have been peered a SnapMirror will be created. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of AsyncLROPoller that returns either SvmPeerCommandResponse or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse] + :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.SvmPeerCommandResponse] = 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._authorize_external_replication_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("SvmPeerCommandResponse", 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.SvmPeerCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SvmPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _finalize_external_replication_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_finalize_external_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_finalize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Finalize migration process. + + Finalizes the migration of an external volume by releasing the replication and breaking the + external cluster peering if no other migration is active. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of 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._finalize_external_replication_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 _perform_replication_transfer_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_perform_replication_transfer_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_perform_replication_transfer( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Perform a replication transfer. + + Performs an adhoc replication transfer on a volume with volumeType Migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of 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._perform_replication_transfer_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 _pool_change_initial( self, resource_group_name: str, diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index 423cb6d0c3ed..c78f59758d38 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -26,11 +26,15 @@ 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 @@ -39,8 +43,10 @@ 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 @@ -56,17 +62,20 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult +from ._models_py3 import PeerClusterForVolumeMigrationRequest from ._models_py3 import PlacementKeyValuePairs 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 from ._models_py3 import RegionInfoResource from ._models_py3 import RegionInfosList from ._models_py3 import RelocateVolumeRequest +from ._models_py3 import RemotePath from ._models_py3 import Replication from ._models_py3 import ReplicationObject from ._models_py3 import ReplicationStatus @@ -89,6 +98,7 @@ from ._models_py3 import SubvolumeModel from ._models_py3 import SubvolumePatchRequest from ._models_py3 import SubvolumesList +from ._models_py3 import SvmPeerCommandResponse from ._models_py3 import SystemData from ._models_py3 import TrackedResource from ._models_py3 import UpdateNetworkSiblingSetRequest @@ -115,6 +125,7 @@ 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 @@ -142,11 +153,13 @@ 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 @@ -173,11 +186,15 @@ "CapacityPool", "CapacityPoolList", "CapacityPoolPatch", + "ChangeKeyVault", "CheckAvailabilityResponse", "CloudErrorBody", + "ClusterPeerCommandResponse", "DailySchedule", + "DestinationReplication", "Dimension", "EncryptionIdentity", + "EncryptionTransitionRequest", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", @@ -186,8 +203,10 @@ "GetGroupIdListForLDAPUserRequest", "GetGroupIdListForLDAPUserResponse", "HourlySchedule", + "KeyVaultPrivateEndpoint", "KeyVaultProperties", "LdapSearchScopeOpt", + "ListQuotaReportResponse", "ListReplications", "LogSpecification", "ManagedServiceIdentity", @@ -203,17 +222,20 @@ "Operation", "OperationDisplay", "OperationListResult", + "PeerClusterForVolumeMigrationRequest", "PlacementKeyValuePairs", "PoolChangeRequest", "ProxyResource", "QueryNetworkSiblingSetRequest", "QuotaAvailabilityRequest", + "QuotaReport", "ReestablishReplicationRequest", "RegionInfo", "RegionInfoAvailabilityZoneMappingsItem", "RegionInfoResource", "RegionInfosList", "RelocateVolumeRequest", + "RemotePath", "Replication", "ReplicationObject", "ReplicationStatus", @@ -236,6 +258,7 @@ "SubvolumeModel", "SubvolumePatchRequest", "SubvolumesList", + "SvmPeerCommandResponse", "SystemData", "TrackedResource", "UpdateNetworkSiblingSetRequest", @@ -261,6 +284,7 @@ "VolumeRevert", "VolumeSnapshotProperties", "WeeklySchedule", + "AcceptGrowCapacityPoolForShortTermCloneSplit", "ActiveDirectoryStatus", "ApplicationType", "AvsDataStore", @@ -288,11 +312,13 @@ "RegionStorageToNetworkProximity", "RelationshipStatus", "ReplicationSchedule", + "ReplicationType", "SecurityStyle", "ServiceLevel", "SmbAccessBasedEnumeration", "SmbNonBrowsable", "Type", + "VolumeLanguage", "VolumeStorageToNetworkProximity", ] __all__.extend([p for p in _patch_all if p not in __all__]) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py index f11644d2ebe7..448c4946b244 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py @@ -411,6 +411,8 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes :vartype snapshot_name: str :ivar backup_policy_resource_id: ResourceId used to identify the backup policy. :vartype backup_policy_resource_id: str + :ivar is_large_volume: Specifies if the backup is for a large volume. + :vartype is_large_volume: bool """ _validation = { @@ -431,6 +433,7 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes "failure_reason": {"readonly": True}, "volume_resource_id": {"required": True}, "backup_policy_resource_id": {"readonly": True}, + "is_large_volume": {"readonly": True}, } _attribute_map = { @@ -449,6 +452,7 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes "use_existing_snapshot": {"key": "properties.useExistingSnapshot", "type": "bool"}, "snapshot_name": {"key": "properties.snapshotName", "type": "str"}, "backup_policy_resource_id": {"key": "properties.backupPolicyResourceId", "type": "str"}, + "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, } def __init__( @@ -483,6 +487,7 @@ def __init__( self.use_existing_snapshot = use_existing_snapshot self.snapshot_name = snapshot_name self.backup_policy_resource_id = None + self.is_large_volume = None class BackupPatch(_serialization.Model): @@ -1359,6 +1364,68 @@ def __init__( self.cool_access = cool_access +class ChangeKeyVault(_serialization.Model): + """Change key vault request. + + All required parameters must be populated in order to send to server. + + :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption. + Required. + :vartype key_vault_uri: str + :ivar key_name: The name of the key that should be used for encryption. Required. + :vartype key_name: str + :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used + for encryption. + :vartype key_vault_resource_id: str + :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every + virtual network that has volumes encrypted with customer-managed keys needs its own key vault + private endpoint. Required. + :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] + """ + + _validation = { + "key_vault_uri": {"required": True}, + "key_name": {"required": True}, + "key_vault_private_endpoints": {"required": True}, + } + + _attribute_map = { + "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, + "key_name": {"key": "keyName", "type": "str"}, + "key_vault_resource_id": {"key": "keyVaultResourceId", "type": "str"}, + "key_vault_private_endpoints": {"key": "keyVaultPrivateEndpoints", "type": "[KeyVaultPrivateEndpoint]"}, + } + + def __init__( + self, + *, + key_vault_uri: str, + key_name: str, + key_vault_private_endpoints: List["_models.KeyVaultPrivateEndpoint"], + key_vault_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword key_vault_uri: The URI of the key vault/managed HSM that should be used for + encryption. Required. + :paramtype key_vault_uri: str + :keyword key_name: The name of the key that should be used for encryption. Required. + :paramtype key_name: str + :keyword key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be + used for encryption. + :paramtype key_vault_resource_id: str + :keyword key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. + Every virtual network that has volumes encrypted with customer-managed keys needs its own key + vault private endpoint. Required. + :paramtype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] + """ + super().__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_name = key_name + self.key_vault_resource_id = key_vault_resource_id + self.key_vault_private_endpoints = key_vault_private_endpoints + + class CheckAvailabilityResponse(_serialization.Model): """Information regarding availability of a resource. @@ -1440,6 +1507,30 @@ def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, self.message = message +class ClusterPeerCommandResponse(_serialization.Model): + """Information about cluster peering process. + + :ivar peer_accept_command: A command that needs to be run on the external ONTAP to accept + cluster peering. Will only be present if :code:`clusterPeeringStatus` is + :code:`pending`. + :vartype peer_accept_command: str + """ + + _attribute_map = { + "peer_accept_command": {"key": "peerAcceptCommand", "type": "str"}, + } + + def __init__(self, *, peer_accept_command: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword peer_accept_command: A command that needs to be run on the external ONTAP to accept + cluster peering. Will only be present if :code:`clusterPeeringStatus` is + :code:`pending`. + :paramtype peer_accept_command: str + """ + super().__init__(**kwargs) + self.peer_accept_command = peer_accept_command + + class DailySchedule(_serialization.Model): """Daily Schedule properties. @@ -1486,6 +1577,54 @@ def __init__( self.used_bytes = used_bytes +class DestinationReplication(_serialization.Model): + """Destination replication properties. + + :ivar resource_id: The resource ID of the remote volume. + :vartype resource_id: str + :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known + values are: "CrossRegionReplication" and "CrossZoneReplication". + :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType + :ivar region: The remote region for the destination volume. + :vartype region: str + :ivar zone: The remote zone for the destination volume. + :vartype zone: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "replication_type": {"key": "replicationType", "type": "str"}, + "region": {"key": "region", "type": "str"}, + "zone": {"key": "zone", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + replication_type: Optional[Union[str, "_models.ReplicationType"]] = None, + region: Optional[str] = None, + zone: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the remote volume. + :paramtype resource_id: str + :keyword replication_type: Indicates whether the replication is cross zone or cross region. + Known values are: "CrossRegionReplication" and "CrossZoneReplication". + :paramtype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType + :keyword region: The remote region for the destination volume. + :paramtype region: str + :keyword zone: The remote zone for the destination volume. + :paramtype zone: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.replication_type = replication_type + self.region = region + self.zone = zone + + class Dimension(_serialization.Model): """Dimension of blobs, possibly be blob type or access tier. @@ -1524,6 +1663,9 @@ class EncryptionIdentity(_serialization.Model): authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. :vartype user_assigned_identity: str + :ivar federated_client_id: ClientId of the multi-tenant AAD Application. Used to access + cross-tenant KeyVaults. + :vartype federated_client_id: str """ _validation = { @@ -1533,18 +1675,60 @@ class EncryptionIdentity(_serialization.Model): _attribute_map = { "principal_id": {"key": "principalId", "type": "str"}, "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, + "federated_client_id": {"key": "federatedClientId", "type": "str"}, } - def __init__(self, *, user_assigned_identity: Optional[str] = None, **kwargs: Any) -> None: + def __init__( + self, *, user_assigned_identity: Optional[str] = None, federated_client_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword user_assigned_identity: The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. :paramtype user_assigned_identity: str + :keyword federated_client_id: ClientId of the multi-tenant AAD Application. Used to access + cross-tenant KeyVaults. + :paramtype federated_client_id: str """ super().__init__(**kwargs) self.principal_id = None self.user_assigned_identity = user_assigned_identity + self.federated_client_id = federated_client_id + + +class EncryptionTransitionRequest(_serialization.Model): + """Encryption transition request. + + All required parameters must be populated in order to send to server. + + :ivar virtual_network_id: Identifier for the virtual network. Required. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :vartype private_endpoint_id: str + """ + + _validation = { + "virtual_network_id": {"required": True}, + "private_endpoint_id": {"required": True}, + } + + _attribute_map = { + "virtual_network_id": {"key": "virtualNetworkId", "type": "str"}, + "private_endpoint_id": {"key": "privateEndpointId", "type": "str"}, + } + + def __init__(self, *, virtual_network_id: str, private_endpoint_id: str, **kwargs: Any) -> None: + """ + :keyword virtual_network_id: Identifier for the virtual network. Required. + :paramtype virtual_network_id: str + :keyword private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :paramtype private_endpoint_id: str + """ + super().__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.private_endpoint_id = private_endpoint_id class ErrorAdditionalInfo(_serialization.Model): @@ -1791,6 +1975,10 @@ class FilePathAvailabilityRequest(_serialization.Model): :ivar subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Required. :vartype subnet_id: str + :ivar availability_zone: The Azure Resource logical availability zone which is used within zone + mapping lookup for the subscription and region. The lookup will retrieve the physical zone + where volume is placed. + :vartype availability_zone: str """ _validation = { @@ -1801,19 +1989,25 @@ class FilePathAvailabilityRequest(_serialization.Model): _attribute_map = { "name": {"key": "name", "type": "str"}, "subnet_id": {"key": "subnetId", "type": "str"}, + "availability_zone": {"key": "availabilityZone", "type": "str"}, } - def __init__(self, *, name: str, subnet_id: str, **kwargs: Any) -> None: + def __init__(self, *, name: str, subnet_id: str, availability_zone: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: File path to verify. Required. :paramtype name: str :keyword subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Required. :paramtype subnet_id: str + :keyword availability_zone: The Azure Resource logical availability zone which is used within + zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone + where volume is placed. + :paramtype availability_zone: str """ super().__init__(**kwargs) self.name = name self.subnet_id = subnet_id + self.availability_zone = availability_zone class GetGroupIdListForLDAPUserRequest(_serialization.Model): @@ -1901,6 +2095,35 @@ def __init__( self.used_bytes = used_bytes +class KeyVaultPrivateEndpoint(_serialization.Model): + """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes + encrypted with customer-managed keys needs its own key vault private endpoint. + + :ivar virtual_network_id: Identifier for the virtual network id. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + :vartype private_endpoint_id: str + """ + + _attribute_map = { + "virtual_network_id": {"key": "virtualNetworkId", "type": "str"}, + "private_endpoint_id": {"key": "privateEndpointId", "type": "str"}, + } + + def __init__( + self, *, virtual_network_id: Optional[str] = None, private_endpoint_id: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword virtual_network_id: Identifier for the virtual network id. + :paramtype virtual_network_id: str + :keyword private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + :paramtype private_endpoint_id: str + """ + super().__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.private_endpoint_id = private_endpoint_id + + class KeyVaultProperties(_serialization.Model): """Properties of key vault. @@ -2007,6 +2230,34 @@ def __init__( self.group_membership_filter = group_membership_filter +class ListQuotaReportResponse(_serialization.Model): + """Quota Report for volume. + + :ivar value: List of volume quota report records. + :vartype value: list[~azure.mgmt.netapp.models.QuotaReport] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[QuotaReport]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.QuotaReport"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: List of volume quota report records. + :paramtype value: list[~azure.mgmt.netapp.models.QuotaReport] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + class ListReplications(_serialization.Model): """List Replications. @@ -2482,6 +2733,11 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the subscription, null equals false. :vartype disable_showmount: bool + :ivar nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :vartype nfs_v4_id_domain: str + :ivar is_multi_ad_enabled: This will have true value only if account is Multiple AD enabled. + :vartype is_multi_ad_enabled: bool """ _validation = { @@ -2493,6 +2749,8 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri "etag": {"readonly": True}, "provisioning_state": {"readonly": True}, "disable_showmount": {"readonly": True}, + "nfs_v4_id_domain": {"max_length": 255, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9.-]{0,253}[a-zA-Z0-9]$"}, + "is_multi_ad_enabled": {"readonly": True}, } _attribute_map = { @@ -2508,6 +2766,8 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri "active_directories": {"key": "properties.activeDirectories", "type": "[ActiveDirectory]"}, "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, "disable_showmount": {"key": "properties.disableShowmount", "type": "bool"}, + "nfs_v4_id_domain": {"key": "properties.nfsV4IDDomain", "type": "str"}, + "is_multi_ad_enabled": {"key": "properties.isMultiAdEnabled", "type": "bool"}, } def __init__( @@ -2518,6 +2778,7 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, active_directories: Optional[List["_models.ActiveDirectory"]] = None, encryption: Optional["_models.AccountEncryption"] = None, + nfs_v4_id_domain: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -2531,6 +2792,9 @@ def __init__( :paramtype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] :keyword encryption: Encryption settings. :paramtype encryption: ~azure.mgmt.netapp.models.AccountEncryption + :keyword nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :paramtype nfs_v4_id_domain: str """ super().__init__(tags=tags, location=location, **kwargs) self.etag = None @@ -2539,6 +2803,8 @@ def __init__( self.active_directories = active_directories self.encryption = encryption self.disable_showmount = None + self.nfs_v4_id_domain = nfs_v4_id_domain + self.is_multi_ad_enabled = None class NetAppAccountList(_serialization.Model): @@ -2569,7 +2835,7 @@ def __init__( self.next_link = next_link -class NetAppAccountPatch(_serialization.Model): +class NetAppAccountPatch(_serialization.Model): # pylint: disable=too-many-instance-attributes """NetApp account patch resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2595,6 +2861,11 @@ class NetAppAccountPatch(_serialization.Model): :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the subscription, null equals false. :vartype disable_showmount: bool + :ivar nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :vartype nfs_v4_id_domain: str + :ivar is_multi_ad_enabled: This will have true value only if account is Multiple AD enabled. + :vartype is_multi_ad_enabled: bool """ _validation = { @@ -2603,6 +2874,8 @@ class NetAppAccountPatch(_serialization.Model): "type": {"readonly": True}, "provisioning_state": {"readonly": True}, "disable_showmount": {"readonly": True}, + "nfs_v4_id_domain": {"max_length": 255, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9.-]{0,253}[a-zA-Z0-9]$"}, + "is_multi_ad_enabled": {"readonly": True}, } _attribute_map = { @@ -2616,6 +2889,8 @@ class NetAppAccountPatch(_serialization.Model): "active_directories": {"key": "properties.activeDirectories", "type": "[ActiveDirectory]"}, "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, "disable_showmount": {"key": "properties.disableShowmount", "type": "bool"}, + "nfs_v4_id_domain": {"key": "properties.nfsV4IDDomain", "type": "str"}, + "is_multi_ad_enabled": {"key": "properties.isMultiAdEnabled", "type": "bool"}, } def __init__( @@ -2626,6 +2901,7 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, active_directories: Optional[List["_models.ActiveDirectory"]] = None, encryption: Optional["_models.AccountEncryption"] = None, + nfs_v4_id_domain: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -2639,6 +2915,9 @@ def __init__( :paramtype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] :keyword encryption: Encryption settings. :paramtype encryption: ~azure.mgmt.netapp.models.AccountEncryption + :keyword nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :paramtype nfs_v4_id_domain: str """ super().__init__(**kwargs) self.location = location @@ -2651,6 +2930,8 @@ def __init__( self.active_directories = active_directories self.encryption = encryption self.disable_showmount = None + self.nfs_v4_id_domain = nfs_v4_id_domain + self.is_multi_ad_enabled = None class NetworkSiblingSet(_serialization.Model): @@ -2876,6 +3157,34 @@ def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwarg self.value = value +class PeerClusterForVolumeMigrationRequest(_serialization.Model): + """Source Cluster properties for a cluster peer request. + + All required parameters must be populated in order to send to server. + + :ivar peer_ip_addresses: A list of IC-LIF IPs that can be used to connect to the On-prem + cluster. Required. + :vartype peer_ip_addresses: list[str] + """ + + _validation = { + "peer_ip_addresses": {"required": True, "min_items": 1}, + } + + _attribute_map = { + "peer_ip_addresses": {"key": "peerIpAddresses", "type": "[str]"}, + } + + def __init__(self, *, peer_ip_addresses: List[str], **kwargs: Any) -> None: + """ + :keyword peer_ip_addresses: A list of IC-LIF IPs that can be used to connect to the On-prem + cluster. Required. + :paramtype peer_ip_addresses: list[str] + """ + super().__init__(**kwargs) + self.peer_ip_addresses = peer_ip_addresses + + class PlacementKeyValuePairs(_serialization.Model): """Application specific parameters for the placement of volumes in the volume group. @@ -3033,6 +3342,76 @@ def __init__( self.resource_group = resource_group +class QuotaReport(_serialization.Model): + """Quota report record properties. + + :ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota", + "IndividualUserQuota", and "IndividualGroupQuota". + :vartype quota_type: str or ~azure.mgmt.netapp.models.Type + :ivar quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID can + be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by + running :code:``. + :vartype quota_target: str + :ivar quota_limit_used_in_ki_bs: Specifies the current usage in kibibytes for the user/group + quota. + :vartype quota_limit_used_in_ki_bs: int + :ivar quota_limit_total_in_ki_bs: Specifies the total size limit in kibibytes for the + user/group quota. + :vartype quota_limit_total_in_ki_bs: int + :ivar percentage_used: Percentage of used size compared to total size. + :vartype percentage_used: float + :ivar is_derived_quota: Flag to indicate whether the quota is derived from default quota. + :vartype is_derived_quota: bool + """ + + _attribute_map = { + "quota_type": {"key": "quotaType", "type": "str"}, + "quota_target": {"key": "quotaTarget", "type": "str"}, + "quota_limit_used_in_ki_bs": {"key": "quotaLimitUsedInKiBs", "type": "int"}, + "quota_limit_total_in_ki_bs": {"key": "quotaLimitTotalInKiBs", "type": "int"}, + "percentage_used": {"key": "percentageUsed", "type": "float"}, + "is_derived_quota": {"key": "isDerivedQuota", "type": "bool"}, + } + + def __init__( + self, + *, + quota_type: Optional[Union[str, "_models.Type"]] = None, + quota_target: Optional[str] = None, + quota_limit_used_in_ki_bs: Optional[int] = None, + quota_limit_total_in_ki_bs: Optional[int] = None, + percentage_used: Optional[float] = None, + is_derived_quota: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota", + "IndividualUserQuota", and "IndividualGroupQuota". + :paramtype quota_type: str or ~azure.mgmt.netapp.models.Type + :keyword quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID + can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by + running :code:``. + :paramtype quota_target: str + :keyword quota_limit_used_in_ki_bs: Specifies the current usage in kibibytes for the user/group + quota. + :paramtype quota_limit_used_in_ki_bs: int + :keyword quota_limit_total_in_ki_bs: Specifies the total size limit in kibibytes for the + user/group quota. + :paramtype quota_limit_total_in_ki_bs: int + :keyword percentage_used: Percentage of used size compared to total size. + :paramtype percentage_used: float + :keyword is_derived_quota: Flag to indicate whether the quota is derived from default quota. + :paramtype is_derived_quota: bool + """ + super().__init__(**kwargs) + self.quota_type = quota_type + self.quota_target = quota_target + self.quota_limit_used_in_ki_bs = quota_limit_used_in_ki_bs + self.quota_limit_total_in_ki_bs = quota_limit_total_in_ki_bs + self.percentage_used = percentage_used + self.is_derived_quota = is_derived_quota + + class ReestablishReplicationRequest(_serialization.Model): """Re-establish request object supplied in the body of the operation. @@ -3247,6 +3626,46 @@ def __init__(self, *, creation_token: Optional[str] = None, **kwargs: Any) -> No self.creation_token = creation_token +class RemotePath(_serialization.Model): + """The full path to a volume that is to be migrated into ANF. Required for Migration volumes. + + All required parameters must be populated in order to send to server. + + :ivar external_host_name: The Path to a ONTAP Host. Required. + :vartype external_host_name: str + :ivar server_name: The name of a server on the ONTAP Host. Required. + :vartype server_name: str + :ivar volume_name: The name of a volume on the server. Required. + :vartype volume_name: str + """ + + _validation = { + "external_host_name": {"required": True}, + "server_name": {"required": True}, + "volume_name": {"required": True}, + } + + _attribute_map = { + "external_host_name": {"key": "externalHostName", "type": "str"}, + "server_name": {"key": "serverName", "type": "str"}, + "volume_name": {"key": "volumeName", "type": "str"}, + } + + def __init__(self, *, external_host_name: str, server_name: str, volume_name: str, **kwargs: Any) -> None: + """ + :keyword external_host_name: The Path to a ONTAP Host. Required. + :paramtype external_host_name: str + :keyword server_name: The name of a server on the ONTAP Host. Required. + :paramtype server_name: str + :keyword volume_name: The name of a volume on the server. Required. + :paramtype volume_name: str + """ + super().__init__(**kwargs) + self.external_host_name = external_host_name + self.server_name = server_name + self.volume_name = volume_name + + class Replication(_serialization.Model): """Replication properties. @@ -3328,15 +3747,22 @@ class ReplicationObject(_serialization.Model): :vartype endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType :ivar replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily". :vartype replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule - :ivar remote_volume_resource_id: The resource ID of the remote volume. Required. + :ivar remote_volume_resource_id: The resource ID of the remote volume. Required for cross + region and cross zone replication. Required. :vartype remote_volume_resource_id: str + :ivar remote_path: The full path to a volume that is to be migrated into ANF. Required for + Migration volumes. + :vartype remote_path: ~azure.mgmt.netapp.models.RemotePath :ivar remote_volume_region: The remote region for the other end of the Volume Replication. :vartype remote_volume_region: str + :ivar destination_replications: A list of destination replications. + :vartype destination_replications: list[~azure.mgmt.netapp.models.DestinationReplication] """ _validation = { "replication_id": {"readonly": True}, "remote_volume_resource_id": {"required": True}, + "destination_replications": {"readonly": True}, } _attribute_map = { @@ -3344,7 +3770,9 @@ class ReplicationObject(_serialization.Model): "endpoint_type": {"key": "endpointType", "type": "str"}, "replication_schedule": {"key": "replicationSchedule", "type": "str"}, "remote_volume_resource_id": {"key": "remoteVolumeResourceId", "type": "str"}, + "remote_path": {"key": "remotePath", "type": "RemotePath"}, "remote_volume_region": {"key": "remoteVolumeRegion", "type": "str"}, + "destination_replications": {"key": "destinationReplications", "type": "[DestinationReplication]"}, } def __init__( @@ -3353,6 +3781,7 @@ def __init__( remote_volume_resource_id: str, endpoint_type: Optional[Union[str, "_models.EndpointType"]] = None, replication_schedule: Optional[Union[str, "_models.ReplicationSchedule"]] = None, + remote_path: Optional["_models.RemotePath"] = None, remote_volume_region: Optional[str] = None, **kwargs: Any ) -> None: @@ -3363,8 +3792,12 @@ def __init__( :keyword replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily". :paramtype replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule - :keyword remote_volume_resource_id: The resource ID of the remote volume. Required. + :keyword remote_volume_resource_id: The resource ID of the remote volume. Required for cross + region and cross zone replication. Required. :paramtype remote_volume_resource_id: str + :keyword remote_path: The full path to a volume that is to be migrated into ANF. Required for + Migration volumes. + :paramtype remote_path: ~azure.mgmt.netapp.models.RemotePath :keyword remote_volume_region: The remote region for the other end of the Volume Replication. :paramtype remote_volume_region: str """ @@ -3373,7 +3806,9 @@ def __init__( self.endpoint_type = endpoint_type self.replication_schedule = replication_schedule self.remote_volume_resource_id = remote_volume_resource_id + self.remote_path = remote_path self.remote_volume_region = remote_volume_region + self.destination_replications = None class ReplicationStatus(_serialization.Model): @@ -4340,6 +4775,30 @@ def __init__( self.next_link = next_link +class SvmPeerCommandResponse(_serialization.Model): + """Information about svm peering process. + + :ivar svm_peering_command: A command that needs to be run on the external ONTAP to accept svm + peering. Will only be present if :code:`svmPeeringStatus` is + :code:`pending`. + :vartype svm_peering_command: str + """ + + _attribute_map = { + "svm_peering_command": {"key": "svmPeeringCommand", "type": "str"}, + } + + def __init__(self, *, svm_peering_command: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword svm_peering_command: A command that needs to be run on the external ONTAP to accept + svm peering. Will only be present if :code:`svmPeeringStatus` is + :code:`pending`. + :paramtype svm_peering_command: str + """ + super().__init__(**kwargs) + self.svm_peering_command = svm_peering_command + + class SystemData(_serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -4574,11 +5033,18 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :ivar volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :vartype volume_type: str :ivar data_protection: DataProtection type volumes include an object containing details of the replication. :vartype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :ivar accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short term + clone volume, if the parent pool does not have enough space to accommodate the volume after + split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :vartype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :ivar is_restoring: Restoring. :vartype is_restoring: bool :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -4642,7 +5108,10 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :vartype unix_permissions: str :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no @@ -4696,6 +5165,19 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes :vartype is_large_volume: bool :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. :vartype originating_resource_id: str + :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in + bytes. + :vartype inherited_size_in_bytes: int + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ _validation = { @@ -4741,6 +5223,7 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "encrypted": {"readonly": True}, "provisioned_availability_zone": {"readonly": True}, "originating_resource_id": {"readonly": True}, + "inherited_size_in_bytes": {"readonly": True}, } _attribute_map = { @@ -4770,6 +5253,10 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "mount_targets": {"key": "properties.mountTargets", "type": "[MountTargetProperties]"}, "volume_type": {"key": "properties.volumeType", "type": "str"}, "data_protection": {"key": "properties.dataProtection", "type": "VolumePropertiesDataProtection"}, + "accept_grow_capacity_pool_for_short_term_clone_split": { + "key": "properties.acceptGrowCapacityPoolForShortTermCloneSplit", + "type": "str", + }, "is_restoring": {"key": "properties.isRestoring", "type": "bool"}, "snapshot_directory_visible": {"key": "properties.snapshotDirectoryVisible", "type": "bool"}, "kerberos_enabled": {"key": "properties.kerberosEnabled", "type": "bool"}, @@ -4809,6 +5296,8 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "provisioned_availability_zone": {"key": "properties.provisionedAvailabilityZone", "type": "str"}, "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, "originating_resource_id": {"key": "properties.originatingResourceId", "type": "str"}, + "inherited_size_in_bytes": {"key": "properties.inheritedSizeInBytes", "type": "int"}, + "language": {"key": "properties.language", "type": "str"}, } def __init__( # pylint: disable=too-many-locals @@ -4829,6 +5318,9 @@ def __init__( # pylint: disable=too-many-locals network_features: Union[str, "_models.NetworkFeatures"] = "Basic", volume_type: Optional[str] = None, data_protection: Optional["_models.VolumePropertiesDataProtection"] = None, + accept_grow_capacity_pool_for_short_term_clone_split: Optional[ + Union[str, "_models.AcceptGrowCapacityPoolForShortTermCloneSplit"] + ] = None, is_restoring: Optional[bool] = None, snapshot_directory_visible: bool = True, kerberos_enabled: bool = False, @@ -4855,6 +5347,7 @@ def __init__( # pylint: disable=too-many-locals placement_rules: Optional[List["_models.PlacementKeyValuePairs"]] = None, enable_subvolumes: Union[str, "_models.EnableSubvolumes"] = "Disabled", is_large_volume: bool = False, + language: Optional[Union[str, "_models.VolumeLanguage"]] = None, **kwargs: Any ) -> None: """ @@ -4893,11 +5386,18 @@ def __init__( # pylint: disable=too-many-locals update. Known values are: "Basic", "Standard", "Basic_Standard", and "Standard_Basic". :paramtype network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures :keyword volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :paramtype volume_type: str :keyword data_protection: DataProtection type volumes include an object containing details of the replication. :paramtype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :keyword accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short + term clone volume, if the parent pool does not have enough space to accommodate the volume + after split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :paramtype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :keyword is_restoring: Restoring. :paramtype is_restoring: bool :keyword snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -4958,7 +5458,10 @@ def __init__( # pylint: disable=too-many-locals digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :paramtype unix_permissions: str :keyword avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. Known values are: "Enabled" and "Disabled". @@ -4986,6 +5489,16 @@ def __init__( # pylint: disable=too-many-locals :paramtype enable_subvolumes: str or ~azure.mgmt.netapp.models.EnableSubvolumes :keyword is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. :paramtype is_large_volume: bool + :keyword language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :paramtype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ super().__init__(tags=tags, location=location, **kwargs) self.etag = None @@ -5008,6 +5521,7 @@ def __init__( # pylint: disable=too-many-locals self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection + self.accept_grow_capacity_pool_for_short_term_clone_split = accept_grow_capacity_pool_for_short_term_clone_split self.is_restoring = is_restoring self.snapshot_directory_visible = snapshot_directory_visible self.kerberos_enabled = kerberos_enabled @@ -5044,6 +5558,8 @@ def __init__( # pylint: disable=too-many-locals self.provisioned_availability_zone = None self.is_large_volume = is_large_volume self.originating_resource_id = None + self.inherited_size_in_bytes = None + self.language = language class VolumeBackupProperties(_serialization.Model): @@ -5389,11 +5905,18 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :ivar volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :vartype volume_type: str :ivar data_protection: DataProtection type volumes include an object containing details of the replication. :vartype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :ivar accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short term + clone volume, if the parent pool does not have enough space to accommodate the volume after + split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :vartype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :ivar is_restoring: Restoring. :vartype is_restoring: bool :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -5457,7 +5980,10 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :vartype unix_permissions: str :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no @@ -5511,6 +6037,19 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- :vartype is_large_volume: bool :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. :vartype originating_resource_id: str + :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in + bytes. + :vartype inherited_size_in_bytes: int + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ _validation = { @@ -5552,6 +6091,7 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "encrypted": {"readonly": True}, "provisioned_availability_zone": {"readonly": True}, "originating_resource_id": {"readonly": True}, + "inherited_size_in_bytes": {"readonly": True}, } _attribute_map = { @@ -5578,6 +6118,10 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "mount_targets": {"key": "properties.mountTargets", "type": "[MountTargetProperties]"}, "volume_type": {"key": "properties.volumeType", "type": "str"}, "data_protection": {"key": "properties.dataProtection", "type": "VolumePropertiesDataProtection"}, + "accept_grow_capacity_pool_for_short_term_clone_split": { + "key": "properties.acceptGrowCapacityPoolForShortTermCloneSplit", + "type": "str", + }, "is_restoring": {"key": "properties.isRestoring", "type": "bool"}, "snapshot_directory_visible": {"key": "properties.snapshotDirectoryVisible", "type": "bool"}, "kerberos_enabled": {"key": "properties.kerberosEnabled", "type": "bool"}, @@ -5617,6 +6161,8 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "provisioned_availability_zone": {"key": "properties.provisionedAvailabilityZone", "type": "str"}, "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, "originating_resource_id": {"key": "properties.originatingResourceId", "type": "str"}, + "inherited_size_in_bytes": {"key": "properties.inheritedSizeInBytes", "type": "int"}, + "language": {"key": "properties.language", "type": "str"}, } def __init__( # pylint: disable=too-many-locals @@ -5637,6 +6183,9 @@ def __init__( # pylint: disable=too-many-locals network_features: Union[str, "_models.NetworkFeatures"] = "Basic", volume_type: Optional[str] = None, data_protection: Optional["_models.VolumePropertiesDataProtection"] = None, + accept_grow_capacity_pool_for_short_term_clone_split: Optional[ + Union[str, "_models.AcceptGrowCapacityPoolForShortTermCloneSplit"] + ] = None, is_restoring: Optional[bool] = None, snapshot_directory_visible: bool = True, kerberos_enabled: bool = False, @@ -5663,6 +6212,7 @@ def __init__( # pylint: disable=too-many-locals placement_rules: Optional[List["_models.PlacementKeyValuePairs"]] = None, enable_subvolumes: Union[str, "_models.EnableSubvolumes"] = "Disabled", is_large_volume: bool = False, + language: Optional[Union[str, "_models.VolumeLanguage"]] = None, **kwargs: Any ) -> None: """ @@ -5701,11 +6251,18 @@ def __init__( # pylint: disable=too-many-locals update. Known values are: "Basic", "Standard", "Basic_Standard", and "Standard_Basic". :paramtype network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures :keyword volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :paramtype volume_type: str :keyword data_protection: DataProtection type volumes include an object containing details of the replication. :paramtype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :keyword accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short + term clone volume, if the parent pool does not have enough space to accommodate the volume + after split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :paramtype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :keyword is_restoring: Restoring. :paramtype is_restoring: bool :keyword snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -5766,7 +6323,10 @@ def __init__( # pylint: disable=too-many-locals digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :paramtype unix_permissions: str :keyword avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. Known values are: "Enabled" and "Disabled". @@ -5794,6 +6354,16 @@ def __init__( # pylint: disable=too-many-locals :paramtype enable_subvolumes: str or ~azure.mgmt.netapp.models.EnableSubvolumes :keyword is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. :paramtype is_large_volume: bool + :keyword language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :paramtype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ super().__init__(**kwargs) self.id = None @@ -5819,6 +6389,7 @@ def __init__( # pylint: disable=too-many-locals self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection + self.accept_grow_capacity_pool_for_short_term_clone_split = accept_grow_capacity_pool_for_short_term_clone_split self.is_restoring = is_restoring self.snapshot_directory_visible = snapshot_directory_visible self.kerberos_enabled = kerberos_enabled @@ -5855,6 +6426,8 @@ def __init__( # pylint: disable=too-many-locals self.provisioned_availability_zone = None self.is_large_volume = is_large_volume self.originating_resource_id = None + self.inherited_size_in_bytes = None + self.language = language class VolumeList(_serialization.Model): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py index f359a05553ef..83cd32108abb 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py @@ -10,6 +10,20 @@ 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. @@ -342,7 +365,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 +377,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.""" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py index 936205a433d5..ccb1ae59982e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-05-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-05-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-05-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 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- 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 diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py index fdb52a215ae1..3eb7f8549418 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py index f05058d4c124..19aba56824e6 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py index 7d2844d0183a..9ab81c0a2756 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py index 8394c7e462a7..d8d37f07f4ea 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py index e48e13b72084..3ef35357f45d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py index 2b5f05c59544..92a499df056f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py index 4a9052fb9fc8..e30c7a064091 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -322,7 +322,7 @@ def check_name_availability( @distributed_trace def check_file_path_availability( - self, location: str, name: str, subnet_id: str, **kwargs: Any + self, location: str, name: str, subnet_id: str, availability_zone: Optional[str] = None, **kwargs: Any ) -> _models.CheckAvailabilityResponse: """Check file path availability. @@ -335,6 +335,10 @@ def check_file_path_availability( :param subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Required. :type subnet_id: str + :param availability_zone: The Azure Resource logical availability zone which is used within + zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone + where volume is placed. Default value is None. + :type availability_zone: str :return: CheckAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -354,7 +358,7 @@ def check_file_path_availability( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.CheckAvailabilityResponse] = kwargs.pop("cls", None) - _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) + _body = _models.FilePathAvailabilityRequest(availability_zone=availability_zone, name=name, subnet_id=subnet_id) _json = self._serialize.body(_body, "FilePathAvailabilityRequest") _request = build_check_file_path_availability_request( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py index 38449e428fd2..e7a54ef7a1e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py index 1c4e419c443d..07092546e470 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index e25e12b5035a..d7fa11b2d5ef 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py index 28fd4ca9a29c..a939ba410d5c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py index d1c5798518dd..f1d84da0549b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py index cb6b97b68e67..047c90c339b3 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py index 4446b41ccb40..15b76ed09b73 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py index dd5f5692b05a..cf7842158426 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py index 862d6d99edb5..de65ff001f42 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py index 0c3574ed7f1b..b13ea6046291 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py @@ -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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -812,13 +894,180 @@ def build_re_initialize_replication_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_peer_external_cluster_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-05-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}/capacityPools/{poolName}/volumes/{volumeName}/peerExternalCluster", + ) # 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 + 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_authorize_external_replication_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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}/authorizeExternalReplication", + ) # 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_finalize_external_replication_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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}/finalizeExternalReplication", + ) # 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_perform_replication_transfer_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-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}/performReplicationTransfer", + ) # 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_pool_change_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -862,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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -906,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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -947,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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2198,14 +2447,8 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _break_file_locks_initial( - self, - resource_group_name: str, - account_name: str, - pool_name: str, - volume_name: str, - body: Optional[Union[_models.BreakFileLocksRequest, IO[bytes]]] = None, - **kwargs: Any + def _split_clone_from_parent_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping[int, Type[HttpResponseError]] = { 401: ClientAuthenticationError, @@ -2215,32 +2458,159 @@ def _break_file_locks_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) 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)) - 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, "BreakFileLocksRequest") - else: - _json = None - - _request = build_break_file_locks_request( + _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, - content_type=content_type, + 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, + account_name: str, + pool_name: str, + volume_name: str, + body: Optional[Union[_models.BreakFileLocksRequest, 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, "BreakFileLocksRequest") + else: + _json = None + + _request = build_break_file_locks_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, json=_json, content=_content, headers=_headers, @@ -2657,6 +3027,133 @@ def get_long_running_output(pipeline_response): 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, @@ -3831,6 +4328,606 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _peer_external_cluster_initial( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Union[_models.PeerClusterForVolumeMigrationRequest, IO[bytes]], + **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: + _json = self._serialize.body(body, "PeerClusterForVolumeMigrationRequest") + + _request = build_peer_external_cluster_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + 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 [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 + + @overload + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: _models.PeerClusterForVolumeMigrationRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either ClusterPeerCommandResponse or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either ClusterPeerCommandResponse or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_peer_external_cluster( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + body: Union[_models.PeerClusterForVolumeMigrationRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ClusterPeerCommandResponse]: + """Start Cluster peering. + + Starts peering the external cluster for this migration volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :param body: Cluster peer request object supplied in the body of the operation. Is either a + PeerClusterForVolumeMigrationRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or IO[bytes] + :return: An instance of LROPoller that returns either ClusterPeerCommandResponse or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse] + :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[_models.ClusterPeerCommandResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._peer_external_cluster_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + body=body, + 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): + deserialized = self._deserialize("ClusterPeerCommandResponse", 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.ClusterPeerCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ClusterPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _authorize_external_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[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_authorize_external_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_authorize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[_models.SvmPeerCommandResponse]: + """Start migration process. + + Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once + the SVM have been peered a SnapMirror will be created. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns either SvmPeerCommandResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse] + :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.SvmPeerCommandResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._authorize_external_replication_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + 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("SvmPeerCommandResponse", 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.SvmPeerCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SvmPeerCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _finalize_external_replication_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[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_finalize_external_replication_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_finalize_external_replication( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Finalize migration process. + + Finalizes the migration of an external volume by releasing the replication and breaking the + external cluster peering if no other migration is active. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns 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._finalize_external_replication_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 _perform_replication_transfer_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[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_perform_replication_transfer_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=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_perform_replication_transfer( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Perform a replication transfer. + + Performs an adhoc replication transfer on a volume with volumeType Migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns 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._perform_replication_transfer_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 _pool_change_initial( self, resource_group_name: str, diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py new file mode 100644 index 000000000000..55d57d1dfd8b --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py @@ -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-05-01-preview/examples/Accounts_ChangeKeyVault.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py index 9a32f11827c9..84d493c1bb80 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -40,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py index 78468320a670..dedc461a5296 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -58,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdateAD.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_CreateOrUpdateAD.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py index f142f7726284..2fba6e40e917 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py index 9568bd4fa406..11dddff61fb9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py new file mode 100644 index 000000000000..f35447f7fa01 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py @@ -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-05-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py index 575b51de4056..e41d87213742 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py index a55942cb8095..bdc7076e3ce1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_RenewCredentials.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_RenewCredentials.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py new file mode 100644 index 000000000000..dd46804ec55f --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py @@ -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-05-01-preview/examples/Accounts_TransitionEncryptionKey.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py index b02c41bbe46b..62a0056e7303 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -40,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Accounts_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py index 1bb88a45d12a..f1f3dee6b64f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -49,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py index acc166cbec67..fc00edae3a50 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py index bc253ed6a7bc..9657dac562c7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py index 1d5add643f57..8863996177b9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py index 3d1e09dfc3af..4abce4a64b24 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -49,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py index 8d96c08570e6..84cba9f0bbfa 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -41,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupVaults_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py index 033ed2c023db..73113841d243 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupVaults_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py index 1967f1165a10..43969e56c8a3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupVaults_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py index 1be4da3e4d22..43ee7ee67a22 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupVaults_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py index eb9b96c1603f..e13ac5d40b95 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -41,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupVaults_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py index 80b9da2851b3..33cef87d4d26 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -41,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderAccount_Migrate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderAccount_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py index 8e6d46e9c051..56e72130bdc3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -47,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py index 4519bcb7ff93..6bcaab9f0e5a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py index f2478f6a6f38..31f73576dfd8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py index f7de26fd547a..f7ed59387d7a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py index 0f475c9545dd..7a485ece320f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -44,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_SingleFileRestore.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py index 7836045b94e7..4ab69330233e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderBackupVault_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py index 82ea77a9efad..c703f9313951 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderVolume_Migrate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/BackupsUnderVolume_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py index de66acbf9004..805310d1dc46 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -42,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/GroupIdListForLDAPUser.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/GroupIdListForLDAPUser.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py index 99f6e31ee67b..b3b8b9083502 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/OperationList.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py index 28ecb72603b9..0b39da838ebc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -44,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Pools_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py index 81fc85b14855..63c9602f0a68 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Pools_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py index ca7e0478cad6..10ed407e91f7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Pools_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py index f2ba839701c8..c8af3d46c1a6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Pools_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py index 2c130968c24a..a141a31714db 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/QuotaLimits_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py index 4b4ec4fd8afa..a4390042b9be 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/QuotaLimits_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py index 1a56ecad70c9..191338fd263c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfo.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/RegionInfo.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py index beda92df4627..44bbc9d87139 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/RegionInfos_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py index cd4e2790e8a3..11c2013d435a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/RegionInfos_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py index db1ad8943ccb..aad9b390c432 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -50,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py index 8da3b1bb3113..fcd4ad9b3e5e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py index 8bc3d6616bea..09f200ac6bbd 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py index 028dfca49e1c..9aed472ee5b0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py index fea2521a5344..b2d89f2ed4cb 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_ListVolumes.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_ListVolumes.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py index 0a9ad73c483e..fde025e51fc3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -50,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/SnapshotPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py index c8a5420cdbcc..a8a4622725d1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Snapshots_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py index d0735e713088..c714db433fff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Snapshots_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py index cbb77028fa14..abf84fb50bea 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Snapshots_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py index e54711196877..6c50b71870d4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Snapshots_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py index 53c9f023174e..3c00f0a0f80f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -42,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_SingleFileRestore.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Snapshots_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py index 19930ddb1d7a..aa0a4db4cbab 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py index c23fbe0f584c..964623aa3ca8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py index 9a9fc83b54a5..72c21003d8b1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py index 3516158485ed..b069085eeab8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py index eb35b091dee8..767b047833e3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Metadata.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_Metadata.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py index dcd316786a95..a14fbc0469a4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Subvolumes_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py index aacdbef2c00b..77a38bb7ae45 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -460,6 +458,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_Create_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py index 09de35302684..cd9e6db5bdf4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -222,6 +220,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_Create_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py index c729e0d21efe..6b74d1edb936 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py index 0ab4fb456fe7..9796df406a93 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_Get_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py index c075336a6e33..61d8fb29dc05 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_Get_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py index 46bb60d36af3..11fcc671a6ac 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_List_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py index a5ef208c4549..07c994957aa6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeGroups_List_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py index 864abfecbd54..a1f5b65c0cb1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -46,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeQuotaRules_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py index d2ea9f22c3fd..ed040fef6abe 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeQuotaRules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py index 181bd10982aa..d8f58471e7db 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeQuotaRules_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py index 2481b5552aab..7d4551acda3c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeQuotaRules_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py index 7ea74df2e9c0..13ae07d5d074 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/VolumeQuotaRules_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py new file mode 100644 index 000000000000..26cfa056a068 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py @@ -0,0 +1,44 @@ +# 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 volumes_authorize_external_replication.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.volumes.begin_authorize_external_replication( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_AuthorizeExternalReplication.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py index e01de4f6b961..5555210fed33 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_AuthorizeReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_AuthorizeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py index 5686bcf55f74..47c1be9610b8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakFileLocks.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_BreakFileLocks.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py index 27acfc19b39e..a39b400dd897 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_BreakReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py index 44a576423002..700d6bbda695 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -50,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py index 88fad9af83b3..4c553c3b1d35 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py index de894aa5e67b..063ca5544684 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_DeleteReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_DeleteReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py new file mode 100644 index 000000000000..3f968663b303 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py @@ -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 volumes_finalize_external_replication.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.volumes.begin_finalize_external_replication( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_FinalizeExternalReplication.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py index e91201a6a269..fa795fe4c89d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_FinalizeRelocation.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_FinalizeRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py index 8c86edbbfbcf..af352717f1c2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py index 48567f32ed79..15093ec3b9c6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestBackupStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_LatestBackupStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py index f35bb9c6c33b..950976a8a6a6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestRestoreStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_LatestRestoreStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py index 9c66dea7ca0e..ceb2f6aa5907 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py new file mode 100644 index 000000000000..bd6c2ccbfa62 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py @@ -0,0 +1,44 @@ +# 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 volumes_list_quota_report.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.volumes.begin_list_quota_report( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ListQuotaReport.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py index 1575ba071122..0eb143f4e6b8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ListReplications.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ListReplications.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py new file mode 100644 index 000000000000..401f623414ca --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py @@ -0,0 +1,45 @@ +# 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 volumes_peer_external_cluster.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.volumes.begin_peer_external_cluster( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + body={"peerIpAddresses": ["0.0.0.1", "0.0.0.2", "0.0.0.3", "0.0.0.4", "0.0.0.5", "0.0.0.6"]}, + ).result() + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_PeerExternalCluster.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py new file mode 100644 index 000000000000..268463c761b1 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py @@ -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 volumes_perform_replication_transfer.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.volumes.begin_perform_replication_transfer( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_PerformReplicationTransfer.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py index 22c575b83089..ef58894bd753 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PoolChange.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_PoolChange.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py index fe8b6111252e..36c790af8f42 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PopulateAvailabilityZones.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_PopulateAvailabilityZones.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py index 290743793198..998c96e1cc4b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReInitializeReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ReInitializeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py index 3da5b4ea8f8e..220cbf942911 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReestablishReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ReestablishReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py index fd21d6a7d153..63b36d54e25b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Relocate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_Relocate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py index b5f75e1332aa..f0984504689c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReplicationStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ReplicationStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py index ae35ee017423..f9d07993398c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResetCifsPassword.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ResetCifsPassword.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py index e031b49699b5..2661224c393c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResyncReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_ResyncReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py index de8c67604c51..eeb36bae5426 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.netapp import NetAppManagementClient @@ -43,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Revert.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_Revert.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py index d5f241b0caf3..03fe41cd8870 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_RevertRelocation.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_RevertRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py new file mode 100644 index 000000000000..7b7cedd8fcfc --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py @@ -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 volumes_split_clone.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.volumes.begin_split_clone_from_parent( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-05-01-preview/examples/Volumes_SplitClone.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py index ececad23010b..30681fd20884 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_list_by_subscription(self, resource_group): response = self.client.accounts.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_list_by_subscription(self, resource_group): def test_list(self, resource_group): response = self.client.accounts.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): response = self.client.accounts.get( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_begin_create_or_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -106,7 +106,9 @@ def test_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -119,7 +121,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -131,7 +133,7 @@ def test_begin_delete(self, resource_group): response = self.client.accounts.begin_delete( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -173,7 +175,7 @@ def test_begin_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -190,13 +192,15 @@ def test_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "location": "str", "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -208,7 +212,43 @@ def test_begin_renew_credentials(self, resource_group): response = self.client.accounts.begin_renew_credentials( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_transition_to_cmk(self, resource_group): + response = self.client.accounts.begin_transition_to_cmk( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_get_change_key_vault_information(self, resource_group): + response = self.client.accounts.begin_get_change_key_vault_information( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_change_key_vault(self, resource_group): + response = self.client.accounts.begin_change_key_vault( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py index e7ca6676b262..b3c07118d2d3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_list_by_subscription(self, resource_group): response = self.client.accounts.list_by_subscription( - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_list_by_subscription(self, resource_group): async def test_list(self, resource_group): response = self.client.accounts.list( resource_group_name=resource_group.name, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): response = await self.client.accounts.get( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -90,7 +90,7 @@ async def test_begin_create_or_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -108,7 +108,9 @@ async def test_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -121,7 +123,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -135,7 +137,7 @@ async def test_begin_delete(self, resource_group): await self.client.accounts.begin_delete( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -179,7 +181,7 @@ async def test_begin_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -196,13 +198,15 @@ async def test_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "location": "str", "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -216,7 +220,49 @@ async def test_begin_renew_credentials(self, resource_group): await self.client.accounts.begin_renew_credentials( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_transition_to_cmk(self, resource_group): + response = await ( + await self.client.accounts.begin_transition_to_cmk( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_get_change_key_vault_information(self, resource_group): + response = await ( + await self.client.accounts.begin_get_change_key_vault_information( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_change_key_vault(self, resource_group): + response = await ( + await self.client.accounts.begin_change_key_vault( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py index 6635f10eb167..9c0b2b740947 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.backup_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_begin_create(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -106,7 +106,7 @@ def test_begin_update(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +119,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py index f27b981ea597..6661a49c805b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.backup_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_begin_create(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_update(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -125,7 +125,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py index 9a6a8dcec038..82423293042d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py @@ -24,7 +24,7 @@ def test_list_by_net_app_account(self, resource_group): response = self.client.backup_vaults.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -66,7 +66,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", body={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py index 4bbaa9a0a1a8..bbdb8c91427e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py @@ -25,7 +25,7 @@ async def test_list_by_net_app_account(self, resource_group): response = self.client.backup_vaults.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -84,7 +84,7 @@ async def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", body={"tags": {"str": "str"}}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -99,7 +99,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py index 7b62cb03b029..9af6eca55a2d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py @@ -26,7 +26,7 @@ def test_get_latest_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ def test_get_volume_latest_restore_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_list_by_vault(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_get(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -89,6 +89,7 @@ def test_begin_create(self, resource_group): "creationDate": "2020-02-20 00:00:00", "failureReason": "str", "id": "str", + "isLargeVolume": bool, "label": "str", "name": "str", "provisioningState": "str", @@ -105,7 +106,7 @@ def test_begin_create(self, resource_group): "type": "str", "useExistingSnapshot": False, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +120,7 @@ def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -133,7 +134,7 @@ def test_begin_delete(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py index fe7c37d7197d..9aa76e5393bb 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py @@ -27,7 +27,7 @@ async def test_get_latest_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ async def test_get_volume_latest_restore_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_list_by_vault(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_get(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -91,6 +91,7 @@ async def test_begin_create(self, resource_group): "creationDate": "2020-02-20 00:00:00", "failureReason": "str", "id": "str", + "isLargeVolume": bool, "label": "str", "name": "str", "provisioningState": "str", @@ -107,7 +108,7 @@ async def test_begin_create(self, resource_group): "type": "str", "useExistingSnapshot": False, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -123,7 +124,7 @@ async def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -139,7 +140,7 @@ async def test_begin_delete(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py index cc9e88300116..3a5dcd51196e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py @@ -25,7 +25,7 @@ def test_begin_migrate_backups(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={"backupVaultId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py index d4b3779b7cb6..76bdfaf03295 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py @@ -27,7 +27,7 @@ async def test_begin_migrate_backups(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={"backupVaultId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py index 527567183527..3057e1df8de8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py @@ -27,7 +27,7 @@ def test_begin_restore_files(self, resource_group): backup_vault_name="str", backup_name="str", body={"destinationVolumeId": "str", "fileList": ["str"], "restoreFilePath": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py index b5cedb3df437..18a9dd53492e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py @@ -29,7 +29,7 @@ async def test_begin_restore_files(self, resource_group): backup_vault_name="str", backup_name="str", body={"destinationVolumeId": "str", "fileList": ["str"], "restoreFilePath": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py index 08810a1f9c54..1c150cf285bc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py @@ -27,7 +27,7 @@ def test_begin_migrate_backups(self, resource_group): pool_name="str", volume_name="str", body={"backupVaultId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py index 50c9e9f5a892..1ff6e60e8354 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py @@ -29,7 +29,7 @@ async def test_begin_migrate_backups(self, resource_group): pool_name="str", volume_name="str", body={"backupVaultId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py index 29ad4274e3b1..52438d8c00b6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py @@ -26,7 +26,7 @@ def test_check_name_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_check_file_path_availability(self, resource_group): location="str", name="str", subnet_id="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_check_quota_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_check_quota_availability(self, resource_group): def test_query_region_info(self, resource_group): response = self.client.net_app_resource.query_region_info( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_query_network_sibling_set(self, resource_group): location="str", network_sibling_set_id="str", subnet_id="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ def test_begin_update_network_sibling_set(self, resource_group): subnet_id="str", network_sibling_set_state_id="str", network_features="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py index 95a2213aebb7..9d98ccb75779 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py @@ -27,7 +27,7 @@ async def test_check_name_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_check_file_path_availability(self, resource_group): location="str", name="str", subnet_id="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_check_quota_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_check_quota_availability(self, resource_group): async def test_query_region_info(self, resource_group): response = await self.client.net_app_resource.query_region_info( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_query_network_sibling_set(self, resource_group): location="str", network_sibling_set_id="str", subnet_id="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_begin_update_network_sibling_set(self, resource_group): subnet_id="str", network_sibling_set_state_id="str", network_features="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py index b3ce0f0f3eea..f4f805ba5b09 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_list(self, resource_group): response = self.client.net_app_resource_quota_limits.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -35,7 +35,7 @@ def test_get(self, resource_group): response = self.client.net_app_resource_quota_limits.get( location="str", quota_limit_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py index 97f7a9ee320d..d238312fb174 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_list(self, resource_group): response = self.client.net_app_resource_quota_limits.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -36,7 +36,7 @@ async def test_get(self, resource_group): response = await self.client.net_app_resource_quota_limits.get( location="str", quota_limit_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py index bc12b7940905..dafd21aa2172 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_list(self, resource_group): response = self.client.net_app_resource_region_infos.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ def test_list(self, resource_group): def test_get(self, resource_group): response = self.client.net_app_resource_region_infos.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py index f51f988f8754..764745a11649 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_list(self, resource_group): response = self.client.net_app_resource_region_infos.list( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,7 +35,7 @@ async def test_list(self, resource_group): async def test_get(self, resource_group): response = await self.client.net_app_resource_region_infos.get( location="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py index 53d81993652c..86d7eb83dfd3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_list(self, resource_group): response = self.client.operations.list( - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py index e6e73de55d5a..8e87c70309af 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_list(self, resource_group): response = self.client.operations.list( - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py index 17be0b5736f5..673d3ec468e4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.pools.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "utilizedThroughputMibps": 0.0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -98,7 +98,7 @@ def test_begin_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,7 +111,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py index 61d07836b125..aec83107c3d8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.pools.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "utilizedThroughputMibps": 0.0, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -102,7 +102,7 @@ async def test_begin_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -117,7 +117,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py index 1cfe65e89d55..1f18ec4c7c47 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.snapshot_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_create(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ def test_begin_update(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,7 +111,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -124,7 +124,7 @@ def test_list_volumes(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py index 564f918d5d82..10387709e83e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.snapshot_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_create(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_begin_update(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -121,7 +121,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -135,7 +135,7 @@ async def test_list_volumes(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py index 85f75f047bb0..1a68b69ec16c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py @@ -26,7 +26,7 @@ def test_list(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,7 +89,7 @@ def test_begin_update(self, resource_group): volume_name="str", snapshot_name="str", body={}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -120,7 +120,7 @@ def test_begin_restore_files(self, resource_group): volume_name="str", snapshot_name="str", body={"filePaths": ["str"], "destinationPath": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py index b9d37f82d446..2d3d08a578b4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py @@ -27,7 +27,7 @@ async def test_list(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,7 +93,7 @@ async def test_begin_update(self, resource_group): volume_name="str", snapshot_name="str", body={}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -128,7 +128,7 @@ async def test_begin_restore_files(self, resource_group): volume_name="str", snapshot_name="str", body={"filePaths": ["str"], "destinationPath": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py index 055cb37d77b3..958996547b81 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py @@ -26,7 +26,7 @@ def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,7 +89,7 @@ def test_begin_update(self, resource_group): volume_name="str", subvolume_name="str", body={"path": "str", "size": 0}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +119,7 @@ def test_begin_get_metadata(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py index f1cac97cbf23..ce8f45807e33 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py @@ -27,7 +27,7 @@ async def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,7 +93,7 @@ async def test_begin_update(self, resource_group): volume_name="str", subvolume_name="str", body={"path": "str", "size": 0}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -127,7 +127,7 @@ async def test_begin_get_metadata(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py index e329da8ba160..a2ef0dd87006 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py @@ -24,7 +24,7 @@ def test_list_by_net_app_account(self, resource_group): response = self.client.volume_groups.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -68,6 +68,7 @@ def test_begin_create(self, resource_group): "creationToken": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -81,7 +82,11 @@ def test_begin_create(self, resource_group): "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", + "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", "replicationId": "str", "replicationSchedule": "str", @@ -120,11 +125,13 @@ def test_begin_create(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -160,7 +167,7 @@ def test_begin_create(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -173,7 +180,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py index f6abd9b8146c..bb23696071e4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py @@ -25,7 +25,7 @@ async def test_list_by_net_app_account(self, resource_group): response = self.client.volume_groups.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -70,6 +70,7 @@ async def test_begin_create(self, resource_group): "creationToken": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -83,7 +84,11 @@ async def test_begin_create(self, resource_group): "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", + "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", "replicationId": "str", "replicationSchedule": "str", @@ -122,11 +127,13 @@ async def test_begin_create(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -167,7 +174,7 @@ async def test_begin_create(self, resource_group): } ], }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -182,7 +189,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py index e6673577a864..94869ef62956 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py @@ -26,7 +26,7 @@ def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -97,7 +97,7 @@ def test_begin_update(self, resource_group): "quotaType": "str", "tags": {"str": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -112,7 +112,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py index 6e0fa6dba84a..3ee983d859d4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py @@ -27,7 +27,7 @@ async def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -101,7 +101,7 @@ async def test_begin_update(self, resource_group): "quotaType": "str", "tags": {"str": "str"}, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -118,7 +118,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py index 29becfa3ab09..51016a41fa41 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py @@ -25,7 +25,7 @@ def test_list(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_get(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -58,6 +58,7 @@ def test_begin_create_or_update(self, resource_group): "location": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -71,7 +72,11 @@ def test_begin_create_or_update(self, resource_group): "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", + "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", "replicationId": "str", "replicationSchedule": "str", @@ -111,11 +116,13 @@ def test_begin_create_or_update(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -157,7 +164,7 @@ def test_begin_create_or_update(self, resource_group): "volumeType": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -217,7 +224,7 @@ def test_begin_update(self, resource_group): "unixPermissions": "str", "usageThreshold": 107374182400, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -231,7 +238,7 @@ def test_begin_delete(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -245,7 +252,7 @@ def test_begin_populate_availability_zone(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -260,7 +267,7 @@ def test_begin_revert(self, resource_group): pool_name="str", volume_name="str", body={"snapshotId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -274,7 +281,21 @@ def test_begin_reset_cifs_password(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_split_clone_from_parent(self, resource_group): + response = self.client.volumes.begin_split_clone_from_parent( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -288,7 +309,7 @@ def test_begin_break_file_locks(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -303,7 +324,21 @@ def test_begin_list_get_group_id_list_for_ldap_user(self, resource_group): pool_name="str", volume_name="str", body={"username": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_list_quota_report(self, resource_group): + response = self.client.volumes.begin_list_quota_report( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -317,7 +352,7 @@ def test_begin_break_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -332,7 +367,7 @@ def test_begin_reestablish_replication(self, resource_group): pool_name="str", volume_name="str", body={"sourceVolumeId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -346,7 +381,7 @@ def test_replication_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -360,7 +395,7 @@ def test_list_replications(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -374,7 +409,7 @@ def test_begin_resync_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -388,7 +423,7 @@ def test_begin_delete_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -403,7 +438,7 @@ def test_begin_authorize_replication(self, resource_group): pool_name="str", volume_name="str", body={"remoteVolumeResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -417,7 +452,64 @@ def test_begin_re_initialize_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_peer_external_cluster(self, resource_group): + response = self.client.volumes.begin_peer_external_cluster( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + body={"peerIpAddresses": ["str"]}, + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_authorize_external_replication(self, resource_group): + response = self.client.volumes.begin_authorize_external_replication( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_finalize_external_replication(self, resource_group): + response = self.client.volumes.begin_finalize_external_replication( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_perform_replication_transfer(self, resource_group): + response = self.client.volumes.begin_perform_replication_transfer( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -432,7 +524,7 @@ def test_begin_pool_change(self, resource_group): pool_name="str", volume_name="str", body={"newPoolResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -446,7 +538,7 @@ def test_begin_relocate(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -460,7 +552,7 @@ def test_begin_finalize_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -474,7 +566,7 @@ def test_begin_revert_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py index 8d51ea54aa72..0e2951ef3b57 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py @@ -26,7 +26,7 @@ async def test_list(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_get(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -60,6 +60,7 @@ async def test_begin_create_or_update(self, resource_group): "location": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -73,7 +74,11 @@ async def test_begin_create_or_update(self, resource_group): "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", + "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", "replicationId": "str", "replicationSchedule": "str", @@ -113,11 +118,13 @@ async def test_begin_create_or_update(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -159,7 +166,7 @@ async def test_begin_create_or_update(self, resource_group): "volumeType": "str", "zones": ["str"], }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -221,7 +228,7 @@ async def test_begin_update(self, resource_group): "unixPermissions": "str", "usageThreshold": 107374182400, }, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -237,7 +244,7 @@ async def test_begin_delete(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -253,7 +260,7 @@ async def test_begin_populate_availability_zone(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -270,7 +277,7 @@ async def test_begin_revert(self, resource_group): pool_name="str", volume_name="str", body={"snapshotId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -286,7 +293,23 @@ async def test_begin_reset_cifs_password(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_split_clone_from_parent(self, resource_group): + response = await ( + await self.client.volumes.begin_split_clone_from_parent( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -302,7 +325,7 @@ async def test_begin_break_file_locks(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -319,7 +342,23 @@ async def test_begin_list_get_group_id_list_for_ldap_user(self, resource_group): pool_name="str", volume_name="str", body={"username": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_list_quota_report(self, resource_group): + response = await ( + await self.client.volumes.begin_list_quota_report( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -335,7 +374,7 @@ async def test_begin_break_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -352,7 +391,7 @@ async def test_begin_reestablish_replication(self, resource_group): pool_name="str", volume_name="str", body={"sourceVolumeId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -367,7 +406,7 @@ async def test_replication_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) # please add some check logic here by yourself @@ -381,7 +420,7 @@ async def test_list_replications(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -396,7 +435,7 @@ async def test_begin_resync_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -412,7 +451,7 @@ async def test_begin_delete_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -429,7 +468,7 @@ async def test_begin_authorize_replication(self, resource_group): pool_name="str", volume_name="str", body={"remoteVolumeResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -445,7 +484,72 @@ async def test_begin_re_initialize_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_peer_external_cluster(self, resource_group): + response = await ( + await self.client.volumes.begin_peer_external_cluster( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + body={"peerIpAddresses": ["str"]}, + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_authorize_external_replication(self, resource_group): + response = await ( + await self.client.volumes.begin_authorize_external_replication( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_finalize_external_replication(self, resource_group): + response = await ( + await self.client.volumes.begin_finalize_external_replication( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_perform_replication_transfer(self, resource_group): + response = await ( + await self.client.volumes.begin_perform_replication_transfer( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -462,7 +566,7 @@ async def test_begin_pool_change(self, resource_group): pool_name="str", volume_name="str", body={"newPoolResourceId": "str"}, - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -478,7 +582,7 @@ async def test_begin_relocate(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -494,7 +598,7 @@ async def test_begin_finalize_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -510,7 +614,7 @@ async def test_begin_revert_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-03-01", + api_version="2024-05-01-preview", ) ).result() # call '.result()' to poll until service return final result