diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/_meta.json b/sdk/hybridcompute/azure-mgmt-hybridcompute/_meta.json index db826fa54add..300b3904d1cb 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/_meta.json +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "a3a99cb1a7fac19acb046b4920fce6945dc7e8a2", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "eee344ca99c37227bff60724f57af7a06fe6d34d", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/hybridcompute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/hybridcompute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/hybridcompute/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_configuration.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_configuration.py index 82da0fb7f0c1..ec5844126434 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_configuration.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-25-preview" + self.api_version = "2021-06-10-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py index 58cea5eab691..f87cfe7c613a 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py @@ -21,6 +21,7 @@ from ._configuration import HybridComputeManagementClientConfiguration from .operations import MachinesOperations from .operations import MachineExtensionsOperations +from .operations import HybridComputeManagementClientOperationsMixin from .operations import Operations from .operations import PrivateLinkScopesOperations from .operations import PrivateLinkResourcesOperations @@ -28,7 +29,7 @@ from . import models -class HybridComputeManagementClient(object): +class HybridComputeManagementClient(HybridComputeManagementClientOperationsMixin): """The Hybrid Compute Management Client. :ivar machines: MachinesOperations operations diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_metadata.json b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_metadata.json index a62da80bda41..9c7e81dfd5ac 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_metadata.json +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-03-25-preview", - "total_api_version_list": ["2021-03-25-preview"], + "chosen_version": "2021-06-10-preview", + "total_api_version_list": ["2021-06-10-preview"], "client": { "name": "HybridComputeManagementClient", "filename": "_hybrid_compute_management_client", @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HybridComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HybridComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HybridComputeManagementClientConfiguration\"], \"._operations_mixin\": [\"HybridComputeManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HybridComputeManagementClientConfiguration\"], \"._operations_mixin\": [\"HybridComputeManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -104,5 +104,35 @@ "private_link_scopes": "PrivateLinkScopesOperations", "private_link_resources": "PrivateLinkResourcesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "_upgrade_extensions_initial" : { + "sync": { + "signature": "def _upgrade_extensions_initial(\n self,\n resource_group_name, # type: str\n machine_name, # type: str\n extension_upgrade_parameters, # type: \"_models.MachineExtensionUpgrade\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param machine_name: The name of the hybrid machine.\n:type machine_name: str\n:param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation.\n:type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _upgrade_extensions_initial(\n self,\n resource_group_name: str,\n machine_name: str,\n extension_upgrade_parameters: \"_models.MachineExtensionUpgrade\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param machine_name: The name of the hybrid machine.\n:type machine_name: str\n:param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation.\n:type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, machine_name, extension_upgrade_parameters" + }, + "begin_upgrade_extensions" : { + "sync": { + "signature": "def begin_upgrade_extensions(\n self,\n resource_group_name, # type: str\n machine_name, # type: str\n extension_upgrade_parameters, # type: \"_models.MachineExtensionUpgrade\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"The operation to Upgrade Machine Extensions.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param machine_name: The name of the hybrid machine.\n:type machine_name: str\n:param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation.\n:type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_upgrade_extensions(\n self,\n resource_group_name: str,\n machine_name: str,\n extension_upgrade_parameters: \"_models.MachineExtensionUpgrade\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", + "doc": "\"\"\"The operation to Upgrade Machine Extensions.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param machine_name: The name of the hybrid machine.\n:type machine_name: str\n:param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation.\n:type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, machine_name, extension_upgrade_parameters" + } + } } } \ No newline at end of file diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_version.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_version.py index 364f3c906cf9..e5754a47ce68 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_version.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_configuration.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_configuration.py index 80d85a139884..34297bb823aa 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_configuration.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-25-preview" + self.api_version = "2021-06-10-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py index 7171b140384d..f901354845cc 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py @@ -19,6 +19,7 @@ from ._configuration import HybridComputeManagementClientConfiguration from .operations import MachinesOperations from .operations import MachineExtensionsOperations +from .operations import HybridComputeManagementClientOperationsMixin from .operations import Operations from .operations import PrivateLinkScopesOperations from .operations import PrivateLinkResourcesOperations @@ -26,7 +27,7 @@ from .. import models -class HybridComputeManagementClient(object): +class HybridComputeManagementClient(HybridComputeManagementClientOperationsMixin): """The Hybrid Compute Management Client. :ivar machines: MachinesOperations operations diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/__init__.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/__init__.py index 0459441055d9..f77aada04882 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/__init__.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/__init__.py @@ -8,6 +8,7 @@ from ._machines_operations import MachinesOperations from ._machine_extensions_operations import MachineExtensionsOperations +from ._hybrid_compute_management_client_operations import HybridComputeManagementClientOperationsMixin from ._operations import Operations from ._private_link_scopes_operations import PrivateLinkScopesOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -16,6 +17,7 @@ __all__ = [ 'MachinesOperations', 'MachineExtensionsOperations', + 'HybridComputeManagementClientOperationsMixin', 'Operations', 'PrivateLinkScopesOperations', 'PrivateLinkResourcesOperations', diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py new file mode 100644 index 000000000000..5fe3798a13a6 --- /dev/null +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py @@ -0,0 +1,142 @@ +# 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 typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class HybridComputeManagementClientOperationsMixin: + + async def _upgrade_extensions_initial( + self, + resource_group_name: str, + machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-10-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._upgrade_extensions_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'machineName': self._serialize.url("machine_name", machine_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions'} # type: ignore + + async def begin_upgrade_extensions( + self, + resource_group_name: str, + machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'machineName': self._serialize.url("machine_name", machine_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions'} # type: ignore diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machine_extensions_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machine_extensions_operations.py index f52cebfc5b7f..2faad1d1eab2 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machine_extensions_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machine_extensions_operations.py @@ -49,21 +49,21 @@ async def _create_or_update_initial( machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtension", - **kwargs + **kwargs: Any ) -> Optional["_models.MachineExtension"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -107,7 +107,7 @@ async def begin_create_or_update( machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtension", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.MachineExtension"]: """The operation to create or update the extension. @@ -121,8 +121,8 @@ async def begin_create_or_update( :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtension :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of cls(response) @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -183,21 +183,21 @@ async def _update_initial( machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtensionUpdate", - **kwargs + **kwargs: Any ) -> Optional["_models.MachineExtension"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -241,7 +241,7 @@ async def begin_update( machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtensionUpdate", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.MachineExtension"]: """The operation to create or update the extension. @@ -255,8 +255,8 @@ async def begin_update( :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of cls(response) @@ -291,7 +291,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -316,20 +316,20 @@ async def _delete_initial( resource_group_name: str, machine_name: str, extension_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -363,7 +363,7 @@ async def begin_delete( resource_group_name: str, machine_name: str, extension_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """The operation to delete the extension. @@ -375,8 +375,8 @@ async def begin_delete( :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -407,7 +407,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -432,7 +432,7 @@ async def get( resource_group_name: str, machine_name: str, extension_name: str, - **kwargs + **kwargs: Any ) -> "_models.MachineExtension": """The operation to get the extension. @@ -452,13 +452,13 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -495,7 +495,7 @@ def list( resource_group_name: str, machine_name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MachineExtensionsListResult"]: """The operation to get all extensions of a non-Azure machine. @@ -515,7 +515,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -527,7 +527,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machines_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machines_operations.py index ab8b801428b7..02cffdee8263 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machines_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_machines_operations.py @@ -45,7 +45,7 @@ async def delete( self, resource_group_name: str, machine_name: str, - **kwargs + **kwargs: Any ) -> None: """The operation to remove a hybrid machine identity in Azure. @@ -63,14 +63,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ async def get( resource_group_name: str, machine_name: str, expand: Optional[Union[str, "_models.InstanceViewTypes"]] = None, - **kwargs + **kwargs: Any ) -> "_models.Machine": """Retrieves information about the model view or the instance view of a hybrid machine. @@ -122,14 +122,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -164,7 +164,7 @@ async def get( def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MachineListResult"]: """Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. @@ -181,7 +181,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -194,7 +194,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -235,7 +235,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MachineListResult"]: """Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. @@ -250,7 +250,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_operations.py index 6538f4d5f279..7570e5ee2640 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Gets a list of hybrid compute operations. @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_endpoint_connections_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_endpoint_connections_operations.py index 407544b50777..8637baca34c1 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets a private endpoint connection. @@ -68,14 +68,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -112,14 +112,14 @@ async def _create_or_update_initial( scope_name: str, private_endpoint_connection_name: str, parameters: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -127,7 +127,7 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -170,7 +170,7 @@ async def begin_create_or_update( scope_name: str, private_endpoint_connection_name: str, parameters: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Approve or reject a private endpoint connection with a given name. @@ -184,8 +184,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -221,7 +221,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -245,21 +245,21 @@ async def _delete_initial( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -292,7 +292,7 @@ async def begin_delete( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a private endpoint connection with a given name. @@ -304,8 +304,8 @@ async def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -337,7 +337,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -360,7 +360,7 @@ def list_by_private_link_scope( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Gets all private endpoint connections on a private link scope. @@ -378,7 +378,7 @@ def list_by_private_link_scope( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -391,7 +391,7 @@ def prepare_request(next_link=None): url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_resources_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_resources_operations.py index f55ee660f3fd..3c2da41cbe87 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_resources_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list_by_private_link_scope( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. @@ -63,7 +63,7 @@ def list_by_private_link_scope( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -121,7 +121,7 @@ async def get( resource_group_name: str, scope_name: str, group_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResource": """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. @@ -141,14 +141,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), } diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_scopes_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_scopes_operations.py index bc6231f91be5..de76d3f05271 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_scopes_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_private_link_scopes_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.HybridComputePrivateLinkScopeListResult"]: """Gets a list of all Azure Arc PrivateLinkScopes within a subscription. @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -113,7 +113,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.HybridComputePrivateLinkScopeListResult"]: """Gets a list of Azure Arc PrivateLinkScopes within a resource group. @@ -129,7 +129,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -141,7 +141,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -185,20 +185,20 @@ async def _delete_initial( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -230,7 +230,7 @@ async def begin_delete( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Azure Arc PrivateLinkScope. @@ -240,8 +240,8 @@ async def begin_delete( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -271,7 +271,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -294,7 +294,7 @@ async def get( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> "_models.HybridComputePrivateLinkScope": """Returns a Azure Arc PrivateLinkScope. @@ -312,13 +312,13 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -354,7 +354,7 @@ async def create_or_update( resource_group_name: str, scope_name: str, parameters: "_models.HybridComputePrivateLinkScope", - **kwargs + **kwargs: Any ) -> "_models.HybridComputePrivateLinkScope": """Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. @@ -376,14 +376,14 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -427,7 +427,7 @@ async def update_tags( resource_group_name: str, scope_name: str, private_link_scope_tags: "_models.TagsResource", - **kwargs + **kwargs: Any ) -> "_models.HybridComputePrivateLinkScope": """Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. @@ -449,14 +449,14 @@ async def update_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -495,7 +495,7 @@ async def get_validation_details( self, location: str, private_link_scope_id: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkScopeValidationDetails": """Returns a Azure Arc PrivateLinkScope's validation details. @@ -513,7 +513,7 @@ async def get_validation_details( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL @@ -554,7 +554,7 @@ async def get_validation_details_for_machine( self, resource_group_name: str, machine_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkScopeValidationDetails": """Returns a Azure Arc PrivateLinkScope's validation details for a given machine. @@ -573,14 +573,14 @@ async def get_validation_details_for_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get_validation_details_for_machine.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py index 0c1697d950ed..0fa21f3f72cc 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py @@ -11,6 +11,7 @@ from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import ExtensionTargetProperties from ._models_py3 import HybridComputePrivateLinkScope from ._models_py3 import HybridComputePrivateLinkScopeListResult from ._models_py3 import HybridComputePrivateLinkScopeProperties @@ -23,16 +24,20 @@ from ._models_py3 import MachineExtensionProperties from ._models_py3 import MachineExtensionUpdate from ._models_py3 import MachineExtensionUpdateProperties + from ._models_py3 import MachineExtensionUpgrade from ._models_py3 import MachineExtensionsListResult from ._models_py3 import MachineListResult from ._models_py3 import MachineProperties from ._models_py3 import MachineUpdate from ._models_py3 import MachineUpdateProperties from ._models_py3 import OSProfile + from ._models_py3 import OSProfileLinuxConfiguration + from ._models_py3 import OSProfileWindowsConfiguration from ._models_py3 import OperationListResult from ._models_py3 import OperationValue from ._models_py3 import OperationValueDisplay from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionDataModel from ._models_py3 import PrivateEndpointConnectionListResult from ._models_py3 import PrivateEndpointConnectionProperties from ._models_py3 import PrivateEndpointProperty @@ -53,6 +58,7 @@ from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import ExtensionTargetProperties # type: ignore from ._models import HybridComputePrivateLinkScope # type: ignore from ._models import HybridComputePrivateLinkScopeListResult # type: ignore from ._models import HybridComputePrivateLinkScopeProperties # type: ignore @@ -65,16 +71,20 @@ from ._models import MachineExtensionProperties # type: ignore from ._models import MachineExtensionUpdate # type: ignore from ._models import MachineExtensionUpdateProperties # type: ignore + from ._models import MachineExtensionUpgrade # type: ignore from ._models import MachineExtensionsListResult # type: ignore from ._models import MachineListResult # type: ignore from ._models import MachineProperties # type: ignore from ._models import MachineUpdate # type: ignore from ._models import MachineUpdateProperties # type: ignore from ._models import OSProfile # type: ignore + from ._models import OSProfileLinuxConfiguration # type: ignore + from ._models import OSProfileWindowsConfiguration # type: ignore from ._models import OperationListResult # type: ignore from ._models import OperationValue # type: ignore from ._models import OperationValueDisplay # type: ignore from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionDataModel # type: ignore from ._models import PrivateEndpointConnectionListResult # type: ignore from ._models import PrivateEndpointConnectionProperties # type: ignore from ._models import PrivateEndpointProperty # type: ignore @@ -104,6 +114,7 @@ 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'ExtensionTargetProperties', 'HybridComputePrivateLinkScope', 'HybridComputePrivateLinkScopeListResult', 'HybridComputePrivateLinkScopeProperties', @@ -116,16 +127,20 @@ 'MachineExtensionProperties', 'MachineExtensionUpdate', 'MachineExtensionUpdateProperties', + 'MachineExtensionUpgrade', 'MachineExtensionsListResult', 'MachineListResult', 'MachineProperties', 'MachineUpdate', 'MachineUpdateProperties', 'OSProfile', + 'OSProfileLinuxConfiguration', + 'OSProfileWindowsConfiguration', 'OperationListResult', 'OperationValue', 'OperationValueDisplay', 'PrivateEndpointConnection', + 'PrivateEndpointConnectionDataModel', 'PrivateEndpointConnectionListResult', 'PrivateEndpointConnectionProperties', 'PrivateEndpointProperty', diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py index f6ff35982f58..85c8ff72565e 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py @@ -63,7 +63,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -149,6 +149,25 @@ def __init__( self.error = kwargs.get('error', None) +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :param target_version: Properties for the specified Extension to Upgrade. + :type target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = kwargs.get('target_version', None) + + class PrivateLinkScopesResource(msrest.serialization.Model): """An azure resource object. @@ -290,17 +309,22 @@ class HybridComputePrivateLinkScopeProperties(msrest.serialization.Model): :vartype provisioning_state: str :ivar private_link_scope_id: The Guid id of the private link scope. :vartype private_link_scope_id: str + :ivar private_endpoint_connections: The collection of associated Private Endpoint Connections. + :vartype private_endpoint_connections: + list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionDataModel] """ _validation = { 'provisioning_state': {'readonly': True}, 'private_link_scope_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'private_link_scope_id': {'key': 'privateLinkScopeId', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionDataModel]'}, } def __init__( @@ -311,6 +335,7 @@ def __init__( self.public_network_access = kwargs.get('public_network_access', "Disabled") self.provisioning_state = None self.private_link_scope_id = None + self.private_endpoint_connections = None class Identity(msrest.serialization.Model): @@ -322,14 +347,14 @@ class Identity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant ID of resource. :vartype tenant_id: str - :ivar type: The identity type. Default value: "SystemAssigned". - :vartype type: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -338,8 +363,6 @@ class Identity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, **kwargs @@ -347,6 +370,7 @@ def __init__( super(Identity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = kwargs.get('type', None) class LocationData(msrest.serialization.Model): @@ -661,10 +685,10 @@ class MachineExtensionProperties(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any :ivar provisioning_state: The provisioning state, which only appears in the response. :vartype provisioning_state: str :param instance_view: The machine extension instance view. @@ -785,10 +809,10 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any """ _attribute_map = { @@ -815,6 +839,25 @@ def __init__( self.protected_settings = kwargs.get('protected_settings', None) +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :param extension_targets: Describes the Extension Target Properties. + :type extension_targets: dict[str, ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = kwargs.get('extension_targets', None) + + class MachineListResult(msrest.serialization.Model): """The List hybrid machine operation response. @@ -852,8 +895,8 @@ class MachineProperties(msrest.serialization.Model): :param location_data: Metadata pertaining to the geographic location of the resource. :type location_data: ~azure.mgmt.hybridcompute.models.LocationData - :ivar os_profile: Specifies the operating system settings for the hybrid machine. - :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :param os_profile: Specifies the operating system settings for the hybrid machine. + :type os_profile: ~azure.mgmt.hybridcompute.models.OSProfile :ivar provisioning_state: The provisioning state, which only appears in the response. :vartype provisioning_state: str :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", @@ -878,6 +921,8 @@ class MachineProperties(msrest.serialization.Model): :vartype os_name: str :ivar os_version: The version of Operating System running on the hybrid machine. :vartype os_version: str + :param os_type: The type of Operating System (windows/linux). + :type os_type: str :ivar vm_uuid: Specifies the Arc Machine's unique SMBIOS ID. :vartype vm_uuid: str :param extensions: Machine Extensions information. @@ -896,12 +941,13 @@ class MachineProperties(msrest.serialization.Model): :param parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. :type parent_cluster_resource_id: str + :param mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :type mssql_discovered: str :ivar detected_properties: Detected properties from the machine. :vartype detected_properties: dict[str, str] """ _validation = { - 'os_profile': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'status': {'readonly': True}, 'last_status_change': {'readonly': True}, @@ -933,6 +979,7 @@ class MachineProperties(msrest.serialization.Model): 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, 'os_name': {'key': 'osName', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, 'vm_uuid': {'key': 'vmUuid', 'type': 'str'}, 'extensions': {'key': 'extensions', 'type': '[MachineExtensionInstanceView]'}, 'os_sku': {'key': 'osSku', 'type': 'str'}, @@ -941,6 +988,7 @@ class MachineProperties(msrest.serialization.Model): 'dns_fqdn': {'key': 'dnsFqdn', 'type': 'str'}, 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, 'parent_cluster_resource_id': {'key': 'parentClusterResourceId', 'type': 'str'}, + 'mssql_discovered': {'key': 'mssqlDiscovered', 'type': 'str'}, 'detected_properties': {'key': 'detectedProperties', 'type': '{str}'}, } @@ -950,7 +998,7 @@ def __init__( ): super(MachineProperties, self).__init__(**kwargs) self.location_data = kwargs.get('location_data', None) - self.os_profile = None + self.os_profile = kwargs.get('os_profile', None) self.provisioning_state = None self.status = None self.last_status_change = None @@ -962,6 +1010,7 @@ def __init__( self.client_public_key = kwargs.get('client_public_key', None) self.os_name = None self.os_version = None + self.os_type = kwargs.get('os_type', None) self.vm_uuid = None self.extensions = kwargs.get('extensions', None) self.os_sku = None @@ -970,6 +1019,7 @@ def __init__( self.dns_fqdn = None self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) self.parent_cluster_resource_id = kwargs.get('parent_cluster_resource_id', None) + self.mssql_discovered = kwargs.get('mssql_discovered', None) self.detected_properties = None @@ -1004,6 +1054,8 @@ class MachineUpdateProperties(msrest.serialization.Model): :param location_data: Metadata pertaining to the geographic location of the resource. :type location_data: ~azure.mgmt.hybridcompute.models.LocationData + :param os_profile: Specifies the operating system settings for the hybrid machine. + :type os_profile: ~azure.mgmt.hybridcompute.models.OSProfile :param parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. :type parent_cluster_resource_id: str @@ -1014,6 +1066,7 @@ class MachineUpdateProperties(msrest.serialization.Model): _attribute_map = { 'location_data': {'key': 'locationData', 'type': 'LocationData'}, + 'os_profile': {'key': 'osProfile', 'type': 'OSProfile'}, 'parent_cluster_resource_id': {'key': 'parentClusterResourceId', 'type': 'str'}, 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, } @@ -1024,6 +1077,7 @@ def __init__( ): super(MachineUpdateProperties, self).__init__(**kwargs) self.location_data = kwargs.get('location_data', None) + self.os_profile = kwargs.get('os_profile', None) self.parent_cluster_resource_id = kwargs.get('parent_cluster_resource_id', None) self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) @@ -1134,6 +1188,10 @@ class OSProfile(msrest.serialization.Model): :ivar computer_name: Specifies the host OS name of the hybrid machine. :vartype computer_name: str + :param windows_configuration: Specifies the windows configuration for update management. + :type windows_configuration: ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :param linux_configuration: Specifies the linux configuration for update management. + :type linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration """ _validation = { @@ -1142,6 +1200,8 @@ class OSProfile(msrest.serialization.Model): _attribute_map = { 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'OSProfileWindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'OSProfileLinuxConfiguration'}, } def __init__( @@ -1150,6 +1210,46 @@ def __init__( ): super(OSProfile, self).__init__(**kwargs) self.computer_name = None + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + + +class OSProfileLinuxConfiguration(msrest.serialization.Model): + """Specifies the linux configuration for update management. + + :param assessment_mode: Specifies the assessment mode. + :type assessment_mode: str + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OSProfileLinuxConfiguration, self).__init__(**kwargs) + self.assessment_mode = kwargs.get('assessment_mode', None) + + +class OSProfileWindowsConfiguration(msrest.serialization.Model): + """Specifies the windows configuration for update management. + + :param assessment_mode: Specifies the assessment mode. + :type assessment_mode: str + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OSProfileWindowsConfiguration, self).__init__(**kwargs) + self.assessment_mode = kwargs.get('assessment_mode', None) class ProxyResource(Resource): @@ -1229,6 +1329,45 @@ def __init__( self.system_data = None +class PrivateEndpointConnectionDataModel(msrest.serialization.Model): + """The Data Model for a Private Endpoint Connection associated with a Private Link Scope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM Resource Id of the Private Endpoint. + :vartype id: str + :ivar name: The Name of the Private Endpoint. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param properties: The Private Endpoint Connection properties. + :type properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionDataModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py index 67804dd2341b..656485a7b1d7 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -68,7 +68,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -156,6 +156,27 @@ def __init__( self.error = error +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :param target_version: Properties for the specified Extension to Upgrade. + :type target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + target_version: Optional[str] = None, + **kwargs + ): + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = target_version + + class PrivateLinkScopesResource(msrest.serialization.Model): """An azure resource object. @@ -307,17 +328,22 @@ class HybridComputePrivateLinkScopeProperties(msrest.serialization.Model): :vartype provisioning_state: str :ivar private_link_scope_id: The Guid id of the private link scope. :vartype private_link_scope_id: str + :ivar private_endpoint_connections: The collection of associated Private Endpoint Connections. + :vartype private_endpoint_connections: + list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionDataModel] """ _validation = { 'provisioning_state': {'readonly': True}, 'private_link_scope_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'private_link_scope_id': {'key': 'privateLinkScopeId', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionDataModel]'}, } def __init__( @@ -330,6 +356,7 @@ def __init__( self.public_network_access = public_network_access self.provisioning_state = None self.private_link_scope_id = None + self.private_endpoint_connections = None class Identity(msrest.serialization.Model): @@ -341,14 +368,14 @@ class Identity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant ID of resource. :vartype tenant_id: str - :ivar type: The identity type. Default value: "SystemAssigned". - :vartype type: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, } _attribute_map = { @@ -357,15 +384,16 @@ class Identity(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, } - type = "SystemAssigned" - def __init__( self, + *, + type: Optional[str] = None, **kwargs ): super(Identity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None + self.type = type class LocationData(msrest.serialization.Model): @@ -708,10 +736,10 @@ class MachineExtensionProperties(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any :ivar provisioning_state: The provisioning state, which only appears in the response. :vartype provisioning_state: str :param instance_view: The machine extension instance view. @@ -742,8 +770,8 @@ def __init__( type: Optional[str] = None, type_handler_version: Optional[str] = None, auto_upgrade_minor_version: Optional[bool] = None, - settings: Optional[object] = None, - protected_settings: Optional[object] = None, + settings: Optional[Any] = None, + protected_settings: Optional[Any] = None, instance_view: Optional["MachineExtensionInstanceView"] = None, **kwargs ): @@ -849,10 +877,10 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any """ _attribute_map = { @@ -873,8 +901,8 @@ def __init__( type: Optional[str] = None, type_handler_version: Optional[str] = None, auto_upgrade_minor_version: Optional[bool] = None, - settings: Optional[object] = None, - protected_settings: Optional[object] = None, + settings: Optional[Any] = None, + protected_settings: Optional[Any] = None, **kwargs ): super(MachineExtensionUpdateProperties, self).__init__(**kwargs) @@ -887,6 +915,27 @@ def __init__( self.protected_settings = protected_settings +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :param extension_targets: Describes the Extension Target Properties. + :type extension_targets: dict[str, ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + *, + extension_targets: Optional[Dict[str, "ExtensionTargetProperties"]] = None, + **kwargs + ): + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = extension_targets + + class MachineListResult(msrest.serialization.Model): """The List hybrid machine operation response. @@ -927,8 +976,8 @@ class MachineProperties(msrest.serialization.Model): :param location_data: Metadata pertaining to the geographic location of the resource. :type location_data: ~azure.mgmt.hybridcompute.models.LocationData - :ivar os_profile: Specifies the operating system settings for the hybrid machine. - :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :param os_profile: Specifies the operating system settings for the hybrid machine. + :type os_profile: ~azure.mgmt.hybridcompute.models.OSProfile :ivar provisioning_state: The provisioning state, which only appears in the response. :vartype provisioning_state: str :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", @@ -953,6 +1002,8 @@ class MachineProperties(msrest.serialization.Model): :vartype os_name: str :ivar os_version: The version of Operating System running on the hybrid machine. :vartype os_version: str + :param os_type: The type of Operating System (windows/linux). + :type os_type: str :ivar vm_uuid: Specifies the Arc Machine's unique SMBIOS ID. :vartype vm_uuid: str :param extensions: Machine Extensions information. @@ -971,12 +1022,13 @@ class MachineProperties(msrest.serialization.Model): :param parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. :type parent_cluster_resource_id: str + :param mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :type mssql_discovered: str :ivar detected_properties: Detected properties from the machine. :vartype detected_properties: dict[str, str] """ _validation = { - 'os_profile': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'status': {'readonly': True}, 'last_status_change': {'readonly': True}, @@ -1008,6 +1060,7 @@ class MachineProperties(msrest.serialization.Model): 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, 'os_name': {'key': 'osName', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, 'vm_uuid': {'key': 'vmUuid', 'type': 'str'}, 'extensions': {'key': 'extensions', 'type': '[MachineExtensionInstanceView]'}, 'os_sku': {'key': 'osSku', 'type': 'str'}, @@ -1016,6 +1069,7 @@ class MachineProperties(msrest.serialization.Model): 'dns_fqdn': {'key': 'dnsFqdn', 'type': 'str'}, 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, 'parent_cluster_resource_id': {'key': 'parentClusterResourceId', 'type': 'str'}, + 'mssql_discovered': {'key': 'mssqlDiscovered', 'type': 'str'}, 'detected_properties': {'key': 'detectedProperties', 'type': '{str}'}, } @@ -1023,16 +1077,19 @@ def __init__( self, *, location_data: Optional["LocationData"] = None, + os_profile: Optional["OSProfile"] = None, vm_id: Optional[str] = None, client_public_key: Optional[str] = None, + os_type: Optional[str] = None, extensions: Optional[List["MachineExtensionInstanceView"]] = None, private_link_scope_resource_id: Optional[str] = None, parent_cluster_resource_id: Optional[str] = None, + mssql_discovered: Optional[str] = None, **kwargs ): super(MachineProperties, self).__init__(**kwargs) self.location_data = location_data - self.os_profile = None + self.os_profile = os_profile self.provisioning_state = None self.status = None self.last_status_change = None @@ -1044,6 +1101,7 @@ def __init__( self.client_public_key = client_public_key self.os_name = None self.os_version = None + self.os_type = os_type self.vm_uuid = None self.extensions = extensions self.os_sku = None @@ -1052,6 +1110,7 @@ def __init__( self.dns_fqdn = None self.private_link_scope_resource_id = private_link_scope_resource_id self.parent_cluster_resource_id = parent_cluster_resource_id + self.mssql_discovered = mssql_discovered self.detected_properties = None @@ -1090,6 +1149,8 @@ class MachineUpdateProperties(msrest.serialization.Model): :param location_data: Metadata pertaining to the geographic location of the resource. :type location_data: ~azure.mgmt.hybridcompute.models.LocationData + :param os_profile: Specifies the operating system settings for the hybrid machine. + :type os_profile: ~azure.mgmt.hybridcompute.models.OSProfile :param parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. :type parent_cluster_resource_id: str @@ -1100,6 +1161,7 @@ class MachineUpdateProperties(msrest.serialization.Model): _attribute_map = { 'location_data': {'key': 'locationData', 'type': 'LocationData'}, + 'os_profile': {'key': 'osProfile', 'type': 'OSProfile'}, 'parent_cluster_resource_id': {'key': 'parentClusterResourceId', 'type': 'str'}, 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, } @@ -1108,12 +1170,14 @@ def __init__( self, *, location_data: Optional["LocationData"] = None, + os_profile: Optional["OSProfile"] = None, parent_cluster_resource_id: Optional[str] = None, private_link_scope_resource_id: Optional[str] = None, **kwargs ): super(MachineUpdateProperties, self).__init__(**kwargs) self.location_data = location_data + self.os_profile = os_profile self.parent_cluster_resource_id = parent_cluster_resource_id self.private_link_scope_resource_id = private_link_scope_resource_id @@ -1226,6 +1290,10 @@ class OSProfile(msrest.serialization.Model): :ivar computer_name: Specifies the host OS name of the hybrid machine. :vartype computer_name: str + :param windows_configuration: Specifies the windows configuration for update management. + :type windows_configuration: ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :param linux_configuration: Specifies the linux configuration for update management. + :type linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration """ _validation = { @@ -1234,14 +1302,63 @@ class OSProfile(msrest.serialization.Model): _attribute_map = { 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'OSProfileWindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'OSProfileLinuxConfiguration'}, } def __init__( self, + *, + windows_configuration: Optional["OSProfileWindowsConfiguration"] = None, + linux_configuration: Optional["OSProfileLinuxConfiguration"] = None, **kwargs ): super(OSProfile, self).__init__(**kwargs) self.computer_name = None + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + + +class OSProfileLinuxConfiguration(msrest.serialization.Model): + """Specifies the linux configuration for update management. + + :param assessment_mode: Specifies the assessment mode. + :type assessment_mode: str + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + } + + def __init__( + self, + *, + assessment_mode: Optional[str] = None, + **kwargs + ): + super(OSProfileLinuxConfiguration, self).__init__(**kwargs) + self.assessment_mode = assessment_mode + + +class OSProfileWindowsConfiguration(msrest.serialization.Model): + """Specifies the windows configuration for update management. + + :param assessment_mode: Specifies the assessment mode. + :type assessment_mode: str + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + } + + def __init__( + self, + *, + assessment_mode: Optional[str] = None, + **kwargs + ): + super(OSProfileWindowsConfiguration, self).__init__(**kwargs) + self.assessment_mode = assessment_mode class ProxyResource(Resource): @@ -1323,6 +1440,47 @@ def __init__( self.system_data = None +class PrivateEndpointConnectionDataModel(msrest.serialization.Model): + """The Data Model for a Private Endpoint Connection associated with a Private Link Scope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM Resource Id of the Private Endpoint. + :vartype id: str + :ivar name: The Name of the Private Endpoint. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param properties: The Private Endpoint Connection properties. + :type properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + *, + properties: Optional["PrivateEndpointConnectionProperties"] = None, + **kwargs + ): + super(PrivateEndpointConnectionDataModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py index 0459441055d9..f77aada04882 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py @@ -8,6 +8,7 @@ from ._machines_operations import MachinesOperations from ._machine_extensions_operations import MachineExtensionsOperations +from ._hybrid_compute_management_client_operations import HybridComputeManagementClientOperationsMixin from ._operations import Operations from ._private_link_scopes_operations import PrivateLinkScopesOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -16,6 +17,7 @@ __all__ = [ 'MachinesOperations', 'MachineExtensionsOperations', + 'HybridComputeManagementClientOperationsMixin', 'Operations', 'PrivateLinkScopesOperations', 'PrivateLinkResourcesOperations', diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_hybrid_compute_management_client_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_hybrid_compute_management_client_operations.py new file mode 100644 index 000000000000..cc7bf81d5a42 --- /dev/null +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_hybrid_compute_management_client_operations.py @@ -0,0 +1,148 @@ +# 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 typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class HybridComputeManagementClientOperationsMixin(object): + + def _upgrade_extensions_initial( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-10-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._upgrade_extensions_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'machineName': self._serialize.url("machine_name", machine_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions'} # type: ignore + + def begin_upgrade_extensions( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'machineName': self._serialize.url("machine_name", machine_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions'} # type: ignore diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py index ce6b02db7ed6..aa4908a76e50 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py @@ -61,14 +61,14 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -127,8 +127,8 @@ def begin_create_or_update( :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtension :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MachineExtension or the result of cls(response) @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -197,14 +197,14 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -263,8 +263,8 @@ def begin_update( :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MachineExtension or the result of cls(response) @@ -299,7 +299,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -332,13 +332,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -385,8 +385,8 @@ def begin_delete( :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -417,7 +417,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -463,13 +463,13 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -527,7 +527,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -539,7 +539,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py index 82afee18fc09..dbb9ecf3a026 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py @@ -68,14 +68,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -128,14 +128,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -188,7 +188,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -201,7 +201,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -258,7 +258,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_operations.py index 5968af873a33..4744a376c9c4 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_endpoint_connections_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_endpoint_connections_operations.py index 27ad1dc31b52..6c56ab6c249c 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_endpoint_connections_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_endpoint_connections_operations.py @@ -73,14 +73,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -125,7 +125,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -133,7 +133,7 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -191,8 +191,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -228,7 +228,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -260,14 +260,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -313,8 +313,8 @@ def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -346,7 +346,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -388,7 +388,7 @@ def list_by_private_link_scope( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -401,7 +401,7 @@ def prepare_request(next_link=None): url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_resources_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_resources_operations.py index 53554fc620ab..4da9ac3374e6 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_resources_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_resources_operations.py @@ -68,7 +68,7 @@ def list_by_private_link_scope( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -147,14 +147,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), } diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_scopes_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_scopes_operations.py index 39b8582eafb1..697af6ece9e6 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_scopes_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_private_link_scopes_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -135,7 +135,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" def prepare_request(next_link=None): @@ -147,7 +147,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -199,13 +199,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -248,8 +248,8 @@ def begin_delete( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -279,7 +279,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -321,13 +321,13 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -386,14 +386,14 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -460,14 +460,14 @@ def update_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -525,7 +525,7 @@ def get_validation_details( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL @@ -586,14 +586,14 @@ def get_validation_details_for_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-25-preview" + api_version = "2021-06-10-preview" accept = "application/json" # Construct URL url = self.get_validation_details_for_machine.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'machineName': self._serialize.url("machine_name", machine_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments)