diff --git a/sdk/support/azure-mgmt-support/MANIFEST.in b/sdk/support/azure-mgmt-support/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/support/azure-mgmt-support/MANIFEST.in +++ b/sdk/support/azure-mgmt-support/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/support/azure-mgmt-support/_meta.json b/sdk/support/azure-mgmt-support/_meta.json new file mode 100644 index 000000000000..cdff27874ba8 --- /dev/null +++ b/sdk/support/azure-mgmt-support/_meta.json @@ -0,0 +1,11 @@ +{ + "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/support/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/support/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/_metadata.json b/sdk/support/azure-mgmt-support/azure/mgmt/support/_metadata.json index 7e8b87be45d9..d359146fc683 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/_metadata.json +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": 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\": [\"MicrosoftSupportConfiguration\"]}}, \"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\": [\"MicrosoftSupportConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Azure subscription Id.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", @@ -57,9 +103,5 @@ "problem_classifications": "ProblemClassificationsOperations", "support_tickets": "SupportTicketsOperations", "communications": "CommunicationsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.py index e723ab9dd501..08bc93f2387b 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.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 MicrosoftSupportConfiguration from .operations import Operations @@ -76,6 +77,24 @@ def __init__( self.communications = CommunicationsOperations( 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/support/azure-mgmt-support/azure/mgmt/support/_version.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/_version.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_microsoft_support.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_microsoft_support.py index 46929739a715..0b9174569996 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_microsoft_support.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_microsoft_support.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 @@ -73,6 +74,23 @@ def __init__( self.communications = CommunicationsOperations( 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/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_communications_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_communications_operations.py index afd580234b3c..b193265de9f1 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_communications_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_communications_operations.py @@ -47,7 +47,7 @@ async def check_name_availability( self, support_ticket_name: str, check_name_availability_input: "_models.CheckNameAvailabilityInput", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityOutput": """Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket. @@ -96,7 +96,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -112,7 +112,7 @@ def list( support_ticket_name: str, top: Optional[int] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CommunicationsListResult"]: """Lists all communications (attachments not included) for a support ticket. :code:`
`
You can also filter support ticket communications by *CreatedDate* or *CommunicationType* using @@ -186,7 +186,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -201,7 +201,7 @@ async def get( self, support_ticket_name: str, communication_name: str, - **kwargs + **kwargs: Any ) -> "_models.CommunicationDetails": """Returns communication details for a support ticket. @@ -245,7 +245,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CommunicationDetails', pipeline_response) @@ -261,7 +261,7 @@ async def _create_initial( support_ticket_name: str, communication_name: str, create_communication_parameters: "_models.CommunicationDetails", - **kwargs + **kwargs: Any ) -> Optional["_models.CommunicationDetails"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CommunicationDetails"]] error_map = { @@ -299,7 +299,7 @@ async def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -317,7 +317,7 @@ async def begin_create( support_ticket_name: str, communication_name: str, create_communication_parameters: "_models.CommunicationDetails", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CommunicationDetails"]: """Adds a new customer communication to an Azure support ticket. @@ -329,8 +329,8 @@ async def begin_create( :type create_communication_parameters: ~azure.mgmt.support.models.CommunicationDetails :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: True for ARMPolling, False for no polling, or a - polling object for 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 CommunicationDetails or the result of cls(response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_operations.py index 5fae6d0ab685..68cf008a6155 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationsListResult"]: """This lists all the available Microsoft Support REST API operations. @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_problem_classifications_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_problem_classifications_operations.py index 7730a3b18dfe..5026a04d65fe 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_problem_classifications_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_problem_classifications_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProblemClassificationsListResult"]: """Lists all the problem classifications (categories) available for a specific Azure service. Always use the service and problem classifications obtained programmatically. This practice @@ -103,7 +103,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -118,7 +118,7 @@ async def get( self, service_name: str, problem_classification_name: str, - **kwargs + **kwargs: Any ) -> "_models.ProblemClassification": """Get problem classification details for a specific Azure service. @@ -161,7 +161,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProblemClassification', pipeline_response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_services_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_services_operations.py index 441180b97dac..932706b68dc1 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_services_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_services_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServicesListResult"]: """Lists all the Azure services available for support ticket creation. For **Technical** issues, select the Service Id that maps to the Azure service/product as displayed in the **Services** @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -113,7 +113,7 @@ async def get_next(next_link=None): async def get( self, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.Service": """Gets a specific Azure service for support ticket creation. @@ -153,7 +153,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Service', pipeline_response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_support_tickets_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_support_tickets_operations.py index 47079757bd30..7ae30bf4d1e1 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_support_tickets_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_support_tickets_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def check_name_availability( self, check_name_availability_input: "_models.CheckNameAvailabilityInput", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityOutput": """Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. @@ -92,7 +92,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -107,7 +107,7 @@ def list( self, top: Optional[int] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SupportTicketsListResult"]: """Lists all the support tickets for an Azure subscription. You can also filter the support tickets by *Status* or *CreatedDate* using the $filter parameter. Output will be a paged result @@ -177,7 +177,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -191,7 +191,7 @@ async def get_next(next_link=None): async def get( self, support_ticket_name: str, - **kwargs + **kwargs: Any ) -> "_models.SupportTicketDetails": """Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data @@ -234,7 +234,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportTicketDetails', pipeline_response) @@ -249,7 +249,7 @@ async def update( self, support_ticket_name: str, update_support_ticket: "_models.UpdateSupportTicket", - **kwargs + **kwargs: Any ) -> "_models.SupportTicketDetails": """This API allows you to update the severity level, ticket status, and your contact information in the support ticket.:code:`
`:code:`
`Note: The severity levels cannot be changed if @@ -303,7 +303,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportTicketDetails', pipeline_response) @@ -318,7 +318,7 @@ async def _create_initial( self, support_ticket_name: str, create_support_ticket_parameters: "_models.SupportTicketDetails", - **kwargs + **kwargs: Any ) -> Optional["_models.SupportTicketDetails"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SupportTicketDetails"]] error_map = { @@ -355,7 +355,7 @@ async def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -372,7 +372,7 @@ async def begin_create( self, support_ticket_name: str, create_support_ticket_parameters: "_models.SupportTicketDetails", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SupportTicketDetails"]: """Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the `prerequisites @@ -388,11 +388,11 @@ async def begin_create( ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.:code:`
`:code:`
`\ **Creating a support ticket for on-behalf-of**\ : Include *x-ms-authorization-auxiliary* header to provide an auxiliary - token as per `documentation `_. The primary token will be from the tenant for - whom a support ticket is being raised against the subscription, i.e. Cloud solution provider - (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) - partner tenant. + token as per `documentation + `_. + The primary token will be from the tenant for whom a support ticket is being raised against the + subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be + from the Cloud solution provider (CSP) partner tenant. :param support_ticket_name: Support ticket name. :type support_ticket_name: str @@ -400,8 +400,8 @@ async def begin_create( :type create_support_ticket_parameters: ~azure.mgmt.support.models.SupportTicketDetails :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: True for ARMPolling, False for no polling, or a - polling object for 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 SupportTicketDetails or the result of cls(response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models.py index 80d9d6bd4902..87d080ca2d58 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models.py @@ -183,8 +183,8 @@ class ContactProfile(msrest.serialization.Model): :param phone_number: Phone number. This is required if preferred contact method is phone. :type phone_number: str :param preferred_time_zone: Required. Time zone of the user. This is the name of the time zone - from `Microsoft Time Zone Index Values `_. + from `Microsoft Time Zone Index Values + `_. :type preferred_time_zone: str :param country: Required. Country of the user. This is the ISO 3166-1 alpha-3 code. :type country: str @@ -839,8 +839,8 @@ class UpdateContactProfile(msrest.serialization.Model): :param phone_number: Phone number. This is required if preferred contact method is phone. :type phone_number: str :param preferred_time_zone: Time zone of the user. This is the name of the time zone from - `Microsoft Time Zone Index Values `_. + `Microsoft Time Zone Index Values + `_. :type preferred_time_zone: str :param country: Country of the user. This is the ISO 3166-1 alpha-3 code. :type country: str diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models_py3.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models_py3.py index 704ea8c58ae4..e019dbd910cd 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models_py3.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models_py3.py @@ -198,8 +198,8 @@ class ContactProfile(msrest.serialization.Model): :param phone_number: Phone number. This is required if preferred contact method is phone. :type phone_number: str :param preferred_time_zone: Required. Time zone of the user. This is the name of the time zone - from `Microsoft Time Zone Index Values `_. + from `Microsoft Time Zone Index Values + `_. :type preferred_time_zone: str :param country: Required. Country of the user. This is the ISO 3166-1 alpha-3 code. :type country: str @@ -911,8 +911,8 @@ class UpdateContactProfile(msrest.serialization.Model): :param phone_number: Phone number. This is required if preferred contact method is phone. :type phone_number: str :param preferred_time_zone: Time zone of the user. This is the name of the time zone from - `Microsoft Time Zone Index Values `_. + `Microsoft Time Zone Index Values + `_. :type preferred_time_zone: str :param country: Country of the user. This is the ISO 3166-1 alpha-3 code. :type country: str diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_communications_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_communications_operations.py index e434a0ce0739..2229e0474a16 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_communications_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_communications_operations.py @@ -101,7 +101,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -192,7 +192,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -252,7 +252,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CommunicationDetails', pipeline_response) @@ -307,7 +307,7 @@ def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -338,8 +338,8 @@ def begin_create( :type create_communication_parameters: ~azure.mgmt.support.models.CommunicationDetails :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: True for ARMPolling, False for no polling, or a - polling object for 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 CommunicationDetails or the result of cls(response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_operations.py index 51255a98dcb4..9b54189951a2 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_operations.py @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_problem_classifications_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_problem_classifications_operations.py index f8871b516c67..fb09ada64e33 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_problem_classifications_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_problem_classifications_operations.py @@ -108,7 +108,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -167,7 +167,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProblemClassification', pipeline_response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_services_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_services_operations.py index 4cd3b2ad61a6..d0b66df45c2c 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_services_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_services_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -159,7 +159,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Service', pipeline_response) diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_support_tickets_operations.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_support_tickets_operations.py index b15abbd63394..35540feb6a67 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_support_tickets_operations.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_support_tickets_operations.py @@ -97,7 +97,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -183,7 +183,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -241,7 +241,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportTicketDetails', pipeline_response) @@ -311,7 +311,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportTicketDetails', pipeline_response) @@ -364,7 +364,7 @@ def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ExceptionResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -398,11 +398,11 @@ def begin_create( ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.:code:`
`:code:`
`\ **Creating a support ticket for on-behalf-of**\ : Include *x-ms-authorization-auxiliary* header to provide an auxiliary - token as per `documentation `_. The primary token will be from the tenant for - whom a support ticket is being raised against the subscription, i.e. Cloud solution provider - (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) - partner tenant. + token as per `documentation + `_. + The primary token will be from the tenant for whom a support ticket is being raised against the + subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be + from the Cloud solution provider (CSP) partner tenant. :param support_ticket_name: Support ticket name. :type support_ticket_name: str @@ -410,8 +410,8 @@ def begin_create( :type create_support_ticket_parameters: ~azure.mgmt.support.models.SupportTicketDetails :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: True for ARMPolling, False for no polling, or a - polling object for 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 SupportTicketDetails or the result of cls(response)