diff --git a/sdk/customproviders/azure-mgmt-customproviders/_meta.json b/sdk/customproviders/azure-mgmt-customproviders/_meta.json index b505b6117c0a9..fa434545709af 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/_meta.json +++ b/sdk/customproviders/azure-mgmt-customproviders/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.0.6369", - "use": "@autorest/python@5.6.2", - "commit": "63a5f68654047b16c9039c799f1a6370f628fb20", + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "c803720c6bcfcb0fcf4c97f3463ec33a18f9e55c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/customproviders/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.2 --version=3.0.6369", + "autorest_command": "autorest specification/customproviders/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.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", "readme": "specification/customproviders/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_customproviders.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_customproviders.py index 6e1f54199efac..a9e5e50e17c57 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_customproviders.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_customproviders.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import CustomprovidersConfiguration from .operations import Operations @@ -66,6 +67,24 @@ def __init__( self.associations = AssociationsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_metadata.json b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_metadata.json index 6610be0d5d238..fb65e52bb8e21 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_metadata.json +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_metadata.json @@ -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\": [\"CustomprovidersConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "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\": [\"CustomprovidersConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "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\": [\"CustomprovidersConfiguration\"]}}, \"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\": [\"CustomprovidersConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -101,11 +101,5 @@ "operations": "Operations", "custom_resource_provider": "CustomResourceProviderOperations", "associations": "AssociationsOperations" - }, - "operation_mixins": { - "sync_imports": "None", - "async_imports": "None", - "operations": { - } } } \ No newline at end of file diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_version.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_version.py index c47f66669f1bf..e5754a47ce68f 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_version.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_customproviders.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_customproviders.py index 72d807d98c078..ce3a8e5e2d062 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_customproviders.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_customproviders.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -63,6 +64,23 @@ def __init__( self.associations = AssociationsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_associations_operations.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_associations_operations.py index 6287af8c5f750..013fbf7215069 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_associations_operations.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_associations_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( scope: str, association_name: str, association: "_models.Association", - **kwargs + **kwargs: Any ) -> "_models.Association": cls = kwargs.pop('cls', None) # type: ClsType["_models.Association"] error_map = { @@ -105,13 +105,14 @@ async def begin_create_or_update( scope: str, association_name: str, association: "_models.Association", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Association"]: """Create or update an association. :param scope: The scope of the association. The scope can be any valid REST resource instance. - For example, use '/subscriptions/{subscription-id}/resourceGroups/{resource-group- - name}/providers/Microsoft.Compute/virtualMachines/{vm-name}' for a virtual machine resource. + For example, use + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}' + for a virtual machine resource. :type scope: str :param association_name: The name of the association. :type association_name: str @@ -119,8 +120,8 @@ async def begin_create_or_update( :type association: ~azure.mgmt.customproviders.models.Association :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 Association or the result of cls(response) @@ -176,7 +177,7 @@ async def _delete_initial( self, scope: str, association_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -220,7 +221,7 @@ async def begin_delete( self, scope: str, association_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete an association. @@ -230,8 +231,8 @@ async def begin_delete( :type association_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) @@ -283,7 +284,7 @@ async def get( self, scope: str, association_name: str, - **kwargs + **kwargs: Any ) -> "_models.Association": """Get an association. @@ -340,7 +341,7 @@ async def get( def list_all( self, scope: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AssociationsList"]: """Gets all association for the given scope. diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_custom_resource_provider_operations.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_custom_resource_provider_operations.py index f07c25847794c..de9ef35ee387a 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_custom_resource_provider_operations.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_custom_resource_provider_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, resource_provider_name: str, resource_provider: "_models.CustomRPManifest", - **kwargs + **kwargs: Any ) -> "_models.CustomRPManifest": cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomRPManifest"] error_map = { @@ -106,7 +106,7 @@ async def begin_create_or_update( resource_group_name: str, resource_provider_name: str, resource_provider: "_models.CustomRPManifest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CustomRPManifest"]: """Creates or updates the custom resource provider. @@ -119,8 +119,8 @@ async def begin_create_or_update( :type resource_provider: ~azure.mgmt.customproviders.models.CustomRPManifest :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 CustomRPManifest or the result of cls(response) @@ -177,7 +177,7 @@ async def _delete_initial( self, resource_group_name: str, resource_provider_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -222,7 +222,7 @@ async def begin_delete( self, resource_group_name: str, resource_provider_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the custom resource provider. @@ -232,8 +232,8 @@ async def begin_delete( :type resource_provider_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) @@ -286,7 +286,7 @@ async def get( self, resource_group_name: str, resource_provider_name: str, - **kwargs + **kwargs: Any ) -> "_models.CustomRPManifest": """Gets the custom resource provider manifest. @@ -346,7 +346,7 @@ async def update( resource_group_name: str, resource_provider_name: str, patchable_resource: "_models.ResourceProvidersUpdate", - **kwargs + **kwargs: Any ) -> "_models.CustomRPManifest": """Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags. @@ -412,7 +412,7 @@ async def update( def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ListByCustomRPManifest"]: """Gets all the custom resource providers within a resource group. @@ -482,7 +482,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ListByCustomRPManifest"]: """Gets all the custom resource providers within a subscription. diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_operations.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_operations.py index 3af9e30e4589d..e8a96f233e257 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_operations.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceProviderOperationList"]: """The list of operations provided by Microsoft CustomProviders. diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_associations_operations.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_associations_operations.py index 296c8aa8afceb..254bcd3140a2d 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_associations_operations.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_associations_operations.py @@ -116,8 +116,9 @@ def begin_create_or_update( """Create or update an association. :param scope: The scope of the association. The scope can be any valid REST resource instance. - For example, use '/subscriptions/{subscription-id}/resourceGroups/{resource-group- - name}/providers/Microsoft.Compute/virtualMachines/{vm-name}' for a virtual machine resource. + For example, use + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}' + for a virtual machine resource. :type scope: str :param association_name: The name of the association. :type association_name: str @@ -125,8 +126,8 @@ def begin_create_or_update( :type association: ~azure.mgmt.customproviders.models.Association :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 Association or the result of cls(response) @@ -238,8 +239,8 @@ def begin_delete( :type association_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) diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_custom_resource_provider_operations.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_custom_resource_provider_operations.py index 8a4fed2ac8194..fa3d307c07361 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_custom_resource_provider_operations.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_custom_resource_provider_operations.py @@ -125,8 +125,8 @@ def begin_create_or_update( :type resource_provider: ~azure.mgmt.customproviders.models.CustomRPManifest :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 CustomRPManifest or the result of cls(response) @@ -240,8 +240,8 @@ def begin_delete( :type resource_provider_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)