diff --git a/sdk/azurestack/azure-mgmt-azurestack/_meta.json b/sdk/azurestack/azure-mgmt-azurestack/_meta.json index 231a159efafd..26d0809b6085 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/_meta.json +++ b/sdk/azurestack/azure-mgmt-azurestack/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.0.6369", - "use": "@autorest/python@5.6.2", - "commit": "ea6ceada9e22eb0d455288d339955dfe56521302", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "754938e4cb9416358b02dcc11f444adf14b3b7b6", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/azurestack/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/azurestack/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/azurestack/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_azure_stack_management_client.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_azure_stack_management_client.py index f25c3bfa7b04..d8a0d262468d 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_azure_stack_management_client.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_azure_stack_management_client.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 AzureStackManagementClientConfiguration from .operations import Operations @@ -80,6 +81,24 @@ def __init__( self.linked_subscriptions = LinkedSubscriptionsOperations( 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/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_metadata.json b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_metadata.json index 33c346444236..da7db1450dfb 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_metadata.json +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": false, "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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -104,11 +104,5 @@ "products": "ProductsOperations", "registrations": "RegistrationsOperations", "linked_subscriptions": "LinkedSubscriptionsOperations" - }, - "operation_mixins": { - "sync_imports": "None", - "async_imports": "None", - "operations": { - } } } \ No newline at end of file diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_version.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_version.py index c47f66669f1b..e5754a47ce68 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_version.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_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/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_azure_stack_management_client.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_azure_stack_management_client.py index 91fc40d3bba6..522b349718cd 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_azure_stack_management_client.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_azure_stack_management_client.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 @@ -77,6 +78,23 @@ def __init__( self.linked_subscriptions = LinkedSubscriptionsOperations( 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/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_cloud_manifest_file_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_cloud_manifest_file_operations.py index 337d3857a018..a5a435f4ba92 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_cloud_manifest_file_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_cloud_manifest_file_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, - **kwargs + **kwargs: Any ) -> "_models.CloudManifestFileResponse": """Returns a cloud specific manifest JSON file with latest version. @@ -91,7 +91,7 @@ async def get( self, verification_version: str, version_creation_date: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CloudManifestFileResponse": """Returns a cloud specific manifest JSON file. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_customer_subscriptions_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_customer_subscriptions_operations.py index 08c4a31c8caa..24f08536b100 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_customer_subscriptions_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_customer_subscriptions_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CustomerSubscriptionList"]: """Returns a list of products. @@ -121,7 +121,7 @@ async def get( resource_group: str, registration_name: str, customer_subscription_name: str, - **kwargs + **kwargs: Any ) -> "_models.CustomerSubscription": """Returns the specified product. @@ -184,7 +184,7 @@ async def delete( resource_group: str, registration_name: str, customer_subscription_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a customer subscription under a registration. @@ -245,7 +245,7 @@ async def create( registration_name: str, customer_subscription_name: str, customer_creation_parameters: "_models.CustomerSubscription", - **kwargs + **kwargs: Any ) -> "_models.CustomerSubscription": """Creates a new customer subscription under a registration. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_linked_subscriptions_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_linked_subscriptions_operations.py index 095d00e6062b..a4dd4a1891a7 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_linked_subscriptions_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_linked_subscriptions_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LinkedSubscriptionsList"]: """Returns a list of all linked subscriptions under current resource group. @@ -114,7 +114,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LinkedSubscriptionsList"]: """Returns a list of all linked subscriptions under current subscription. @@ -183,7 +183,7 @@ async def get( self, resource_group: str, linked_subscription_name: str, - **kwargs + **kwargs: Any ) -> "_models.LinkedSubscription": """Returns the properties of a Linked Subscription resource. @@ -242,7 +242,7 @@ async def delete( self, resource_group: str, linked_subscription_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the requested Linked Subscription resource. @@ -299,7 +299,7 @@ async def create_or_update( resource_group: str, linked_subscription_name: str, resource: "_models.LinkedSubscriptionParameter", - **kwargs + **kwargs: Any ) -> "_models.LinkedSubscription": """Create or update a linked subscription resource. @@ -370,7 +370,7 @@ async def update( resource_group: str, linked_subscription_name: str, resource: "_models.LinkedSubscriptionParameter", - **kwargs + **kwargs: Any ) -> "_models.LinkedSubscription": """Patch a Linked Subscription resource. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_operations.py index a098bc86b52d..5d5f96b8699f 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Returns the list of supported REST operations. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py index 027d75cf82d5..332ee419a988 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProductList"]: """Returns a list of products. @@ -121,7 +121,7 @@ async def get( resource_group: str, registration_name: str, product_name: str, - **kwargs + **kwargs: Any ) -> "_models.Product": """Returns the specified product. @@ -184,7 +184,7 @@ async def list_details( resource_group: str, registration_name: str, product_name: str, - **kwargs + **kwargs: Any ) -> "_models.ExtendedProduct": """Returns the extended properties of a product. @@ -248,7 +248,7 @@ async def get_products( registration_name: str, product_name: str, device_configuration: Optional["_models.DeviceConfiguration"] = None, - **kwargs + **kwargs: Any ) -> "_models.ProductList": """Returns a list of products. @@ -322,7 +322,7 @@ async def get_product( registration_name: str, product_name: str, device_configuration: Optional["_models.DeviceConfiguration"] = None, - **kwargs + **kwargs: Any ) -> "_models.Product": """Returns the specified product. @@ -396,7 +396,7 @@ async def upload_log( registration_name: str, product_name: str, marketplace_product_log_update: Optional["_models.MarketplaceProductLogUpdate"] = None, - **kwargs + **kwargs: Any ) -> "_models.ProductLog": """Returns the specified product. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_registrations_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_registrations_operations.py index 2f2131c73c71..d484d4defb0d 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_registrations_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_registrations_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RegistrationList"]: """Returns a list of all registrations. @@ -112,11 +112,78 @@ async def get_next(next_link=None): ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations'} # type: ignore + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.RegistrationList"]: + """Returns a list of all registrations under current subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RegistrationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestack.models.RegistrationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, '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') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RegistrationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AzureStack/registrations'} # type: ignore + async def get( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> "_models.Registration": """Returns the properties of an Azure Stack registration. @@ -175,7 +242,7 @@ async def delete( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the requested Azure Stack registration. @@ -232,7 +299,7 @@ async def create_or_update( resource_group: str, registration_name: str, token: "_models.RegistrationParameter", - **kwargs + **kwargs: Any ) -> "_models.Registration": """Create or update an Azure Stack registration. @@ -303,7 +370,7 @@ async def update( resource_group: str, registration_name: str, token: "_models.RegistrationParameter", - **kwargs + **kwargs: Any ) -> "_models.Registration": """Patch an Azure Stack registration. @@ -369,7 +436,7 @@ async def get_activation_key( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActivationKeyResult": """Returns Azure Stack Activation Key. @@ -428,7 +495,7 @@ async def enable_remote_management( self, resource_group: str, registration_name: str, - **kwargs + **kwargs: Any ) -> None: """Enables remote management for device under the Azure Stack registration. diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_registrations_operations.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_registrations_operations.py index 043eed7022ed..338cc44dbde1 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_registrations_operations.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_registrations_operations.py @@ -117,6 +117,74 @@ def get_next(next_link=None): ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations'} # type: ignore + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RegistrationList"] + """Returns a list of all registrations under current subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RegistrationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestack.models.RegistrationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, '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') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RegistrationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AzureStack/registrations'} # type: ignore + def get( self, resource_group, # type: str