From 5e6e0c7d49fb1333782e8359e8ab3ddf9a0333aa Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 25 Jun 2021 23:20:11 +0000 Subject: [PATCH] CodeGen from PR 14990 in Azure/azure-rest-api-specs [Python] track2 config (#14990) * authorization * automation * recoveryservices * logic * notificationhubs * search --- .../azure-mgmt-automation/MANIFEST.in | 1 + .../azure-mgmt-automation/_meta.json | 11 + .../mgmt/automation/_automation_client.py | 146 +++--- .../azure/mgmt/automation/_metadata.json | 145 ++++++ .../azure/mgmt/automation/_version.py | 2 +- .../mgmt/automation/aio/_automation_client.py | 145 +++--- .../automation/aio/operations/__init__.py | 52 +- .../aio/operations/_activity_operations.py | 12 +- ...ent_registration_information_operations.py | 12 +- .../_automation_account_operations.py | 36 +- .../aio/operations/_certificate_operations.py | 30 +- .../aio/operations/_connection_operations.py | 30 +- .../operations/_connection_type_operations.py | 24 +- .../aio/operations/_credential_operations.py | 28 +- .../_dsc_compilation_job_operations.py | 30 +- .../_dsc_compilation_job_stream_operations.py | 6 +- .../_dsc_configuration_operations.py | 27 +- .../_dsc_node_configuration_operations.py | 30 +- .../aio/operations/_dsc_node_operations.py | 24 +- .../aio/operations/_fields_operations.py | 6 +- ..._hybrid_runbook_worker_group_operations.py | 24 +- .../aio/operations/_job_operations.py | 28 +- .../operations/_job_schedule_operations.py | 24 +- .../aio/operations/_job_stream_operations.py | 8 +- .../aio/operations/_keys_operations.py | 6 +- .../_linked_workspace_operations.py | 6 +- .../aio/operations/_module_operations.py | 30 +- .../_node_count_information_operations.py | 6 +- .../operations/_node_reports_operations.py | 26 +- .../_object_data_types_operations.py | 12 +- .../automation/aio/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 430 ++++++++++++++++ .../_private_link_resources_operations.py | 116 +++++ .../operations/_python2_package_operations.py | 30 +- .../operations/_runbook_draft_operations.py | 83 +-- .../aio/operations/_runbook_operations.py | 58 +-- .../aio/operations/_schedule_operations.py | 30 +- ...e_configuration_machine_runs_operations.py | 8 +- ...re_update_configuration_runs_operations.py | 8 +- ...ftware_update_configurations_operations.py | 16 +- .../operations/_source_control_operations.py | 30 +- .../_source_control_sync_job_operations.py | 18 +- ...rce_control_sync_job_streams_operations.py | 12 +- .../aio/operations/_statistics_operations.py | 6 +- .../aio/operations/_test_job_operations.py | 30 +- .../_test_job_streams_operations.py | 12 +- .../aio/operations/_usages_operations.py | 6 +- .../aio/operations/_variable_operations.py | 30 +- .../aio/operations/_watcher_operations.py | 42 +- .../aio/operations/_webhook_operations.py | 24 +- .../azure/mgmt/automation/models/__init__.py | 37 ++ .../models/_automation_client_enums.py | 19 +- .../azure/mgmt/automation/models/_models.py | 426 ++++++++++++++-- .../mgmt/automation/models/_models_py3.py | 473 ++++++++++++++++-- .../mgmt/automation/operations/__init__.py | 52 +- .../operations/_activity_operations.py | 8 +- ...ent_registration_information_operations.py | 8 +- .../_automation_account_operations.py | 24 +- .../operations/_certificate_operations.py | 20 +- .../operations/_connection_operations.py | 20 +- .../operations/_connection_type_operations.py | 16 +- .../operations/_credential_operations.py | 18 +- .../_dsc_compilation_job_operations.py | 20 +- .../_dsc_compilation_job_stream_operations.py | 4 +- .../_dsc_configuration_operations.py | 15 +- .../_dsc_node_configuration_operations.py | 20 +- .../operations/_dsc_node_operations.py | 16 +- .../operations/_fields_operations.py | 4 +- ..._hybrid_runbook_worker_group_operations.py | 16 +- .../automation/operations/_job_operations.py | 12 +- .../operations/_job_schedule_operations.py | 16 +- .../operations/_job_stream_operations.py | 4 +- .../automation/operations/_keys_operations.py | 4 +- .../_linked_workspace_operations.py | 4 +- .../operations/_module_operations.py | 20 +- .../_node_count_information_operations.py | 4 +- .../operations/_node_reports_operations.py | 20 +- .../_object_data_types_operations.py | 8 +- .../mgmt/automation/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 440 ++++++++++++++++ .../_private_link_resources_operations.py | 121 +++++ .../operations/_python2_package_operations.py | 20 +- .../operations/_runbook_draft_operations.py | 73 +-- .../operations/_runbook_operations.py | 42 +- .../operations/_schedule_operations.py | 20 +- ...e_configuration_machine_runs_operations.py | 4 +- ...re_update_configuration_runs_operations.py | 4 +- ...ftware_update_configurations_operations.py | 8 +- .../operations/_source_control_operations.py | 20 +- .../_source_control_sync_job_operations.py | 12 +- ...rce_control_sync_job_streams_operations.py | 8 +- .../operations/_statistics_operations.py | 4 +- .../operations/_test_job_operations.py | 20 +- .../_test_job_streams_operations.py | 8 +- .../operations/_usages_operations.py | 4 +- .../operations/_variable_operations.py | 20 +- .../operations/_watcher_operations.py | 28 +- .../operations/_webhook_operations.py | 12 +- 98 files changed, 3158 insertions(+), 980 deletions(-) create mode 100644 sdk/automation/azure-mgmt-automation/_meta.json create mode 100644 sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json create mode 100644 sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py diff --git a/sdk/automation/azure-mgmt-automation/MANIFEST.in b/sdk/automation/azure-mgmt-automation/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/automation/azure-mgmt-automation/MANIFEST.in +++ b/sdk/automation/azure-mgmt-automation/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/automation/azure-mgmt-automation/_meta.json b/sdk/automation/azure-mgmt-automation/_meta.json new file mode 100644 index 000000000000..3ad2d0829dcc --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "7f530e3727f746e26f5b5ece8a5874daf10cc56f", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/automation/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/automation/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py index aa9b40978ef3..93cbbee7115a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py @@ -16,27 +16,22 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import AutomationClientConfiguration -from .operations import RunbookDraftOperations -from .operations import RunbookOperations -from .operations import TestJobStreamsOperations -from .operations import TestJobOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import Python2PackageOperations from .operations import AgentRegistrationInformationOperations from .operations import DscNodeOperations from .operations import NodeReportsOperations +from .operations import DscNodeConfigurationOperations from .operations import DscCompilationJobOperations from .operations import DscCompilationJobStreamOperations -from .operations import DscNodeConfigurationOperations from .operations import NodeCountInformationOperations -from .operations import SoftwareUpdateConfigurationRunsOperations -from .operations import SoftwareUpdateConfigurationMachineRunsOperations from .operations import SourceControlOperations from .operations import SourceControlSyncJobOperations from .operations import SourceControlSyncJobStreamsOperations -from .operations import JobOperations -from .operations import JobStreamOperations from .operations import AutomationAccountOperations from .operations import StatisticsOperations from .operations import UsagesOperations @@ -45,8 +40,6 @@ from .operations import ConnectionOperations from .operations import ConnectionTypeOperations from .operations import CredentialOperations -from .operations import DscConfigurationOperations -from .operations import SoftwareUpdateConfigurationsOperations from .operations import HybridRunbookWorkerGroupOperations from .operations import JobScheduleOperations from .operations import LinkedWorkspaceOperations @@ -54,10 +47,20 @@ from .operations import ModuleOperations from .operations import ObjectDataTypesOperations from .operations import FieldsOperations -from .operations import Operations from .operations import ScheduleOperations from .operations import VariableOperations from .operations import WatcherOperations +from .operations import DscConfigurationOperations +from .operations import JobOperations +from .operations import JobStreamOperations +from .operations import Operations +from .operations import SoftwareUpdateConfigurationsOperations +from .operations import SoftwareUpdateConfigurationRunsOperations +from .operations import SoftwareUpdateConfigurationMachineRunsOperations +from .operations import RunbookDraftOperations +from .operations import RunbookOperations +from .operations import TestJobStreamsOperations +from .operations import TestJobOperations from .operations import WebhookOperations from . import models @@ -65,14 +68,10 @@ class AutomationClient(object): """Automation Client. - :ivar runbook_draft: RunbookDraftOperations operations - :vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations - :ivar runbook: RunbookOperations operations - :vartype runbook: azure.mgmt.automation.operations.RunbookOperations - :ivar test_job_streams: TestJobStreamsOperations operations - :vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations - :ivar test_job: TestJobOperations operations - :vartype test_job: azure.mgmt.automation.operations.TestJobOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.automation.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.automation.operations.PrivateLinkResourcesOperations :ivar python2_package: Python2PackageOperations operations :vartype python2_package: azure.mgmt.automation.operations.Python2PackageOperations :ivar agent_registration_information: AgentRegistrationInformationOperations operations @@ -81,28 +80,20 @@ class AutomationClient(object): :vartype dsc_node: azure.mgmt.automation.operations.DscNodeOperations :ivar node_reports: NodeReportsOperations operations :vartype node_reports: azure.mgmt.automation.operations.NodeReportsOperations + :ivar dsc_node_configuration: DscNodeConfigurationOperations operations + :vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations :ivar dsc_compilation_job: DscCompilationJobOperations operations :vartype dsc_compilation_job: azure.mgmt.automation.operations.DscCompilationJobOperations :ivar dsc_compilation_job_stream: DscCompilationJobStreamOperations operations :vartype dsc_compilation_job_stream: azure.mgmt.automation.operations.DscCompilationJobStreamOperations - :ivar dsc_node_configuration: DscNodeConfigurationOperations operations - :vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations :ivar node_count_information: NodeCountInformationOperations operations :vartype node_count_information: azure.mgmt.automation.operations.NodeCountInformationOperations - :ivar software_update_configuration_runs: SoftwareUpdateConfigurationRunsOperations operations - :vartype software_update_configuration_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationRunsOperations - :ivar software_update_configuration_machine_runs: SoftwareUpdateConfigurationMachineRunsOperations operations - :vartype software_update_configuration_machine_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationMachineRunsOperations :ivar source_control: SourceControlOperations operations :vartype source_control: azure.mgmt.automation.operations.SourceControlOperations :ivar source_control_sync_job: SourceControlSyncJobOperations operations :vartype source_control_sync_job: azure.mgmt.automation.operations.SourceControlSyncJobOperations :ivar source_control_sync_job_streams: SourceControlSyncJobStreamsOperations operations :vartype source_control_sync_job_streams: azure.mgmt.automation.operations.SourceControlSyncJobStreamsOperations - :ivar job: JobOperations operations - :vartype job: azure.mgmt.automation.operations.JobOperations - :ivar job_stream: JobStreamOperations operations - :vartype job_stream: azure.mgmt.automation.operations.JobStreamOperations :ivar automation_account: AutomationAccountOperations operations :vartype automation_account: azure.mgmt.automation.operations.AutomationAccountOperations :ivar statistics: StatisticsOperations operations @@ -119,10 +110,6 @@ class AutomationClient(object): :vartype connection_type: azure.mgmt.automation.operations.ConnectionTypeOperations :ivar credential: CredentialOperations operations :vartype credential: azure.mgmt.automation.operations.CredentialOperations - :ivar dsc_configuration: DscConfigurationOperations operations - :vartype dsc_configuration: azure.mgmt.automation.operations.DscConfigurationOperations - :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations - :vartype software_update_configurations: azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations :ivar hybrid_runbook_worker_group: HybridRunbookWorkerGroupOperations operations :vartype hybrid_runbook_worker_group: azure.mgmt.automation.operations.HybridRunbookWorkerGroupOperations :ivar job_schedule: JobScheduleOperations operations @@ -137,14 +124,34 @@ class AutomationClient(object): :vartype object_data_types: azure.mgmt.automation.operations.ObjectDataTypesOperations :ivar fields: FieldsOperations operations :vartype fields: azure.mgmt.automation.operations.FieldsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.automation.operations.Operations :ivar schedule: ScheduleOperations operations :vartype schedule: azure.mgmt.automation.operations.ScheduleOperations :ivar variable: VariableOperations operations :vartype variable: azure.mgmt.automation.operations.VariableOperations :ivar watcher: WatcherOperations operations :vartype watcher: azure.mgmt.automation.operations.WatcherOperations + :ivar dsc_configuration: DscConfigurationOperations operations + :vartype dsc_configuration: azure.mgmt.automation.operations.DscConfigurationOperations + :ivar job: JobOperations operations + :vartype job: azure.mgmt.automation.operations.JobOperations + :ivar job_stream: JobStreamOperations operations + :vartype job_stream: azure.mgmt.automation.operations.JobStreamOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.automation.operations.Operations + :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations + :vartype software_update_configurations: azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations + :ivar software_update_configuration_runs: SoftwareUpdateConfigurationRunsOperations operations + :vartype software_update_configuration_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationRunsOperations + :ivar software_update_configuration_machine_runs: SoftwareUpdateConfigurationMachineRunsOperations operations + :vartype software_update_configuration_machine_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationMachineRunsOperations + :ivar runbook_draft: RunbookDraftOperations operations + :vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations + :ivar runbook: RunbookOperations operations + :vartype runbook: azure.mgmt.automation.operations.RunbookOperations + :ivar test_job_streams: TestJobStreamsOperations operations + :vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations + :ivar test_job: TestJobOperations operations + :vartype test_job: azure.mgmt.automation.operations.TestJobOperations :ivar webhook: WebhookOperations operations :vartype webhook: azure.mgmt.automation.operations.WebhookOperations :param credential: Credential needed for the client to connect to Azure. @@ -170,15 +177,12 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.runbook_draft = RunbookDraftOperations( - self._client, self._config, self._serialize, self._deserialize) - self.runbook = RunbookOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.test_job_streams = TestJobStreamsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.test_job = TestJobOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.python2_package = Python2PackageOperations( self._client, self._config, self._serialize, self._deserialize) @@ -188,28 +192,20 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.node_reports = NodeReportsOperations( self._client, self._config, self._serialize, self._deserialize) + self.dsc_node_configuration = DscNodeConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) self.dsc_compilation_job = DscCompilationJobOperations( self._client, self._config, self._serialize, self._deserialize) self.dsc_compilation_job_stream = DscCompilationJobStreamOperations( self._client, self._config, self._serialize, self._deserialize) - self.dsc_node_configuration = DscNodeConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) self.node_count_information = NodeCountInformationOperations( self._client, self._config, self._serialize, self._deserialize) - self.software_update_configuration_runs = SoftwareUpdateConfigurationRunsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations( - self._client, self._config, self._serialize, self._deserialize) self.source_control = SourceControlOperations( self._client, self._config, self._serialize, self._deserialize) self.source_control_sync_job = SourceControlSyncJobOperations( self._client, self._config, self._serialize, self._deserialize) self.source_control_sync_job_streams = SourceControlSyncJobStreamsOperations( self._client, self._config, self._serialize, self._deserialize) - self.job = JobOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_stream = JobStreamOperations( - self._client, self._config, self._serialize, self._deserialize) self.automation_account = AutomationAccountOperations( self._client, self._config, self._serialize, self._deserialize) self.statistics = StatisticsOperations( @@ -226,10 +222,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.credential = CredentialOperations( self._client, self._config, self._serialize, self._deserialize) - self.dsc_configuration = DscConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.software_update_configurations = SoftwareUpdateConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) self.hybrid_runbook_worker_group = HybridRunbookWorkerGroupOperations( self._client, self._config, self._serialize, self._deserialize) self.job_schedule = JobScheduleOperations( @@ -244,17 +236,55 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.fields = FieldsOperations( self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) self.schedule = ScheduleOperations( self._client, self._config, self._serialize, self._deserialize) self.variable = VariableOperations( self._client, self._config, self._serialize, self._deserialize) self.watcher = WatcherOperations( self._client, self._config, self._serialize, self._deserialize) + self.dsc_configuration = DscConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.job = JobOperations( + self._client, self._config, self._serialize, self._deserialize) + self.job_stream = JobStreamOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configurations = SoftwareUpdateConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configuration_runs = SoftwareUpdateConfigurationRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.runbook_draft = RunbookDraftOperations( + self._client, self._config, self._serialize, self._deserialize) + self.runbook = RunbookOperations( + self._client, self._config, self._serialize, self._deserialize) + self.test_job_streams = TestJobStreamsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.test_job = TestJobOperations( + self._client, self._config, self._serialize, self._deserialize) self.webhook = WebhookOperations( 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/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json new file mode 100644 index 000000000000..a50ebc01cd4b --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json @@ -0,0 +1,145 @@ +{ + "chosen_version": "", + "total_api_version_list": ["2015-10-31", "2018-06-30", "2019-06-01", "2020-01-13-preview"], + "client": { + "name": "AutomationClient", + "filename": "_automation_client", + "description": "Automation Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "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\": [\"AutomationClientConfiguration\"]}}, \"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\": [\"AutomationClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "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: str,", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "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, + "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": { + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "python2_package": "Python2PackageOperations", + "agent_registration_information": "AgentRegistrationInformationOperations", + "dsc_node": "DscNodeOperations", + "node_reports": "NodeReportsOperations", + "dsc_node_configuration": "DscNodeConfigurationOperations", + "dsc_compilation_job": "DscCompilationJobOperations", + "dsc_compilation_job_stream": "DscCompilationJobStreamOperations", + "node_count_information": "NodeCountInformationOperations", + "source_control": "SourceControlOperations", + "source_control_sync_job": "SourceControlSyncJobOperations", + "source_control_sync_job_streams": "SourceControlSyncJobStreamsOperations", + "automation_account": "AutomationAccountOperations", + "statistics": "StatisticsOperations", + "usages": "UsagesOperations", + "keys": "KeysOperations", + "certificate": "CertificateOperations", + "connection": "ConnectionOperations", + "connection_type": "ConnectionTypeOperations", + "credential": "CredentialOperations", + "hybrid_runbook_worker_group": "HybridRunbookWorkerGroupOperations", + "job_schedule": "JobScheduleOperations", + "linked_workspace": "LinkedWorkspaceOperations", + "activity": "ActivityOperations", + "module": "ModuleOperations", + "object_data_types": "ObjectDataTypesOperations", + "fields": "FieldsOperations", + "schedule": "ScheduleOperations", + "variable": "VariableOperations", + "watcher": "WatcherOperations", + "dsc_configuration": "DscConfigurationOperations", + "job": "JobOperations", + "job_stream": "JobStreamOperations", + "operations": "Operations", + "software_update_configurations": "SoftwareUpdateConfigurationsOperations", + "software_update_configuration_runs": "SoftwareUpdateConfigurationRunsOperations", + "software_update_configuration_machine_runs": "SoftwareUpdateConfigurationMachineRunsOperations", + "runbook_draft": "RunbookDraftOperations", + "runbook": "RunbookOperations", + "test_job_streams": "TestJobStreamsOperations", + "test_job": "TestJobOperations", + "webhook": "WebhookOperations" + } +} \ No newline at end of file diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py index 653b73a4a199..e5754a47ce68 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py index 0468a4e97c2e..6a8d772e6411 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_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 @@ -16,25 +17,19 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import AutomationClientConfiguration -from .operations import RunbookDraftOperations -from .operations import RunbookOperations -from .operations import TestJobStreamsOperations -from .operations import TestJobOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import Python2PackageOperations from .operations import AgentRegistrationInformationOperations from .operations import DscNodeOperations from .operations import NodeReportsOperations +from .operations import DscNodeConfigurationOperations from .operations import DscCompilationJobOperations from .operations import DscCompilationJobStreamOperations -from .operations import DscNodeConfigurationOperations from .operations import NodeCountInformationOperations -from .operations import SoftwareUpdateConfigurationRunsOperations -from .operations import SoftwareUpdateConfigurationMachineRunsOperations from .operations import SourceControlOperations from .operations import SourceControlSyncJobOperations from .operations import SourceControlSyncJobStreamsOperations -from .operations import JobOperations -from .operations import JobStreamOperations from .operations import AutomationAccountOperations from .operations import StatisticsOperations from .operations import UsagesOperations @@ -43,8 +38,6 @@ from .operations import ConnectionOperations from .operations import ConnectionTypeOperations from .operations import CredentialOperations -from .operations import DscConfigurationOperations -from .operations import SoftwareUpdateConfigurationsOperations from .operations import HybridRunbookWorkerGroupOperations from .operations import JobScheduleOperations from .operations import LinkedWorkspaceOperations @@ -52,10 +45,20 @@ from .operations import ModuleOperations from .operations import ObjectDataTypesOperations from .operations import FieldsOperations -from .operations import Operations from .operations import ScheduleOperations from .operations import VariableOperations from .operations import WatcherOperations +from .operations import DscConfigurationOperations +from .operations import JobOperations +from .operations import JobStreamOperations +from .operations import Operations +from .operations import SoftwareUpdateConfigurationsOperations +from .operations import SoftwareUpdateConfigurationRunsOperations +from .operations import SoftwareUpdateConfigurationMachineRunsOperations +from .operations import RunbookDraftOperations +from .operations import RunbookOperations +from .operations import TestJobStreamsOperations +from .operations import TestJobOperations from .operations import WebhookOperations from .. import models @@ -63,14 +66,10 @@ class AutomationClient(object): """Automation Client. - :ivar runbook_draft: RunbookDraftOperations operations - :vartype runbook_draft: azure.mgmt.automation.aio.operations.RunbookDraftOperations - :ivar runbook: RunbookOperations operations - :vartype runbook: azure.mgmt.automation.aio.operations.RunbookOperations - :ivar test_job_streams: TestJobStreamsOperations operations - :vartype test_job_streams: azure.mgmt.automation.aio.operations.TestJobStreamsOperations - :ivar test_job: TestJobOperations operations - :vartype test_job: azure.mgmt.automation.aio.operations.TestJobOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.automation.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.automation.aio.operations.PrivateLinkResourcesOperations :ivar python2_package: Python2PackageOperations operations :vartype python2_package: azure.mgmt.automation.aio.operations.Python2PackageOperations :ivar agent_registration_information: AgentRegistrationInformationOperations operations @@ -79,28 +78,20 @@ class AutomationClient(object): :vartype dsc_node: azure.mgmt.automation.aio.operations.DscNodeOperations :ivar node_reports: NodeReportsOperations operations :vartype node_reports: azure.mgmt.automation.aio.operations.NodeReportsOperations + :ivar dsc_node_configuration: DscNodeConfigurationOperations operations + :vartype dsc_node_configuration: azure.mgmt.automation.aio.operations.DscNodeConfigurationOperations :ivar dsc_compilation_job: DscCompilationJobOperations operations :vartype dsc_compilation_job: azure.mgmt.automation.aio.operations.DscCompilationJobOperations :ivar dsc_compilation_job_stream: DscCompilationJobStreamOperations operations :vartype dsc_compilation_job_stream: azure.mgmt.automation.aio.operations.DscCompilationJobStreamOperations - :ivar dsc_node_configuration: DscNodeConfigurationOperations operations - :vartype dsc_node_configuration: azure.mgmt.automation.aio.operations.DscNodeConfigurationOperations :ivar node_count_information: NodeCountInformationOperations operations :vartype node_count_information: azure.mgmt.automation.aio.operations.NodeCountInformationOperations - :ivar software_update_configuration_runs: SoftwareUpdateConfigurationRunsOperations operations - :vartype software_update_configuration_runs: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationRunsOperations - :ivar software_update_configuration_machine_runs: SoftwareUpdateConfigurationMachineRunsOperations operations - :vartype software_update_configuration_machine_runs: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationMachineRunsOperations :ivar source_control: SourceControlOperations operations :vartype source_control: azure.mgmt.automation.aio.operations.SourceControlOperations :ivar source_control_sync_job: SourceControlSyncJobOperations operations :vartype source_control_sync_job: azure.mgmt.automation.aio.operations.SourceControlSyncJobOperations :ivar source_control_sync_job_streams: SourceControlSyncJobStreamsOperations operations :vartype source_control_sync_job_streams: azure.mgmt.automation.aio.operations.SourceControlSyncJobStreamsOperations - :ivar job: JobOperations operations - :vartype job: azure.mgmt.automation.aio.operations.JobOperations - :ivar job_stream: JobStreamOperations operations - :vartype job_stream: azure.mgmt.automation.aio.operations.JobStreamOperations :ivar automation_account: AutomationAccountOperations operations :vartype automation_account: azure.mgmt.automation.aio.operations.AutomationAccountOperations :ivar statistics: StatisticsOperations operations @@ -117,10 +108,6 @@ class AutomationClient(object): :vartype connection_type: azure.mgmt.automation.aio.operations.ConnectionTypeOperations :ivar credential: CredentialOperations operations :vartype credential: azure.mgmt.automation.aio.operations.CredentialOperations - :ivar dsc_configuration: DscConfigurationOperations operations - :vartype dsc_configuration: azure.mgmt.automation.aio.operations.DscConfigurationOperations - :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations - :vartype software_update_configurations: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationsOperations :ivar hybrid_runbook_worker_group: HybridRunbookWorkerGroupOperations operations :vartype hybrid_runbook_worker_group: azure.mgmt.automation.aio.operations.HybridRunbookWorkerGroupOperations :ivar job_schedule: JobScheduleOperations operations @@ -135,14 +122,34 @@ class AutomationClient(object): :vartype object_data_types: azure.mgmt.automation.aio.operations.ObjectDataTypesOperations :ivar fields: FieldsOperations operations :vartype fields: azure.mgmt.automation.aio.operations.FieldsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.automation.aio.operations.Operations :ivar schedule: ScheduleOperations operations :vartype schedule: azure.mgmt.automation.aio.operations.ScheduleOperations :ivar variable: VariableOperations operations :vartype variable: azure.mgmt.automation.aio.operations.VariableOperations :ivar watcher: WatcherOperations operations :vartype watcher: azure.mgmt.automation.aio.operations.WatcherOperations + :ivar dsc_configuration: DscConfigurationOperations operations + :vartype dsc_configuration: azure.mgmt.automation.aio.operations.DscConfigurationOperations + :ivar job: JobOperations operations + :vartype job: azure.mgmt.automation.aio.operations.JobOperations + :ivar job_stream: JobStreamOperations operations + :vartype job_stream: azure.mgmt.automation.aio.operations.JobStreamOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.automation.aio.operations.Operations + :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations + :vartype software_update_configurations: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationsOperations + :ivar software_update_configuration_runs: SoftwareUpdateConfigurationRunsOperations operations + :vartype software_update_configuration_runs: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationRunsOperations + :ivar software_update_configuration_machine_runs: SoftwareUpdateConfigurationMachineRunsOperations operations + :vartype software_update_configuration_machine_runs: azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationMachineRunsOperations + :ivar runbook_draft: RunbookDraftOperations operations + :vartype runbook_draft: azure.mgmt.automation.aio.operations.RunbookDraftOperations + :ivar runbook: RunbookOperations operations + :vartype runbook: azure.mgmt.automation.aio.operations.RunbookOperations + :ivar test_job_streams: TestJobStreamsOperations operations + :vartype test_job_streams: azure.mgmt.automation.aio.operations.TestJobStreamsOperations + :ivar test_job: TestJobOperations operations + :vartype test_job: azure.mgmt.automation.aio.operations.TestJobOperations :ivar webhook: WebhookOperations operations :vartype webhook: azure.mgmt.automation.aio.operations.WebhookOperations :param credential: Credential needed for the client to connect to Azure. @@ -167,15 +174,12 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.runbook_draft = RunbookDraftOperations( - self._client, self._config, self._serialize, self._deserialize) - self.runbook = RunbookOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.test_job_streams = TestJobStreamsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.test_job = TestJobOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.python2_package = Python2PackageOperations( self._client, self._config, self._serialize, self._deserialize) @@ -185,28 +189,20 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.node_reports = NodeReportsOperations( self._client, self._config, self._serialize, self._deserialize) + self.dsc_node_configuration = DscNodeConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) self.dsc_compilation_job = DscCompilationJobOperations( self._client, self._config, self._serialize, self._deserialize) self.dsc_compilation_job_stream = DscCompilationJobStreamOperations( self._client, self._config, self._serialize, self._deserialize) - self.dsc_node_configuration = DscNodeConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) self.node_count_information = NodeCountInformationOperations( self._client, self._config, self._serialize, self._deserialize) - self.software_update_configuration_runs = SoftwareUpdateConfigurationRunsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations( - self._client, self._config, self._serialize, self._deserialize) self.source_control = SourceControlOperations( self._client, self._config, self._serialize, self._deserialize) self.source_control_sync_job = SourceControlSyncJobOperations( self._client, self._config, self._serialize, self._deserialize) self.source_control_sync_job_streams = SourceControlSyncJobStreamsOperations( self._client, self._config, self._serialize, self._deserialize) - self.job = JobOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_stream = JobStreamOperations( - self._client, self._config, self._serialize, self._deserialize) self.automation_account = AutomationAccountOperations( self._client, self._config, self._serialize, self._deserialize) self.statistics = StatisticsOperations( @@ -223,10 +219,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.credential = CredentialOperations( self._client, self._config, self._serialize, self._deserialize) - self.dsc_configuration = DscConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.software_update_configurations = SoftwareUpdateConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) self.hybrid_runbook_worker_group = HybridRunbookWorkerGroupOperations( self._client, self._config, self._serialize, self._deserialize) self.job_schedule = JobScheduleOperations( @@ -241,17 +233,54 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.fields = FieldsOperations( self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) self.schedule = ScheduleOperations( self._client, self._config, self._serialize, self._deserialize) self.variable = VariableOperations( self._client, self._config, self._serialize, self._deserialize) self.watcher = WatcherOperations( self._client, self._config, self._serialize, self._deserialize) + self.dsc_configuration = DscConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.job = JobOperations( + self._client, self._config, self._serialize, self._deserialize) + self.job_stream = JobStreamOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configurations = SoftwareUpdateConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configuration_runs = SoftwareUpdateConfigurationRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.runbook_draft = RunbookDraftOperations( + self._client, self._config, self._serialize, self._deserialize) + self.runbook = RunbookOperations( + self._client, self._config, self._serialize, self._deserialize) + self.test_job_streams = TestJobStreamsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.test_job = TestJobOperations( + self._client, self._config, self._serialize, self._deserialize) self.webhook = WebhookOperations( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py index d7371312a9c8..18a3b687ef48 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py @@ -6,25 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._runbook_draft_operations import RunbookDraftOperations -from ._runbook_operations import RunbookOperations -from ._test_job_streams_operations import TestJobStreamsOperations -from ._test_job_operations import TestJobOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._python2_package_operations import Python2PackageOperations from ._agent_registration_information_operations import AgentRegistrationInformationOperations from ._dsc_node_operations import DscNodeOperations from ._node_reports_operations import NodeReportsOperations +from ._dsc_node_configuration_operations import DscNodeConfigurationOperations from ._dsc_compilation_job_operations import DscCompilationJobOperations from ._dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations -from ._dsc_node_configuration_operations import DscNodeConfigurationOperations from ._node_count_information_operations import NodeCountInformationOperations -from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations -from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations from ._source_control_operations import SourceControlOperations from ._source_control_sync_job_operations import SourceControlSyncJobOperations from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations -from ._job_operations import JobOperations -from ._job_stream_operations import JobStreamOperations from ._automation_account_operations import AutomationAccountOperations from ._statistics_operations import StatisticsOperations from ._usages_operations import UsagesOperations @@ -33,8 +27,6 @@ from ._connection_operations import ConnectionOperations from ._connection_type_operations import ConnectionTypeOperations from ._credential_operations import CredentialOperations -from ._dsc_configuration_operations import DscConfigurationOperations -from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations from ._job_schedule_operations import JobScheduleOperations from ._linked_workspace_operations import LinkedWorkspaceOperations @@ -42,32 +34,36 @@ from ._module_operations import ModuleOperations from ._object_data_types_operations import ObjectDataTypesOperations from ._fields_operations import FieldsOperations -from ._operations import Operations from ._schedule_operations import ScheduleOperations from ._variable_operations import VariableOperations from ._watcher_operations import WatcherOperations +from ._dsc_configuration_operations import DscConfigurationOperations +from ._job_operations import JobOperations +from ._job_stream_operations import JobStreamOperations +from ._operations import Operations +from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations +from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations +from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations +from ._runbook_draft_operations import RunbookDraftOperations +from ._runbook_operations import RunbookOperations +from ._test_job_streams_operations import TestJobStreamsOperations +from ._test_job_operations import TestJobOperations from ._webhook_operations import WebhookOperations __all__ = [ - 'RunbookDraftOperations', - 'RunbookOperations', - 'TestJobStreamsOperations', - 'TestJobOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', 'Python2PackageOperations', 'AgentRegistrationInformationOperations', 'DscNodeOperations', 'NodeReportsOperations', + 'DscNodeConfigurationOperations', 'DscCompilationJobOperations', 'DscCompilationJobStreamOperations', - 'DscNodeConfigurationOperations', 'NodeCountInformationOperations', - 'SoftwareUpdateConfigurationRunsOperations', - 'SoftwareUpdateConfigurationMachineRunsOperations', 'SourceControlOperations', 'SourceControlSyncJobOperations', 'SourceControlSyncJobStreamsOperations', - 'JobOperations', - 'JobStreamOperations', 'AutomationAccountOperations', 'StatisticsOperations', 'UsagesOperations', @@ -76,8 +72,6 @@ 'ConnectionOperations', 'ConnectionTypeOperations', 'CredentialOperations', - 'DscConfigurationOperations', - 'SoftwareUpdateConfigurationsOperations', 'HybridRunbookWorkerGroupOperations', 'JobScheduleOperations', 'LinkedWorkspaceOperations', @@ -85,9 +79,19 @@ 'ModuleOperations', 'ObjectDataTypesOperations', 'FieldsOperations', - 'Operations', 'ScheduleOperations', 'VariableOperations', 'WatcherOperations', + 'DscConfigurationOperations', + 'JobOperations', + 'JobStreamOperations', + 'Operations', + 'SoftwareUpdateConfigurationsOperations', + 'SoftwareUpdateConfigurationRunsOperations', + 'SoftwareUpdateConfigurationMachineRunsOperations', + 'RunbookDraftOperations', + 'RunbookOperations', + 'TestJobStreamsOperations', + 'TestJobOperations', 'WebhookOperations', ] diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py index f3fd231d0257..3027e3557cb1 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py @@ -47,7 +47,7 @@ async def get( automation_account_name: str, module_name: str, activity_name: str, - **kwargs + **kwargs: Any ) -> "_models.Activity": """Retrieve the activity in the module identified by module name and activity name. @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -97,7 +97,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Activity', pipeline_response) @@ -113,7 +113,7 @@ def list_by_module( resource_group_name: str, automation_account_name: str, module_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActivityListResult"]: """Retrieve a list of activities in the module identified by module name. @@ -133,7 +133,7 @@ def list_by_module( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -176,7 +176,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py index c0f984e15215..89378903f803 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py @@ -44,7 +44,7 @@ async def get( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> "_models.AgentRegistration": """Retrieve the automation agent registration information. @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -88,7 +88,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AgentRegistration', pipeline_response) @@ -104,7 +104,7 @@ async def regenerate_key( resource_group_name: str, automation_account_name: str, parameters: "_models.AgentRegistrationRegenerateKeyParameter", - **kwargs + **kwargs: Any ) -> "_models.AgentRegistration": """Regenerate a primary or secondary agent registration key. @@ -124,7 +124,7 @@ async def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -155,7 +155,7 @@ async def regenerate_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AgentRegistration', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py index c46bc8efda84..3d36a6574690 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py @@ -46,7 +46,7 @@ async def update( resource_group_name: str, automation_account_name: str, parameters: "_models.AutomationAccountUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AutomationAccount": """Update an automation account. @@ -66,7 +66,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -97,7 +97,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutomationAccount', pipeline_response) @@ -113,7 +113,7 @@ async def create_or_update( resource_group_name: str, automation_account_name: str, parameters: "_models.AutomationAccountCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AutomationAccount": """Create or update automation account. @@ -133,7 +133,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -164,7 +164,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -183,7 +183,7 @@ async def delete( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an automation account. @@ -201,7 +201,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -227,7 +227,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -239,7 +239,7 @@ async def get( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> "_models.AutomationAccount": """Get information about an Automation Account. @@ -257,7 +257,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -283,7 +283,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutomationAccount', pipeline_response) @@ -297,7 +297,7 @@ async def get( def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AutomationAccountListResult"]: """Retrieve a list of accounts within a given resource group. @@ -313,7 +313,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -354,7 +354,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -367,7 +367,7 @@ async def get_next(next_link=None): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AutomationAccountListResult"]: """Lists the Automation Accounts within an Azure subscription. @@ -383,7 +383,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -423,7 +423,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py index 9550ca4ad5a9..7c5c5f69af9f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, certificate_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the certificate. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, certificate_name: str, - **kwargs + **kwargs: Any ) -> "_models.Certificate": """Retrieve the certificate identified by certificate name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, certificate_name: str, parameters: "_models.CertificateCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Certificate": """Create a certificate. @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def update( automation_account_name: str, certificate_name: str, parameters: "_models.CertificateUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Certificate": """Update a certificate. @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CertificateListResult"]: """Retrieve a list of certificates. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -374,7 +374,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py index cfaacdf48919..07737190813a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, connection_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the connection. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.Connection": """Retrieve the connection identified by connection name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Connection', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, connection_name: str, parameters: "_models.ConnectionCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Connection": """Create or update a connection. @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def update( automation_account_name: str, connection_name: str, parameters: "_models.ConnectionUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Connection": """Update a connection. @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Connection', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectionListResult"]: """Retrieve a list of connections. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -374,7 +374,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py index 921ca73acdfd..a0abad4ef243 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, connection_type_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the connection type. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, connection_type_name: str, - **kwargs + **kwargs: Any ) -> "_models.ConnectionType": """Retrieve the connection type identified by connection type name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionType', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, connection_type_name: str, parameters: "_models.ConnectionTypeCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ConnectionType": """Create a connection type. @@ -193,7 +193,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +225,7 @@ async def create_or_update( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionType', pipeline_response) @@ -240,7 +240,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectionTypeListResult"]: """Retrieve a list of connection types. @@ -258,7 +258,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -300,7 +300,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py index b70ff90697ff..2fa3f885fcbf 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, credential_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the credential. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, credential_name: str, - **kwargs + **kwargs: Any ) -> "_models.Credential": """Retrieve the credential identified by credential name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Credential', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, credential_name: str, parameters: "_models.CredentialCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Credential": """Create a credential. @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def update( automation_account_name: str, credential_name: str, parameters: "_models.CredentialUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Credential": """Update a credential. @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Credential', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CredentialListResult"]: """Retrieve a list of credentials. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py index bd5b087ef960..3c37a5f6a7f4 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py @@ -49,14 +49,14 @@ async def _create_initial( automation_account_name: str, compilation_job_name: str, parameters: "_models.DscCompilationJobCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.DscCompilationJob": cls = kwargs.pop('cls', None) # type: ClsType["_models.DscCompilationJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -88,7 +88,7 @@ async def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscCompilationJob', pipeline_response) @@ -105,7 +105,7 @@ async def begin_create( automation_account_name: str, compilation_job_name: str, parameters: "_models.DscCompilationJobCreateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DscCompilationJob"]: """Creates the Dsc compilation job of the configuration. @@ -119,8 +119,8 @@ async def begin_create( :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters :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 DscCompilationJob or the result of cls(response) @@ -180,7 +180,7 @@ async def get( resource_group_name: str, automation_account_name: str, compilation_job_name: str, - **kwargs + **kwargs: Any ) -> "_models.DscCompilationJob": """Retrieve the Dsc configuration compilation job identified by job id. @@ -200,7 +200,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -227,7 +227,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscCompilationJob', pipeline_response) @@ -243,7 +243,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DscCompilationJobListResult"]: """Retrieve a list of dsc compilation jobs. @@ -263,7 +263,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -307,7 +307,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -324,7 +324,7 @@ async def get_stream( automation_account_name: str, job_id: str, job_stream_id: str, - **kwargs + **kwargs: Any ) -> "_models.JobStream": """Retrieve the job stream identified by job stream id. @@ -346,7 +346,7 @@ async def get_stream( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -374,7 +374,7 @@ async def get_stream( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py index b5ceebb497b1..4dc0814b1abb 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py @@ -45,7 +45,7 @@ async def list_by_job( resource_group_name: str, automation_account_name: str, job_id: str, - **kwargs + **kwargs: Any ) -> "_models.JobStreamListResult": """Retrieve all the job streams for the compilation Job. @@ -65,7 +65,7 @@ async def list_by_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ async def list_by_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStreamListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py index fa2cc5f3e6a9..7ee51f2c50df 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, configuration_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the dsc configuration identified by configuration name. @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, configuration_name: str, - **kwargs + **kwargs: Any ) -> "_models.DscConfiguration": """Retrieve the configuration identified by configuration name. @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscConfiguration', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, configuration_name: str, parameters: Union[str, "_models.DscConfigurationCreateOrUpdateParameters"], - **kwargs + **kwargs: Any ) -> "_models.DscConfiguration": """Create the configuration identified by configuration name. @@ -235,7 +235,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -256,7 +256,7 @@ async def update( automation_account_name: str, configuration_name: str, parameters: Optional[Union[str, "_models.DscConfigurationUpdateParameters"]] = None, - **kwargs + **kwargs: Any ) -> "_models.DscConfiguration": """Create the configuration identified by configuration name. @@ -305,7 +305,10 @@ async def update( body_content_kwargs = {} # type: Dict[str, Any] if header_parameters['Content-Type'].split(";")[0] in ['text/plain']: - body_content = self._serialize.body(parameters, 'str') + if parameters is not None: + body_content = self._serialize.body(parameters, 'str') + else: + body_content = None body_content_kwargs['content'] = body_content elif header_parameters['Content-Type'].split(";")[0] in ['application/json']: if parameters is not None: @@ -324,7 +327,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscConfiguration', pipeline_response) @@ -340,7 +343,7 @@ async def get_content( resource_group_name: str, automation_account_name: str, configuration_name: str, - **kwargs + **kwargs: Any ) -> str: """Retrieve the configuration script identified by configuration name. @@ -405,7 +408,7 @@ def list_by_automation_account( skip: Optional[int] = None, top: Optional[int] = None, inlinecount: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DscConfigurationListResult"]: """Retrieve a list of configurations. @@ -481,7 +484,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py index 1b76e60c6110..cac4bc187f31 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py @@ -48,7 +48,7 @@ async def delete( resource_group_name: str, automation_account_name: str, node_configuration_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the Dsc node configurations by node configuration. @@ -68,7 +68,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -95,7 +95,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -108,7 +108,7 @@ async def get( resource_group_name: str, automation_account_name: str, node_configuration_name: str, - **kwargs + **kwargs: Any ) -> "_models.DscNodeConfiguration": """Retrieve the Dsc node configurations by node configuration. @@ -128,7 +128,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -155,7 +155,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNodeConfiguration', pipeline_response) @@ -172,14 +172,14 @@ async def _create_or_update_initial( automation_account_name: str, node_configuration_name: str, parameters: "_models.DscNodeConfigurationCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.DscNodeConfiguration"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DscNodeConfiguration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -211,7 +211,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -230,7 +230,7 @@ async def begin_create_or_update( automation_account_name: str, node_configuration_name: str, parameters: "_models.DscNodeConfigurationCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DscNodeConfiguration"]: """Create the node configuration identified by node configuration name. @@ -244,8 +244,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters :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 None or the result of cls(response) @@ -308,7 +308,7 @@ def list_by_automation_account( skip: Optional[int] = None, top: Optional[int] = None, inlinecount: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DscNodeConfigurationListResult"]: """Retrieve a list of dsc node configurations. @@ -334,7 +334,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -384,7 +384,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py index c57d748bf2ee..20b9d8067b8e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, node_id: str, - **kwargs + **kwargs: Any ) -> None: """Delete the dsc node identified by node id. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, node_id: str, - **kwargs + **kwargs: Any ) -> "_models.DscNode": """Retrieve the dsc node identified by node id. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNode', pipeline_response) @@ -170,7 +170,7 @@ async def update( automation_account_name: str, node_id: str, dsc_node_update_parameters: "_models.DscNodeUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.DscNode": """Update the dsc node. @@ -192,7 +192,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNode', pipeline_response) @@ -243,7 +243,7 @@ def list_by_automation_account( skip: Optional[int] = None, top: Optional[int] = None, inlinecount: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DscNodeListResult"]: """Retrieve a list of dsc nodes. @@ -269,7 +269,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -319,7 +319,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py index 46dad5908054..96f918dc88e9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py @@ -47,7 +47,7 @@ def list_by_type( automation_account_name: str, module_name: str, type_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TypeFieldListResult"]: """Retrieve a list of fields of a given type identified by module name. @@ -69,7 +69,7 @@ def list_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -113,7 +113,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py index 26bbf388d578..97779cb37633 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, hybrid_runbook_worker_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete a hybrid runbook worker group. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, hybrid_runbook_worker_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.HybridRunbookWorkerGroup": """Retrieve a hybrid runbook worker group. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridRunbookWorkerGroup', pipeline_response) @@ -170,7 +170,7 @@ async def update( automation_account_name: str, hybrid_runbook_worker_group_name: str, parameters: "_models.HybridRunbookWorkerGroupUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.HybridRunbookWorkerGroup": """Update a hybrid runbook worker group. @@ -192,7 +192,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridRunbookWorkerGroup', pipeline_response) @@ -240,7 +240,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.HybridRunbookWorkerGroupsListResult"]: """Retrieve a list of hybrid runbook worker groups. @@ -260,7 +260,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -304,7 +304,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py index e0d98349d7c7..68d266fac5c5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py @@ -47,7 +47,7 @@ async def get_output( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> str: """Retrieve the job output identified by job name. @@ -114,7 +114,7 @@ async def get_runbook_content( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> str: """Retrieve the runbook content of the job identified by job name. @@ -181,7 +181,7 @@ async def suspend( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Suspend the job identified by job name. @@ -232,7 +232,7 @@ async def suspend( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -246,7 +246,7 @@ async def stop( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Stop the job identified by jobName. @@ -297,7 +297,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -311,7 +311,7 @@ async def get( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Job": """Retrieve the job identified by job name. @@ -362,7 +362,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Job', pipeline_response) @@ -380,7 +380,7 @@ async def create( job_name: str, parameters: "_models.JobCreateParameters", client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Job": """Create a job of the runbook. @@ -438,7 +438,7 @@ async def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Job', pipeline_response) @@ -455,7 +455,7 @@ def list_by_automation_account( automation_account_name: str, filter: Optional[str] = None, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobListResultV2"]: """Retrieve a list of jobs. @@ -523,7 +523,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -540,7 +540,7 @@ async def resume( automation_account_name: str, job_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Resume the job identified by jobName. @@ -591,7 +591,7 @@ async def resume( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py index fe0c83b3f10e..762eec548dac 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, job_schedule_id: str, - **kwargs + **kwargs: Any ) -> None: """Delete the job schedule identified by job schedule name. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, job_schedule_id: str, - **kwargs + **kwargs: Any ) -> "_models.JobSchedule": """Retrieve the job schedule identified by job schedule name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobSchedule', pipeline_response) @@ -170,7 +170,7 @@ async def create( automation_account_name: str, job_schedule_id: str, parameters: "_models.JobScheduleCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.JobSchedule": """Create a job schedule. @@ -192,7 +192,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobSchedule', pipeline_response) @@ -240,7 +240,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobScheduleListResult"]: """Retrieve a list of job schedules. @@ -260,7 +260,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -304,7 +304,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py index 7a79fe7c3750..fbf863be8f38 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py @@ -48,7 +48,7 @@ async def get( job_name: str, job_stream_id: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.JobStream": """Retrieve the job stream identified by job stream id. @@ -102,7 +102,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) @@ -120,7 +120,7 @@ def list_by_job( job_name: str, filter: Optional[str] = None, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobStreamListResult"]: """Retrieve a list of jobs streams identified by job name. @@ -191,7 +191,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py index 580c72ba99ef..54abc6a402a8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py @@ -44,7 +44,7 @@ async def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> "_models.KeyListResult": """Retrieve the automation keys for an account. @@ -62,7 +62,7 @@ async def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def list_by_automation_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py index d7b7686e96ce..8432d750c15b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py @@ -44,7 +44,7 @@ async def get( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> "_models.LinkedWorkspace": """Retrieve the linked workspace for the account id. @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -88,7 +88,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LinkedWorkspace', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py index 13311f118366..cb4dfc5ada1e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, module_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the module by name. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, module_name: str, - **kwargs + **kwargs: Any ) -> "_models.Module": """Retrieve the module identified by module name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, module_name: str, parameters: "_models.ModuleCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Module": """Create or Update the module identified by module name. @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def update( automation_account_name: str, module_name: str, parameters: "_models.ModuleUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Module": """Update the module identified by module name. @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ModuleListResult"]: """Retrieve a list of modules. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -374,7 +374,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py index aec38db50025..009bd687f4fe 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, automation_account_name: str, count_type: Union[str, "_models.CountType"], - **kwargs + **kwargs: Any ) -> "_models.NodeCounts": """Retrieve counts for Dsc Nodes. @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -92,7 +92,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeCounts', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py index 48789a3db04d..6f0ab6874287 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py @@ -47,7 +47,7 @@ def list_by_node( automation_account_name: str, node_id: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DscNodeReportListResult"]: """Retrieve the Dsc node report list by node id. @@ -69,7 +69,7 @@ def list_by_node( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -114,7 +114,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -131,7 +131,7 @@ async def get( automation_account_name: str, node_id: str, report_id: str, - **kwargs + **kwargs: Any ) -> "_models.DscNodeReport": """Retrieve the Dsc node report data by node id and report id. @@ -153,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -181,7 +181,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNodeReport', pipeline_response) @@ -198,8 +198,8 @@ async def get_content( automation_account_name: str, node_id: str, report_id: str, - **kwargs - ) -> object: + **kwargs: Any + ) -> Any: """Retrieve the Dsc node reports by node id and report id. :param resource_group_name: Name of an Azure Resource group. @@ -211,16 +211,16 @@ async def get_content( :param report_id: The report id. :type report_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -248,7 +248,7 @@ async def get_content( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py index 35507366f372..530964cab6cb 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py @@ -47,7 +47,7 @@ def list_fields_by_module_and_type( automation_account_name: str, module_name: str, type_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TypeFieldListResult"]: """Retrieve a list of fields of a given type identified by module name. @@ -69,7 +69,7 @@ def list_fields_by_module_and_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -113,7 +113,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -129,7 +129,7 @@ def list_fields_by_type( resource_group_name: str, automation_account_name: str, type_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TypeFieldListResult"]: """Retrieve a list of fields of a given type across all accessible modules. @@ -149,7 +149,7 @@ def list_fields_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -192,7 +192,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py index 5646e67f5ae1..c4e0de8b1f39 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/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"]: """Lists all of the available Automation 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.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..6ffb28c84d0b --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,430 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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 PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.automation.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_automation_account( + self, + resource_group_name: str, + automation_account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List all private endpoint connections on a Automation account. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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_automation_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_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') + + 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('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return 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]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + automation_account_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets a private endpoint connection. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.automation.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + automation_account_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **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 = "2020-01-13-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 = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(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 [200, 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + automation_account_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~azure.mgmt.automation.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: 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) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.automation.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + 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._create_or_update_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=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): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + automation_account_name: str, + private_endpoint_connection_name: str, + **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 = "2020-01-13-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + 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, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + automation_account_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :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: 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._delete_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..80012be8048c --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,116 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.automation.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def automation( + self, + resource_group_name: str, + automation_account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """Gets the private link resources that need to be created for Automation account. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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.automation.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_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') + + 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('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return 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]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + automation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateLinkResources'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py index b4753198f4b6..35a4112cc1b0 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py @@ -46,7 +46,7 @@ async def delete( resource_group_name: str, automation_account_name: str, package_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the python 2 package by name. @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -106,7 +106,7 @@ async def get( resource_group_name: str, automation_account_name: str, package_name: str, - **kwargs + **kwargs: Any ) -> "_models.Module": """Retrieve the python 2 package identified by package name. @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -170,7 +170,7 @@ async def create_or_update( automation_account_name: str, package_name: str, parameters: "_models.PythonPackageCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.Module": """Create or Update the python 2 package identified by package name. @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def update( automation_account_name: str, package_name: str, parameters: "_models.PythonPackageUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Module": """Update the python 2 package identified by package name. @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ModuleListResult"]: """Retrieve a list of python 2 packages. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -374,7 +374,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py index 5118a9366302..b80b7f23231c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py @@ -5,7 +5,7 @@ # 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 +from typing import Any, Callable, Dict, Generic, IO, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -47,8 +47,8 @@ async def get_content( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs - ) -> str: + **kwargs: Any + ) -> IO: """Retrieve the content of runbook draft identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -58,16 +58,16 @@ async def get_content( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str + :return: IO, or the result of cls(response) + :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType[IO] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "text/powershell" # Construct URL @@ -96,7 +96,7 @@ async def get_content( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('IO', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -110,14 +110,14 @@ async def _replace_content_initial( automation_account_name: str, runbook_name: str, runbook_content: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + **kwargs: Any + ) -> Optional[IO]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "text/powershell") accept = "application/json" @@ -144,21 +144,26 @@ async def _replace_content_initial( body_content = self._serialize.body(runbook_content, 'str') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + if response.status_code == 202: response_headers['location']=self._deserialize('str', response.headers.get('location')) if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) + return deserialized _replace_content_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'} # type: ignore async def begin_replace_content( @@ -167,8 +172,8 @@ async def begin_replace_content( automation_account_name: str, runbook_name: str, runbook_content: str, - **kwargs - ) -> AsyncLROPoller[None]: + **kwargs: Any + ) -> AsyncLROPoller[IO]: """Replaces the runbook draft content. :param resource_group_name: Name of an Azure Resource group. @@ -177,20 +182,20 @@ async def begin_replace_content( :type automation_account_name: str :param runbook_name: The runbook name. :type runbook_name: str - :param runbook_content: The runbook draft content. + :param runbook_content: The runbook draft content. :type runbook_content: 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: 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 None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either IO or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[IO] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType[IO] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -210,8 +215,11 @@ async def begin_replace_content( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = response.stream_download(self._client._pipeline) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -220,7 +228,7 @@ def get_long_running_output(pipeline_response): 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + 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: @@ -239,7 +247,7 @@ async def get( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> "_models.RunbookDraft": """Retrieve the runbook draft identified by runbook name. @@ -259,7 +267,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -286,7 +294,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RunbookDraft', pipeline_response) @@ -302,8 +310,8 @@ async def undo_edit( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs - ) -> None: + **kwargs: Any + ) -> "_models.RunbookDraftUndoEditResult": """Undo draft edit to last known published state identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -313,16 +321,16 @@ async def undo_edit( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: RunbookDraftUndoEditResult, or the result of cls(response) + :rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunbookDraftUndoEditResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -349,10 +357,13 @@ async def undo_edit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = self._deserialize('RunbookDraftUndoEditResult', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized undo_edit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py index bed2db8ae795..8d5bc6a529ec 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py @@ -5,7 +5,7 @@ # 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -48,14 +48,14 @@ async def _publish_initial( resource_group_name: str, automation_account_name: str, runbook_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 = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -82,7 +82,7 @@ async def _publish_initial( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -98,7 +98,7 @@ async def begin_publish( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Publish runbook draft. @@ -110,8 +110,8 @@ async def begin_publish( :type runbook_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: 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 None or the result of cls(response) @@ -167,8 +167,8 @@ async def get_content( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs - ) -> str: + **kwargs: Any + ) -> IO: """Retrieve the content of runbook identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -178,16 +178,16 @@ async def get_content( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str + :return: IO, or the result of cls(response) + :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType[IO] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "text/powershell" # Construct URL @@ -216,7 +216,7 @@ async def get_content( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('IO', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -229,7 +229,7 @@ async def get( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> "_models.Runbook": """Retrieve the runbook identified by runbook name. @@ -249,7 +249,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -276,7 +276,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Runbook', pipeline_response) @@ -293,7 +293,7 @@ async def create_or_update( automation_account_name: str, runbook_name: str, parameters: "_models.RunbookCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Runbook": """Create the runbook identified by runbook name. @@ -316,7 +316,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -348,7 +348,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -369,7 +369,7 @@ async def update( automation_account_name: str, runbook_name: str, parameters: "_models.RunbookUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Runbook": """Update the runbook identified by runbook name. @@ -391,7 +391,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -423,7 +423,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Runbook', pipeline_response) @@ -439,7 +439,7 @@ async def delete( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the runbook by name. @@ -459,7 +459,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -486,7 +486,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -498,7 +498,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RunbookListResult"]: """Retrieve a list of runbooks. @@ -516,7 +516,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" def prepare_request(next_link=None): @@ -558,7 +558,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py index a23002841dcb..2250d0c4d5b7 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py @@ -47,7 +47,7 @@ async def create_or_update( automation_account_name: str, schedule_name: str, parameters: "_models.ScheduleCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.Schedule"]: """Create a schedule. @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -101,7 +101,7 @@ async def create_or_update( if response.status_code not in [200, 201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -123,7 +123,7 @@ async def update( automation_account_name: str, schedule_name: str, parameters: "_models.ScheduleUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Update the schedule identified by schedule name. @@ -145,7 +145,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -177,7 +177,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Schedule', pipeline_response) @@ -193,7 +193,7 @@ async def get( resource_group_name: str, automation_account_name: str, schedule_name: str, - **kwargs + **kwargs: Any ) -> "_models.Schedule": """Retrieve the schedule identified by schedule name. @@ -213,7 +213,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -240,7 +240,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Schedule', pipeline_response) @@ -256,7 +256,7 @@ async def delete( resource_group_name: str, automation_account_name: str, schedule_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the schedule identified by schedule name. @@ -276,7 +276,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -303,7 +303,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -315,7 +315,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduleListResult"]: """Retrieve a list of schedules. @@ -333,7 +333,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -375,7 +375,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py index 3ca0dfd2d7d8..e4ffc7c01cc4 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py @@ -46,7 +46,7 @@ async def get_by_id( automation_account_name: str, software_update_configuration_machine_run_id: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfigurationMachineRun": """Get a single software update configuration machine run by Id. @@ -98,7 +98,7 @@ async def get_by_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRun', pipeline_response) @@ -117,7 +117,7 @@ async def list( filter: Optional[str] = None, skip: Optional[str] = None, top: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfigurationMachineRunListResult": """Return list of software update configuration machine runs. @@ -179,7 +179,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRunListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py index ae3084d09235..759d98f752cc 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py @@ -46,7 +46,7 @@ async def get_by_id( automation_account_name: str, software_update_configuration_run_id: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfigurationRun": """Get a single software update configuration Run by Id. @@ -97,7 +97,7 @@ async def get_by_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationRun', pipeline_response) @@ -116,7 +116,7 @@ async def list( filter: Optional[str] = None, skip: Optional[str] = None, top: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfigurationRunListResult": """Return list of software update configuration runs. @@ -178,7 +178,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationRunListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py index 5ef8f8af42b3..5384f2dfc805 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py @@ -47,7 +47,7 @@ async def create( software_update_configuration_name: str, parameters: "_models.SoftwareUpdateConfiguration", client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfiguration": """Create a new software update configuration with the name given in the URI. @@ -106,7 +106,7 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -127,7 +127,7 @@ async def get_by_name( automation_account_name: str, software_update_configuration_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfiguration": """Get a single software update configuration by name. @@ -179,7 +179,7 @@ async def get_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) @@ -196,7 +196,7 @@ async def delete( automation_account_name: str, software_update_configuration_name: str, client_request_id: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """delete a specific software update configuration. @@ -248,7 +248,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -262,7 +262,7 @@ async def list( automation_account_name: str, client_request_id: Optional[str] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SoftwareUpdateConfigurationListResult": """Get all software update configurations for the account. @@ -314,7 +314,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py index c23577932dfe..48798b0d27a1 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py @@ -47,7 +47,7 @@ async def create_or_update( automation_account_name: str, source_control_name: str, parameters: "_models.SourceControlCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.SourceControl": """Create a source control. @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -101,7 +101,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -122,7 +122,7 @@ async def update( automation_account_name: str, source_control_name: str, parameters: "_models.SourceControlUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.SourceControl": """Update a source control. @@ -144,7 +144,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -176,7 +176,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -192,7 +192,7 @@ async def delete( resource_group_name: str, automation_account_name: str, source_control_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the source control. @@ -212,7 +212,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -239,7 +239,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -252,7 +252,7 @@ async def get( resource_group_name: str, automation_account_name: str, source_control_name: str, - **kwargs + **kwargs: Any ) -> "_models.SourceControl": """Retrieve the source control identified by source control name. @@ -272,7 +272,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -315,7 +315,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SourceControlListResult"]: """Retrieve a list of source controls. @@ -335,7 +335,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -379,7 +379,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py index 43a6647ef3a3..b776d16f1524 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py @@ -48,7 +48,7 @@ async def create( source_control_name: str, source_control_sync_job_id: str, parameters: "_models.SourceControlSyncJobCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.SourceControlSyncJob": """Creates the sync job for a source control. @@ -72,7 +72,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -105,7 +105,7 @@ async def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJob', pipeline_response) @@ -122,7 +122,7 @@ async def get( automation_account_name: str, source_control_name: str, source_control_sync_job_id: str, - **kwargs + **kwargs: Any ) -> "_models.SourceControlSyncJobById": """Retrieve the source control sync job identified by job id. @@ -144,7 +144,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -172,7 +172,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJobById', pipeline_response) @@ -189,7 +189,7 @@ def list_by_automation_account( automation_account_name: str, source_control_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SourceControlSyncJobListResult"]: """Retrieve a list of source control sync jobs. @@ -211,7 +211,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -256,7 +256,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py index ca50b6f067f3..5e2077ac0728 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py @@ -48,7 +48,7 @@ def list_by_sync_job( source_control_name: str, source_control_sync_job_id: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SourceControlSyncJobStreamsListBySyncJob"]: """Retrieve a list of sync job streams identified by sync job id. @@ -72,7 +72,7 @@ def list_by_sync_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -118,7 +118,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -136,7 +136,7 @@ async def get( source_control_name: str, source_control_sync_job_id: str, stream_id: str, - **kwargs + **kwargs: Any ) -> "_models.SourceControlSyncJobStreamById": """Retrieve a sync job stream identified by stream id. @@ -160,7 +160,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -189,7 +189,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJobStreamById', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py index 2a4fe0ae52da..edb2591aa14f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py @@ -46,7 +46,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.StatisticsListResult"]: """Retrieve the statistics for the account. @@ -66,7 +66,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py index ea440aad6497..c1f8ba7a4b1d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py @@ -46,7 +46,7 @@ async def create( automation_account_name: str, runbook_name: str, parameters: "_models.TestJobCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.TestJob": """Create a test job of the runbook. @@ -68,7 +68,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -100,7 +100,7 @@ async def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TestJob', pipeline_response) @@ -116,7 +116,7 @@ async def get( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> "_models.TestJob": """Retrieve the test job for the specified runbook. @@ -136,7 +136,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -163,7 +163,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TestJob', pipeline_response) @@ -179,7 +179,7 @@ async def resume( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> None: """Resume the test job. @@ -199,7 +199,7 @@ async def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -226,7 +226,7 @@ async def resume( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -239,7 +239,7 @@ async def stop( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> None: """Stop the test job. @@ -259,7 +259,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -286,7 +286,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -299,7 +299,7 @@ async def suspend( resource_group_name: str, automation_account_name: str, runbook_name: str, - **kwargs + **kwargs: Any ) -> None: """Suspend the test job. @@ -319,7 +319,7 @@ async def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -346,7 +346,7 @@ async def suspend( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py index 55fb84a09c42..4dd57b7306e8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py @@ -47,7 +47,7 @@ async def get( automation_account_name: str, runbook_name: str, job_stream_id: str, - **kwargs + **kwargs: Any ) -> "_models.JobStream": """Retrieve a test job stream of the test job identified by runbook name and stream id. @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -97,7 +97,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) @@ -114,7 +114,7 @@ def list_by_test_job( automation_account_name: str, runbook_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobStreamListResult"]: """Retrieve a list of test job streams identified by runbook name. @@ -136,7 +136,7 @@ def list_by_test_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" def prepare_request(next_link=None): @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py index 99ddccc83f14..38c71248d5ac 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py @@ -45,7 +45,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UsageListResult"]: """Retrieve the usage for the account id. @@ -63,7 +63,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py index b2d88278a5d9..1c92466e84c5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py @@ -47,7 +47,7 @@ async def create_or_update( automation_account_name: str, variable_name: str, parameters: "_models.VariableCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Variable": """Create a variable. @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -101,7 +101,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -122,7 +122,7 @@ async def update( automation_account_name: str, variable_name: str, parameters: "_models.VariableUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Variable": """Update a variable. @@ -144,7 +144,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -176,7 +176,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Variable', pipeline_response) @@ -192,7 +192,7 @@ async def delete( resource_group_name: str, automation_account_name: str, variable_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the variable. @@ -212,7 +212,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -239,7 +239,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -252,7 +252,7 @@ async def get( resource_group_name: str, automation_account_name: str, variable_name: str, - **kwargs + **kwargs: Any ) -> "_models.Variable": """Retrieve the variable identified by variable name. @@ -272,7 +272,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -299,7 +299,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Variable', pipeline_response) @@ -314,7 +314,7 @@ def list_by_automation_account( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VariableListResult"]: """Retrieve a list of variables. @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -374,7 +374,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py index 84c360c06ddc..f492484eae39 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py @@ -47,7 +47,7 @@ async def create_or_update( automation_account_name: str, watcher_name: str, parameters: "_models.Watcher", - **kwargs + **kwargs: Any ) -> "_models.Watcher": """Create the watcher identified by watcher name. @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -101,7 +101,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -121,7 +121,7 @@ async def get( resource_group_name: str, automation_account_name: str, watcher_name: str, - **kwargs + **kwargs: Any ) -> "_models.Watcher": """Retrieve the watcher identified by watcher name. @@ -141,7 +141,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -168,7 +168,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Watcher', pipeline_response) @@ -185,7 +185,7 @@ async def update( automation_account_name: str, watcher_name: str, parameters: "_models.WatcherUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Watcher": """Update the watcher identified by watcher name. @@ -207,7 +207,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -239,7 +239,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Watcher', pipeline_response) @@ -255,7 +255,7 @@ async def delete( resource_group_name: str, automation_account_name: str, watcher_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the watcher by name. @@ -275,7 +275,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -302,7 +302,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -315,7 +315,7 @@ async def start( resource_group_name: str, automation_account_name: str, watcher_name: str, - **kwargs + **kwargs: Any ) -> None: """Resume the watcher identified by watcher name. @@ -335,7 +335,7 @@ async def start( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -362,7 +362,7 @@ async def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -375,7 +375,7 @@ async def stop( resource_group_name: str, automation_account_name: str, watcher_name: str, - **kwargs + **kwargs: Any ) -> None: """Resume the watcher identified by watcher name. @@ -395,7 +395,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -422,7 +422,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -435,7 +435,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WatcherListResult"]: """Retrieve a list of watchers. @@ -455,7 +455,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -499,7 +499,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py index 8c7cfe5208a2..61d27c58db27 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py @@ -45,7 +45,7 @@ async def generate_uri( self, resource_group_name: str, automation_account_name: str, - **kwargs + **kwargs: Any ) -> str: """Generates a Uri for use in creating a webhook. @@ -89,7 +89,7 @@ async def generate_uri( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -105,7 +105,7 @@ async def delete( resource_group_name: str, automation_account_name: str, webhook_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the webhook by name. @@ -152,7 +152,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -165,7 +165,7 @@ async def get( resource_group_name: str, automation_account_name: str, webhook_name: str, - **kwargs + **kwargs: Any ) -> "_models.Webhook": """Retrieve the webhook identified by webhook name. @@ -212,7 +212,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Webhook', pipeline_response) @@ -229,7 +229,7 @@ async def create_or_update( automation_account_name: str, webhook_name: str, parameters: "_models.WebhookCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Webhook": """Create the webhook identified by webhook name. @@ -283,7 +283,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -304,7 +304,7 @@ async def update( automation_account_name: str, webhook_name: str, parameters: "_models.WebhookUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Webhook": """Update the webhook identified by webhook name. @@ -358,7 +358,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Webhook', pipeline_response) @@ -374,7 +374,7 @@ def list_by_automation_account( resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WebhookListResult"]: """Retrieve a list of webhooks. @@ -438,7 +438,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py index 39d1b340a56f..230921cf7d68 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py @@ -27,6 +27,7 @@ from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateListResult from ._models_py3 import CertificateUpdateParameters + from ._models_py3 import ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties from ._models_py3 import Connection from ._models_py3 import ConnectionCreateOrUpdateParameters from ._models_py3 import ConnectionListResult @@ -65,12 +66,15 @@ from ._models_py3 import DscReportError from ._models_py3 import DscReportResource from ._models_py3 import DscReportResourceNavigation + from ._models_py3 import EncryptionProperties + from ._models_py3 import EncryptionPropertiesIdentity from ._models_py3 import ErrorResponse from ._models_py3 import FieldDefinition from ._models_py3 import HybridRunbookWorker from ._models_py3 import HybridRunbookWorkerGroup from ._models_py3 import HybridRunbookWorkerGroupUpdateParameters from ._models_py3 import HybridRunbookWorkerGroupsListResult + from ._models_py3 import Identity from ._models_py3 import Job from ._models_py3 import JobCollectionItem from ._models_py3 import JobCreateParameters @@ -83,6 +87,7 @@ from ._models_py3 import JobStreamListResult from ._models_py3 import Key from ._models_py3 import KeyListResult + from ._models_py3 import KeyVaultProperties from ._models_py3 import LinkedWorkspace from ._models_py3 import LinuxProperties from ._models_py3 import Module @@ -97,6 +102,12 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateEndpointProperty + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource from ._models_py3 import PythonPackageCreateParameters from ._models_py3 import PythonPackageUpdateParameters @@ -189,6 +200,7 @@ from ._models import CertificateCreateOrUpdateParameters # type: ignore from ._models import CertificateListResult # type: ignore from ._models import CertificateUpdateParameters # type: ignore + from ._models import ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore from ._models import Connection # type: ignore from ._models import ConnectionCreateOrUpdateParameters # type: ignore from ._models import ConnectionListResult # type: ignore @@ -227,12 +239,15 @@ from ._models import DscReportError # type: ignore from ._models import DscReportResource # type: ignore from ._models import DscReportResourceNavigation # type: ignore + from ._models import EncryptionProperties # type: ignore + from ._models import EncryptionPropertiesIdentity # type: ignore from ._models import ErrorResponse # type: ignore from ._models import FieldDefinition # type: ignore from ._models import HybridRunbookWorker # type: ignore from ._models import HybridRunbookWorkerGroup # type: ignore from ._models import HybridRunbookWorkerGroupUpdateParameters # type: ignore from ._models import HybridRunbookWorkerGroupsListResult # type: ignore + from ._models import Identity # type: ignore from ._models import Job # type: ignore from ._models import JobCollectionItem # type: ignore from ._models import JobCreateParameters # type: ignore @@ -245,6 +260,7 @@ from ._models import JobStreamListResult # type: ignore from ._models import Key # type: ignore from ._models import KeyListResult # type: ignore + from ._models import KeyVaultProperties # type: ignore from ._models import LinkedWorkspace # type: ignore from ._models import LinuxProperties # type: ignore from ._models import Module # type: ignore @@ -259,6 +275,12 @@ from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateEndpointProperty # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore from ._models import PythonPackageCreateParameters # type: ignore from ._models import PythonPackageUpdateParameters # type: ignore @@ -339,6 +361,7 @@ ContentSourceType, CountType, DscConfigurationState, + EncryptionKeySourceType, GroupTypeEnum, HttpStatusCode, JobProvisioningState, @@ -348,6 +371,7 @@ ModuleProvisioningState, OperatingSystemType, ProvisioningState, + ResourceIdentityType, RunbookState, RunbookTypeEnum, ScheduleDay, @@ -382,6 +406,7 @@ 'CertificateCreateOrUpdateParameters', 'CertificateListResult', 'CertificateUpdateParameters', + 'ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties', 'Connection', 'ConnectionCreateOrUpdateParameters', 'ConnectionListResult', @@ -420,12 +445,15 @@ 'DscReportError', 'DscReportResource', 'DscReportResourceNavigation', + 'EncryptionProperties', + 'EncryptionPropertiesIdentity', 'ErrorResponse', 'FieldDefinition', 'HybridRunbookWorker', 'HybridRunbookWorkerGroup', 'HybridRunbookWorkerGroupUpdateParameters', 'HybridRunbookWorkerGroupsListResult', + 'Identity', 'Job', 'JobCollectionItem', 'JobCreateParameters', @@ -438,6 +466,7 @@ 'JobStreamListResult', 'Key', 'KeyListResult', + 'KeyVaultProperties', 'LinkedWorkspace', 'LinuxProperties', 'Module', @@ -452,6 +481,12 @@ 'Operation', 'OperationDisplay', 'OperationListResult', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointProperty', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'PythonPackageCreateParameters', 'PythonPackageUpdateParameters', @@ -530,6 +565,7 @@ 'ContentSourceType', 'CountType', 'DscConfigurationState', + 'EncryptionKeySourceType', 'GroupTypeEnum', 'HttpStatusCode', 'JobProvisioningState', @@ -539,6 +575,7 @@ 'ModuleProvisioningState', 'OperatingSystemType', 'ProvisioningState', + 'ResourceIdentityType', 'RunbookState', 'RunbookTypeEnum', 'ScheduleDay', diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py index 2308a221239d..9c5ceca09c3d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py @@ -75,6 +75,13 @@ class DscConfigurationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) EDIT = "Edit" PUBLISHED = "Published" +class EncryptionKeySourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Encryption Key Source + """ + + MICROSOFT_AUTOMATION = "Microsoft.Automation" + MICROSOFT_KEYVAULT = "Microsoft.Keyvault" + class GroupTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the HybridWorkerGroup. """ @@ -216,6 +223,15 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FAILED = "Failed" RUNNING = "Running" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The identity type. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + class RunbookState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets the state of the runbook. """ @@ -257,7 +273,8 @@ class ScheduleFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): HOUR = "Hour" WEEK = "Week" MONTH = "Month" - MINUTE = "Minute" #: The minimum allowed interval for Minute schedules is 15 minutes. + #: The minimum allowed interval for Minute schedules is 15 minutes. + MINUTE = "Minute" class SkuNameEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets the SKU name of the account. diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models.py index aac6ffa75c5f..77700ba615a5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models.py @@ -442,6 +442,8 @@ class AutomationAccount(TrackedResource): :type location: str :param etag: Gets or sets the etag of the resource. :type etag: str + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.automation.models.Identity :param sku: Gets or sets the SKU of account. :type sku: ~azure.mgmt.automation.models.Sku :param last_modified_by: Gets or sets the last modified by. @@ -454,6 +456,15 @@ class AutomationAccount(TrackedResource): :vartype last_modified_time: ~datetime.datetime :param description: Gets or sets the description. :type description: str + :param encryption: Encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param private_endpoint_connections: List of Automation operations supported by the Automation + resource provider. + :type private_endpoint_connections: + list[~azure.mgmt.automation.models.PrivateEndpointConnection] + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _validation = { @@ -472,12 +483,16 @@ class AutomationAccount(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -486,12 +501,16 @@ def __init__( ): super(AutomationAccount, self).__init__(**kwargs) self.etag = kwargs.get('etag', None) + self.identity = kwargs.get('identity', None) self.sku = kwargs.get('sku', None) self.last_modified_by = kwargs.get('last_modified_by', None) self.state = None self.creation_time = None self.last_modified_time = None self.description = kwargs.get('description', None) + self.encryption = kwargs.get('encryption', None) + self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.public_network_access = kwargs.get('public_network_access', None) class AutomationAccountCreateOrUpdateParameters(msrest.serialization.Model): @@ -501,17 +520,27 @@ class AutomationAccountCreateOrUpdateParameters(msrest.serialization.Model): :type name: str :param location: Gets or sets the location of the resource. :type location: str + :param identity: Sets the identity property for automation account. + :type identity: ~azure.mgmt.automation.models.Identity :param tags: A set of tags. Gets or sets the tags attached to the resource. :type tags: dict[str, str] :param sku: Gets or sets account SKU. :type sku: ~azure.mgmt.automation.models.Sku + :param encryption: Set the encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -521,8 +550,11 @@ def __init__( super(AutomationAccountCreateOrUpdateParameters, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) + self.encryption = kwargs.get('encryption', None) + self.public_network_access = kwargs.get('public_network_access', None) class AutomationAccountListResult(msrest.serialization.Model): @@ -555,17 +587,27 @@ class AutomationAccountUpdateParameters(msrest.serialization.Model): :type name: str :param location: Gets or sets the location of the resource. :type location: str + :param identity: Sets the identity property for automation account. + :type identity: ~azure.mgmt.automation.models.Identity :param tags: A set of tags. Gets or sets the tags attached to the resource. :type tags: dict[str, str] :param sku: Gets or sets account SKU. :type sku: ~azure.mgmt.automation.models.Sku + :param encryption: Set the encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -575,8 +617,11 @@ def __init__( super(AutomationAccountUpdateParameters, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) + self.encryption = kwargs.get('encryption', None) + self.public_network_access = kwargs.get('public_network_access', None) class AzureQueryProperties(msrest.serialization.Model): @@ -606,7 +651,39 @@ def __init__( self.tag_settings = kwargs.get('tag_settings', None) -class Certificate(Resource): +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _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'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class Certificate(ProxyResource): """Definition of the certificate. Variables are only populated by the server, and will be ignored when sending a request. @@ -755,7 +832,37 @@ def __init__( self.description = kwargs.get('description', None) -class Connection(Resource): +class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class Connection(ProxyResource): """Definition of the connection. Variables are only populated by the server, and will be ignored when sending a request. @@ -1120,7 +1227,7 @@ def __init__( self.version = kwargs.get('version', None) -class Credential(Resource): +class Credential(ProxyResource): """Definition of the credential. Variables are only populated by the server, and will be ignored when sending a request. @@ -1264,7 +1371,7 @@ def __init__( self.description = kwargs.get('description', None) -class DscCompilationJob(Resource): +class DscCompilationJob(ProxyResource): """Definition of the Dsc Compilation job. Variables are only populated by the server, and will be ignored when sending a request. @@ -1450,9 +1557,9 @@ class DscConfiguration(TrackedResource): :type location: str :param etag: Gets or sets the etag of the resource. :type etag: str - :ivar provisioning_state: Gets or sets the provisioning state of the configuration. Default - value: "Succeeded". - :vartype provisioning_state: str + :param provisioning_state: Gets or sets the provisioning state of the configuration. The only + acceptable values to pass in are None and "Succeeded". The default value is None. + :type provisioning_state: str :param job_count: Gets or sets the job count of the configuration. :type job_count: int :param parameters: Gets or sets the configuration parameters. @@ -1478,7 +1585,6 @@ class DscConfiguration(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -1500,14 +1606,13 @@ class DscConfiguration(TrackedResource): 'description': {'key': 'properties.description', 'type': 'str'}, } - provisioning_state = "Succeeded" - def __init__( self, **kwargs ): super(DscConfiguration, self).__init__(**kwargs) self.etag = kwargs.get('etag', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.job_count = kwargs.get('job_count', None) self.parameters = kwargs.get('parameters', None) self.source = kwargs.get('source', None) @@ -1740,7 +1845,7 @@ def __init__( self.allow_module_overwrite = kwargs.get('allow_module_overwrite', None) -class DscNode(Resource): +class DscNode(ProxyResource): """Definition of a DscNode. Variables are only populated by the server, and will be ignored when sending a request. @@ -1814,7 +1919,7 @@ def __init__( self.name_properties_node_configuration_name = kwargs.get('name_properties_node_configuration_name', None) -class DscNodeConfiguration(Resource): +class DscNodeConfiguration(ProxyResource): """Definition of the dsc node configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -2255,6 +2360,55 @@ def __init__( self.resource_id = kwargs.get('resource_id', None) +class EncryptionProperties(msrest.serialization.Model): + """The encryption settings for automation account. + + :param key_vault_properties: Key vault properties. + :type key_vault_properties: ~azure.mgmt.automation.models.KeyVaultProperties + :param key_source: Encryption Key Source. Possible values include: "Microsoft.Automation", + "Microsoft.Keyvault". + :type key_source: str or ~azure.mgmt.automation.models.EncryptionKeySourceType + :param identity: User identity used for CMK. + :type identity: ~azure.mgmt.automation.models.EncryptionPropertiesIdentity + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'EncryptionPropertiesIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionProperties, self).__init__(**kwargs) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + self.key_source = kwargs.get('key_source', None) + self.identity = kwargs.get('identity', None) + + +class EncryptionPropertiesIdentity(msrest.serialization.Model): + """User identity used for CMK. + + :param user_assigned_identity: The user identity used for CMK. It will be an ARM resource id in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identity: any + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionPropertiesIdentity, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + + class ErrorResponse(msrest.serialization.Model): """Error response of an operation failure. @@ -2419,7 +2573,49 @@ def __init__( self.credential = kwargs.get('credential', None) -class Job(Resource): +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.automation.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with the resource. The + user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.automation.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class Job(ProxyResource): """Definition of the job. Variables are only populated by the server, and will be ignored when sending a request. @@ -2511,7 +2707,7 @@ def __init__( self.provisioning_state = kwargs.get('provisioning_state', None) -class JobCollectionItem(Resource): +class JobCollectionItem(ProxyResource): """Job collection item properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -2804,7 +3000,7 @@ class JobStream(msrest.serialization.Model): :param summary: Gets or sets the summary. :type summary: str :param value: Gets or sets the values of the job stream. - :type value: dict[str, object] + :type value: dict[str, any] """ _attribute_map = { @@ -2908,6 +3104,33 @@ def __init__( self.keys = kwargs.get('keys', None) +class KeyVaultProperties(msrest.serialization.Model): + """Settings concerning key vault encryption for a configuration store. + + :param keyvault_uri: The URI of the key vault key used to encrypt data. + :type keyvault_uri: str + :param key_name: The name of key used to encrypt data. + :type key_name: str + :param key_version: The key version of the key used to encrypt data. + :type key_version: str + """ + + _attribute_map = { + 'keyvault_uri': {'key': 'keyvaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.keyvault_uri = kwargs.get('keyvault_uri', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + class LinkedWorkspace(msrest.serialization.Model): """Definition of the linked workspace. @@ -3326,8 +3549,8 @@ def __init__( self.value = kwargs.get('value', None) -class ProxyResource(Resource): - """ARM proxy resource. +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. Variables are only populated by the server, and will be ignored when sending a request. @@ -3337,6 +3560,12 @@ class ProxyResource(Resource): :vartype name: str :ivar type: The type of the resource. :vartype type: str + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: ~azure.mgmt.automation.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection State of the Private Endpoint + Connection. + :type private_link_service_connection_state: + ~azure.mgmt.automation.models.PrivateLinkServiceConnectionStateProperty """ _validation = { @@ -3349,13 +3578,150 @@ class ProxyResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, } def __init__( self, **kwargs ): - super(ProxyResource, self).__init__(**kwargs) + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.automation.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + :param id: Resource id of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.automation.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """Connection State of the Private Endpoint Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ + disconnect). + :vartype actions_required: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None class PythonPackageCreateParameters(msrest.serialization.Model): @@ -3464,9 +3830,9 @@ class Runbook(TrackedResource): :type output_types: list[str] :param draft: Gets or sets the draft runbook properties. :type draft: ~azure.mgmt.automation.models.RunbookDraft - :ivar provisioning_state: Gets or sets the provisioning state of the runbook. Default value: - "Succeeded". - :vartype provisioning_state: str + :param provisioning_state: Gets or sets the provisioning state of the runbook. The only + acceptable values to pass in are None and "Succeeded". The default value is None. + :type provisioning_state: str :param last_modified_by: Gets or sets the last modified by. :type last_modified_by: str :param creation_time: Gets or sets the creation time. @@ -3481,7 +3847,6 @@ class Runbook(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3508,8 +3873,6 @@ class Runbook(TrackedResource): 'description': {'key': 'properties.description', 'type': 'str'}, } - provisioning_state = "Succeeded" - def __init__( self, **kwargs @@ -3526,6 +3889,7 @@ def __init__( self.parameters = kwargs.get('parameters', None) self.output_types = kwargs.get('output_types', None) self.draft = kwargs.get('draft', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.last_modified_by = kwargs.get('last_modified_by', None) self.creation_time = kwargs.get('creation_time', None) self.last_modified_time = kwargs.get('last_modified_time', None) @@ -3857,7 +4221,7 @@ def __init__( self.log_activity_trace = kwargs.get('log_activity_trace', None) -class Schedule(Resource): +class Schedule(ProxyResource): """Definition of the schedule. Variables are only populated by the server, and will be ignored when sending a request. @@ -3883,7 +4247,7 @@ class Schedule(Resource): :param next_run_offset_minutes: Gets or sets the next run time's offset in minutes. :type next_run_offset_minutes: float :param interval: Gets or sets the interval of the schedule. - :type interval: object + :type interval: any :param frequency: Gets or sets the frequency of the schedule. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency @@ -3980,7 +4344,7 @@ class ScheduleCreateOrUpdateParameters(msrest.serialization.Model): :param expiry_time: Gets or sets the end time of the schedule. :type expiry_time: ~datetime.datetime :param interval: Gets or sets the interval of the schedule. - :type interval: object + :type interval: any :param frequency: Required. Gets or sets the frequency of the schedule. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency @@ -4598,7 +4962,7 @@ def __init__( self.post_task = kwargs.get('post_task', None) -class SourceControl(Resource): +class SourceControl(ProxyResource): """Definition of the source control. Variables are only populated by the server, and will be ignored when sending a request. @@ -5010,7 +5374,7 @@ class SourceControlSyncJobStreamById(msrest.serialization.Model): :param stream_text: The text of the sync job stream. :type stream_text: str :param value: The values of the job stream. - :type value: dict[str, object] + :type value: dict[str, any] """ _validation = { @@ -5608,7 +5972,7 @@ def __init__( self.value = kwargs.get('value', None) -class Variable(Resource): +class Variable(ProxyResource): """Definition of the variable. Variables are only populated by the server, and will be ignored when sending a request. @@ -5880,7 +6244,7 @@ def __init__( self.execution_frequency_in_seconds = kwargs.get('execution_frequency_in_seconds', None) -class Webhook(Resource): +class Webhook(ProxyResource): """Definition of the webhook type. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py index 7fbb522912f4..fc88fce5b1d3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/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 @@ -497,6 +497,8 @@ class AutomationAccount(TrackedResource): :type location: str :param etag: Gets or sets the etag of the resource. :type etag: str + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.automation.models.Identity :param sku: Gets or sets the SKU of account. :type sku: ~azure.mgmt.automation.models.Sku :param last_modified_by: Gets or sets the last modified by. @@ -509,6 +511,15 @@ class AutomationAccount(TrackedResource): :vartype last_modified_time: ~datetime.datetime :param description: Gets or sets the description. :type description: str + :param encryption: Encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param private_endpoint_connections: List of Automation operations supported by the Automation + resource provider. + :type private_endpoint_connections: + list[~azure.mgmt.automation.models.PrivateEndpointConnection] + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _validation = { @@ -527,12 +538,16 @@ class AutomationAccount(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -541,19 +556,27 @@ def __init__( tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, etag: Optional[str] = None, + identity: Optional["Identity"] = None, sku: Optional["Sku"] = None, last_modified_by: Optional[str] = None, description: Optional[str] = None, + encryption: Optional["EncryptionProperties"] = None, + private_endpoint_connections: Optional[List["PrivateEndpointConnection"]] = None, + public_network_access: Optional[bool] = None, **kwargs ): super(AutomationAccount, self).__init__(tags=tags, location=location, **kwargs) self.etag = etag + self.identity = identity self.sku = sku self.last_modified_by = last_modified_by self.state = None self.creation_time = None self.last_modified_time = None self.description = description + self.encryption = encryption + self.private_endpoint_connections = private_endpoint_connections + self.public_network_access = public_network_access class AutomationAccountCreateOrUpdateParameters(msrest.serialization.Model): @@ -563,17 +586,27 @@ class AutomationAccountCreateOrUpdateParameters(msrest.serialization.Model): :type name: str :param location: Gets or sets the location of the resource. :type location: str + :param identity: Sets the identity property for automation account. + :type identity: ~azure.mgmt.automation.models.Identity :param tags: A set of tags. Gets or sets the tags attached to the resource. :type tags: dict[str, str] :param sku: Gets or sets account SKU. :type sku: ~azure.mgmt.automation.models.Sku + :param encryption: Set the encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -581,15 +614,21 @@ def __init__( *, name: Optional[str] = None, location: Optional[str] = None, + identity: Optional["Identity"] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["Sku"] = None, + encryption: Optional["EncryptionProperties"] = None, + public_network_access: Optional[bool] = None, **kwargs ): super(AutomationAccountCreateOrUpdateParameters, self).__init__(**kwargs) self.name = name self.location = location + self.identity = identity self.tags = tags self.sku = sku + self.encryption = encryption + self.public_network_access = public_network_access class AutomationAccountListResult(msrest.serialization.Model): @@ -625,17 +664,27 @@ class AutomationAccountUpdateParameters(msrest.serialization.Model): :type name: str :param location: Gets or sets the location of the resource. :type location: str + :param identity: Sets the identity property for automation account. + :type identity: ~azure.mgmt.automation.models.Identity :param tags: A set of tags. Gets or sets the tags attached to the resource. :type tags: dict[str, str] :param sku: Gets or sets account SKU. :type sku: ~azure.mgmt.automation.models.Sku + :param encryption: Set the encryption properties for the automation account. + :type encryption: ~azure.mgmt.automation.models.EncryptionProperties + :param public_network_access: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) + is allowed from the public internet. + :type public_network_access: bool """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'bool'}, } def __init__( @@ -643,15 +692,21 @@ def __init__( *, name: Optional[str] = None, location: Optional[str] = None, + identity: Optional["Identity"] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["Sku"] = None, + encryption: Optional["EncryptionProperties"] = None, + public_network_access: Optional[bool] = None, **kwargs ): super(AutomationAccountUpdateParameters, self).__init__(**kwargs) self.name = name self.location = location + self.identity = identity self.tags = tags self.sku = sku + self.encryption = encryption + self.public_network_access = public_network_access class AzureQueryProperties(msrest.serialization.Model): @@ -685,7 +740,39 @@ def __init__( self.tag_settings = tag_settings -class Certificate(Resource): +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _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'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class Certificate(ProxyResource): """Definition of the certificate. Variables are only populated by the server, and will be ignored when sending a request. @@ -848,7 +935,37 @@ def __init__( self.description = description -class Connection(Resource): +class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class Connection(ProxyResource): """Definition of the connection. Variables are only populated by the server, and will be ignored when sending a request. @@ -1253,7 +1370,7 @@ def __init__( self.version = version -class Credential(Resource): +class Credential(ProxyResource): """Definition of the credential. Variables are only populated by the server, and will be ignored when sending a request. @@ -1412,7 +1529,7 @@ def __init__( self.description = description -class DscCompilationJob(Resource): +class DscCompilationJob(ProxyResource): """Definition of the Dsc Compilation job. Variables are only populated by the server, and will be ignored when sending a request. @@ -1615,9 +1732,9 @@ class DscConfiguration(TrackedResource): :type location: str :param etag: Gets or sets the etag of the resource. :type etag: str - :ivar provisioning_state: Gets or sets the provisioning state of the configuration. Default - value: "Succeeded". - :vartype provisioning_state: str + :param provisioning_state: Gets or sets the provisioning state of the configuration. The only + acceptable values to pass in are None and "Succeeded". The default value is None. + :type provisioning_state: str :param job_count: Gets or sets the job count of the configuration. :type job_count: int :param parameters: Gets or sets the configuration parameters. @@ -1643,7 +1760,6 @@ class DscConfiguration(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -1665,14 +1781,13 @@ class DscConfiguration(TrackedResource): 'description': {'key': 'properties.description', 'type': 'str'}, } - provisioning_state = "Succeeded" - def __init__( self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, etag: Optional[str] = None, + provisioning_state: Optional[str] = None, job_count: Optional[int] = None, parameters: Optional[Dict[str, "DscConfigurationParameter"]] = None, source: Optional["ContentSource"] = None, @@ -1686,6 +1801,7 @@ def __init__( ): super(DscConfiguration, self).__init__(tags=tags, location=location, **kwargs) self.etag = etag + self.provisioning_state = provisioning_state self.job_count = job_count self.parameters = parameters self.source = source @@ -1954,7 +2070,7 @@ def __init__( self.allow_module_overwrite = allow_module_overwrite -class DscNode(Resource): +class DscNode(ProxyResource): """Definition of a DscNode. Variables are only populated by the server, and will be ignored when sending a request. @@ -2039,7 +2155,7 @@ def __init__( self.name_properties_node_configuration_name = name_properties_node_configuration_name -class DscNodeConfiguration(Resource): +class DscNodeConfiguration(ProxyResource): """Definition of the dsc node configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -2552,6 +2668,61 @@ def __init__( self.resource_id = resource_id +class EncryptionProperties(msrest.serialization.Model): + """The encryption settings for automation account. + + :param key_vault_properties: Key vault properties. + :type key_vault_properties: ~azure.mgmt.automation.models.KeyVaultProperties + :param key_source: Encryption Key Source. Possible values include: "Microsoft.Automation", + "Microsoft.Keyvault". + :type key_source: str or ~azure.mgmt.automation.models.EncryptionKeySourceType + :param identity: User identity used for CMK. + :type identity: ~azure.mgmt.automation.models.EncryptionPropertiesIdentity + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'EncryptionPropertiesIdentity'}, + } + + def __init__( + self, + *, + key_vault_properties: Optional["KeyVaultProperties"] = None, + key_source: Optional[Union[str, "EncryptionKeySourceType"]] = None, + identity: Optional["EncryptionPropertiesIdentity"] = None, + **kwargs + ): + super(EncryptionProperties, self).__init__(**kwargs) + self.key_vault_properties = key_vault_properties + self.key_source = key_source + self.identity = identity + + +class EncryptionPropertiesIdentity(msrest.serialization.Model): + """User identity used for CMK. + + :param user_assigned_identity: The user identity used for CMK. It will be an ARM resource id in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identity: any + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'object'}, + } + + def __init__( + self, + *, + user_assigned_identity: Optional[Any] = None, + **kwargs + ): + super(EncryptionPropertiesIdentity, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + + class ErrorResponse(msrest.serialization.Model): """Error response of an operation failure. @@ -2739,7 +2910,52 @@ def __init__( self.credential = credential -class Job(Resource): +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.automation.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with the resource. The + user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.automation.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class Job(ProxyResource): """Definition of the job. Variables are only populated by the server, and will be ignored when sending a request. @@ -2846,7 +3062,7 @@ def __init__( self.provisioning_state = provisioning_state -class JobCollectionItem(Resource): +class JobCollectionItem(ProxyResource): """Job collection item properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -3161,7 +3377,7 @@ class JobStream(msrest.serialization.Model): :param summary: Gets or sets the summary. :type summary: str :param value: Gets or sets the values of the job stream. - :type value: dict[str, object] + :type value: dict[str, any] """ _attribute_map = { @@ -3183,7 +3399,7 @@ def __init__( stream_type: Optional[Union[str, "JobStreamType"]] = None, stream_text: Optional[str] = None, summary: Optional[str] = None, - value: Optional[Dict[str, object]] = None, + value: Optional[Dict[str, Any]] = None, **kwargs ): super(JobStream, self).__init__(**kwargs) @@ -3278,6 +3494,37 @@ def __init__( self.keys = keys +class KeyVaultProperties(msrest.serialization.Model): + """Settings concerning key vault encryption for a configuration store. + + :param keyvault_uri: The URI of the key vault key used to encrypt data. + :type keyvault_uri: str + :param key_name: The name of key used to encrypt data. + :type key_name: str + :param key_version: The key version of the key used to encrypt data. + :type key_version: str + """ + + _attribute_map = { + 'keyvault_uri': {'key': 'keyvaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + keyvault_uri: Optional[str] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.keyvault_uri = keyvault_uri + self.key_name = key_name + self.key_version = key_version + + class LinkedWorkspace(msrest.serialization.Model): """Definition of the linked workspace. @@ -3752,8 +3999,8 @@ def __init__( self.value = value -class ProxyResource(Resource): - """ARM proxy resource. +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. Variables are only populated by the server, and will be ignored when sending a request. @@ -3763,6 +4010,12 @@ class ProxyResource(Resource): :vartype name: str :ivar type: The type of the resource. :vartype type: str + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: ~azure.mgmt.automation.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection State of the Private Endpoint + Connection. + :type private_link_service_connection_state: + ~azure.mgmt.automation.models.PrivateLinkServiceConnectionStateProperty """ _validation = { @@ -3775,13 +4028,162 @@ class ProxyResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, } def __init__( self, + *, + private_endpoint: Optional["PrivateEndpointProperty"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, **kwargs ): - super(ProxyResource, self).__init__(**kwargs) + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.automation.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + :param id: Resource id of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = id + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.automation.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """Connection State of the Private Endpoint Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ + disconnect). + :vartype actions_required: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None class PythonPackageCreateParameters(msrest.serialization.Model): @@ -3897,9 +4299,9 @@ class Runbook(TrackedResource): :type output_types: list[str] :param draft: Gets or sets the draft runbook properties. :type draft: ~azure.mgmt.automation.models.RunbookDraft - :ivar provisioning_state: Gets or sets the provisioning state of the runbook. Default value: - "Succeeded". - :vartype provisioning_state: str + :param provisioning_state: Gets or sets the provisioning state of the runbook. The only + acceptable values to pass in are None and "Succeeded". The default value is None. + :type provisioning_state: str :param last_modified_by: Gets or sets the last modified by. :type last_modified_by: str :param creation_time: Gets or sets the creation time. @@ -3914,7 +4316,6 @@ class Runbook(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3941,8 +4342,6 @@ class Runbook(TrackedResource): 'description': {'key': 'properties.description', 'type': 'str'}, } - provisioning_state = "Succeeded" - def __init__( self, *, @@ -3959,6 +4358,7 @@ def __init__( parameters: Optional[Dict[str, "RunbookParameter"]] = None, output_types: Optional[List[str]] = None, draft: Optional["RunbookDraft"] = None, + provisioning_state: Optional[str] = None, last_modified_by: Optional[str] = None, creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, @@ -3977,6 +4377,7 @@ def __init__( self.parameters = parameters self.output_types = output_types self.draft = draft + self.provisioning_state = provisioning_state self.last_modified_by = last_modified_by self.creation_time = creation_time self.last_modified_time = last_modified_time @@ -4356,7 +4757,7 @@ def __init__( self.log_activity_trace = log_activity_trace -class Schedule(Resource): +class Schedule(ProxyResource): """Definition of the schedule. Variables are only populated by the server, and will be ignored when sending a request. @@ -4382,7 +4783,7 @@ class Schedule(Resource): :param next_run_offset_minutes: Gets or sets the next run time's offset in minutes. :type next_run_offset_minutes: float :param interval: Gets or sets the interval of the schedule. - :type interval: object + :type interval: any :param frequency: Gets or sets the frequency of the schedule. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency @@ -4434,7 +4835,7 @@ def __init__( is_enabled: Optional[bool] = False, next_run: Optional[datetime.datetime] = None, next_run_offset_minutes: Optional[float] = None, - interval: Optional[object] = None, + interval: Optional[Any] = None, frequency: Optional[Union[str, "ScheduleFrequency"]] = None, time_zone: Optional[str] = None, advanced_schedule: Optional["AdvancedSchedule"] = None, @@ -4495,7 +4896,7 @@ class ScheduleCreateOrUpdateParameters(msrest.serialization.Model): :param expiry_time: Gets or sets the end time of the schedule. :type expiry_time: ~datetime.datetime :param interval: Gets or sets the interval of the schedule. - :type interval: object + :type interval: any :param frequency: Required. Gets or sets the frequency of the schedule. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency @@ -4530,7 +4931,7 @@ def __init__( frequency: Union[str, "ScheduleFrequency"], description: Optional[str] = None, expiry_time: Optional[datetime.datetime] = None, - interval: Optional[object] = None, + interval: Optional[Any] = None, time_zone: Optional[str] = None, advanced_schedule: Optional["AdvancedSchedule"] = None, **kwargs @@ -5169,7 +5570,7 @@ def __init__( self.post_task = post_task -class SourceControl(Resource): +class SourceControl(ProxyResource): """Definition of the source control. Variables are only populated by the server, and will be ignored when sending a request. @@ -5626,7 +6027,7 @@ class SourceControlSyncJobStreamById(msrest.serialization.Model): :param stream_text: The text of the sync job stream. :type stream_text: str :param value: The values of the job stream. - :type value: dict[str, object] + :type value: dict[str, any] """ _validation = { @@ -5651,7 +6052,7 @@ def __init__( summary: Optional[str] = None, stream_type: Optional[Union[str, "StreamType"]] = None, stream_text: Optional[str] = None, - value: Optional[Dict[str, object]] = None, + value: Optional[Dict[str, Any]] = None, **kwargs ): super(SourceControlSyncJobStreamById, self).__init__(**kwargs) @@ -6304,7 +6705,7 @@ def __init__( self.value = value -class Variable(Resource): +class Variable(ProxyResource): """Definition of the variable. Variables are only populated by the server, and will be ignored when sending a request. @@ -6609,7 +7010,7 @@ def __init__( self.execution_frequency_in_seconds = execution_frequency_in_seconds -class Webhook(Resource): +class Webhook(ProxyResource): """Definition of the webhook type. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py index d7371312a9c8..18a3b687ef48 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py @@ -6,25 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._runbook_draft_operations import RunbookDraftOperations -from ._runbook_operations import RunbookOperations -from ._test_job_streams_operations import TestJobStreamsOperations -from ._test_job_operations import TestJobOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._python2_package_operations import Python2PackageOperations from ._agent_registration_information_operations import AgentRegistrationInformationOperations from ._dsc_node_operations import DscNodeOperations from ._node_reports_operations import NodeReportsOperations +from ._dsc_node_configuration_operations import DscNodeConfigurationOperations from ._dsc_compilation_job_operations import DscCompilationJobOperations from ._dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations -from ._dsc_node_configuration_operations import DscNodeConfigurationOperations from ._node_count_information_operations import NodeCountInformationOperations -from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations -from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations from ._source_control_operations import SourceControlOperations from ._source_control_sync_job_operations import SourceControlSyncJobOperations from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations -from ._job_operations import JobOperations -from ._job_stream_operations import JobStreamOperations from ._automation_account_operations import AutomationAccountOperations from ._statistics_operations import StatisticsOperations from ._usages_operations import UsagesOperations @@ -33,8 +27,6 @@ from ._connection_operations import ConnectionOperations from ._connection_type_operations import ConnectionTypeOperations from ._credential_operations import CredentialOperations -from ._dsc_configuration_operations import DscConfigurationOperations -from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations from ._job_schedule_operations import JobScheduleOperations from ._linked_workspace_operations import LinkedWorkspaceOperations @@ -42,32 +34,36 @@ from ._module_operations import ModuleOperations from ._object_data_types_operations import ObjectDataTypesOperations from ._fields_operations import FieldsOperations -from ._operations import Operations from ._schedule_operations import ScheduleOperations from ._variable_operations import VariableOperations from ._watcher_operations import WatcherOperations +from ._dsc_configuration_operations import DscConfigurationOperations +from ._job_operations import JobOperations +from ._job_stream_operations import JobStreamOperations +from ._operations import Operations +from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations +from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations +from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations +from ._runbook_draft_operations import RunbookDraftOperations +from ._runbook_operations import RunbookOperations +from ._test_job_streams_operations import TestJobStreamsOperations +from ._test_job_operations import TestJobOperations from ._webhook_operations import WebhookOperations __all__ = [ - 'RunbookDraftOperations', - 'RunbookOperations', - 'TestJobStreamsOperations', - 'TestJobOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', 'Python2PackageOperations', 'AgentRegistrationInformationOperations', 'DscNodeOperations', 'NodeReportsOperations', + 'DscNodeConfigurationOperations', 'DscCompilationJobOperations', 'DscCompilationJobStreamOperations', - 'DscNodeConfigurationOperations', 'NodeCountInformationOperations', - 'SoftwareUpdateConfigurationRunsOperations', - 'SoftwareUpdateConfigurationMachineRunsOperations', 'SourceControlOperations', 'SourceControlSyncJobOperations', 'SourceControlSyncJobStreamsOperations', - 'JobOperations', - 'JobStreamOperations', 'AutomationAccountOperations', 'StatisticsOperations', 'UsagesOperations', @@ -76,8 +72,6 @@ 'ConnectionOperations', 'ConnectionTypeOperations', 'CredentialOperations', - 'DscConfigurationOperations', - 'SoftwareUpdateConfigurationsOperations', 'HybridRunbookWorkerGroupOperations', 'JobScheduleOperations', 'LinkedWorkspaceOperations', @@ -85,9 +79,19 @@ 'ModuleOperations', 'ObjectDataTypesOperations', 'FieldsOperations', - 'Operations', 'ScheduleOperations', 'VariableOperations', 'WatcherOperations', + 'DscConfigurationOperations', + 'JobOperations', + 'JobStreamOperations', + 'Operations', + 'SoftwareUpdateConfigurationsOperations', + 'SoftwareUpdateConfigurationRunsOperations', + 'SoftwareUpdateConfigurationMachineRunsOperations', + 'RunbookDraftOperations', + 'RunbookOperations', + 'TestJobStreamsOperations', + 'TestJobOperations', 'WebhookOperations', ] diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py index b0fade70343f..c9c82deebc3b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -102,7 +102,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Activity', pipeline_response) @@ -139,7 +139,7 @@ def list_by_module( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -182,7 +182,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py index 8424b6318383..516d30d7d5e9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py @@ -67,7 +67,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AgentRegistration', pipeline_response) @@ -130,7 +130,7 @@ def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -161,7 +161,7 @@ def regenerate_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AgentRegistration', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py index e1f427427c47..66b877c33e0e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py @@ -71,7 +71,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -102,7 +102,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutomationAccount', pipeline_response) @@ -139,7 +139,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -170,7 +170,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -208,7 +208,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -234,7 +234,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -265,7 +265,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -291,7 +291,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutomationAccount', pipeline_response) @@ -322,7 +322,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -363,7 +363,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -393,7 +393,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -433,7 +433,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py index 9387b3b3e469..c18bcb415f0b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py index cb6d8fd83ae7..3e2f475c8174 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Connection', pipeline_response) @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Connection', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py index 51e8e25f5b37..ccfe5abc2133 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionType', pipeline_response) @@ -200,7 +200,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -232,7 +232,7 @@ def create_or_update( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionType', pipeline_response) @@ -266,7 +266,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -308,7 +308,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py index 46682979714b..136c77df2d4b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Credential', pipeline_response) @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Credential', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py index 753e49c664b7..b9ba804b8ad5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py @@ -61,7 +61,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -93,7 +93,7 @@ def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscCompilationJob', pipeline_response) @@ -125,8 +125,8 @@ def begin_create( :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters :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 DscCompilationJob or the result of cls(response) @@ -207,7 +207,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -234,7 +234,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscCompilationJob', pipeline_response) @@ -271,7 +271,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -315,7 +315,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -355,7 +355,7 @@ def get_stream( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -383,7 +383,7 @@ def get_stream( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py index 1726272bfbda..04352c6287ef 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py @@ -70,7 +70,7 @@ def list_by_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -97,7 +97,7 @@ def list_by_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStreamListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py index 48af11730a06..203f02656e9d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscConfiguration', pipeline_response) @@ -242,7 +242,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -313,7 +313,10 @@ def update( body_content_kwargs = {} # type: Dict[str, Any] if header_parameters['Content-Type'].split(";")[0] in ['text/plain']: - body_content = self._serialize.body(parameters, 'str') + if parameters is not None: + body_content = self._serialize.body(parameters, 'str') + else: + body_content = None body_content_kwargs['content'] = body_content elif header_parameters['Content-Type'].split(";")[0] in ['application/json']: if parameters is not None: @@ -332,7 +335,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscConfiguration', pipeline_response) @@ -491,7 +494,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py index 45317cc8dfce..dc128371da83 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py @@ -73,7 +73,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -100,7 +100,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -134,7 +134,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -161,7 +161,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNodeConfiguration', pipeline_response) @@ -186,7 +186,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +218,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -252,8 +252,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters :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 None or the result of cls(response) @@ -343,7 +343,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -393,7 +393,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py index 49866da11b67..79b4676eabf8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNode', pipeline_response) @@ -199,7 +199,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNode', pipeline_response) @@ -277,7 +277,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -327,7 +327,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py index f1a689f580b7..724d6678ae41 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py @@ -74,7 +74,7 @@ def list_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -118,7 +118,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py index 63abed20de87..f2dc8863d8f9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridRunbookWorkerGroup', pipeline_response) @@ -199,7 +199,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridRunbookWorkerGroup', pipeline_response) @@ -268,7 +268,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -312,7 +312,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py index 2afce74497f4..3ad3d6a56c7e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py @@ -239,7 +239,7 @@ def suspend( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -305,7 +305,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -371,7 +371,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Job', pipeline_response) @@ -448,7 +448,7 @@ def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Job', pipeline_response) @@ -534,7 +534,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -603,7 +603,7 @@ def resume( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py index d01e390ea63d..ef418b2cf469 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobSchedule', pipeline_response) @@ -199,7 +199,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobSchedule', pipeline_response) @@ -268,7 +268,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -312,7 +312,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py index 4db34971e8ba..1b7654abe818 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py @@ -107,7 +107,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) @@ -197,7 +197,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py index 247cd84ff235..8c24cff43cb0 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py @@ -67,7 +67,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def list_by_automation_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py index ba38f637ec4f..a3d4e042934a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py @@ -67,7 +67,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -93,7 +93,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LinkedWorkspace', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py index ccdfd980714a..c45b4151fdbd 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py index d45cbc7268b9..3ed5c11ec72c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -97,7 +97,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeCounts', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py index 18ae4584c08a..6fd11c5177f9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py @@ -74,7 +74,7 @@ def list_by_node( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -119,7 +119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -159,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -187,7 +187,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DscNodeReport', pipeline_response) @@ -206,7 +206,7 @@ def get_content( report_id, # type: str **kwargs # type: Any ): - # type: (...) -> object + # type: (...) -> Any """Retrieve the Dsc node reports by node id and report id. :param resource_group_name: Name of an Azure Resource group. @@ -218,16 +218,16 @@ def get_content( :param report_id: The report id. :type report_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -255,7 +255,7 @@ def get_content( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py index 4433d365aee4..ed183d90d01d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py @@ -74,7 +74,7 @@ def list_fields_by_module_and_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -118,7 +118,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -155,7 +155,7 @@ def list_fields_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -198,7 +198,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py index a26716803b06..f83606b62d53 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/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.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..167e59a2be5c --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,440 @@ +# 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.paging import ItemPaged +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, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.automation.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_automation_account( + self, + resource_group_name, # type: str + automation_account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List all private endpoint connections on a Automation account. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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_automation_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_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') + + 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('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return 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]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + automation_account_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets a private endpoint connection. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.automation.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + automation_account_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> 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 = "2020-01-13-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 = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(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 [200, 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + automation_account_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~azure.mgmt.automation.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: 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) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.automation.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + 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._create_or_update_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=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): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + automation_account_name, # type: str + private_endpoint_connection_name, # type: str + **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 = "2020-01-13-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + 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, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + automation_account_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :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: 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._delete_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..d300de029471 --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py @@ -0,0 +1,121 @@ +# 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.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.automation.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def automation( + self, + resource_group_name, # type: str + automation_account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """Gets the private link resources that need to be created for Automation account. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param automation_account_name: The name of the automation account. + :type automation_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-01-13-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.automation.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'automationAccountName': self._serialize.url("automation_account_name", automation_account_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') + + 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('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return 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]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + automation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateLinkResources'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py index f28cd6987093..f20f80861969 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Module', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py index c60a44fca278..0449ee409385 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py @@ -19,7 +19,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, IO, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +53,7 @@ def get_content( runbook_name, # type: str **kwargs # type: Any ): - # type: (...) -> str + # type: (...) -> IO """Retrieve the content of runbook draft identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -63,16 +63,16 @@ def get_content( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str + :return: IO, or the result of cls(response) + :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType[IO] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "text/powershell" # Construct URL @@ -101,7 +101,7 @@ def get_content( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('IO', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -117,13 +117,13 @@ def _replace_content_initial( runbook_content, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Optional[IO] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "text/powershell") accept = "application/json" @@ -150,21 +150,26 @@ def _replace_content_initial( body_content = self._serialize.body(runbook_content, 'str') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + if response.status_code == 202: response_headers['location']=self._deserialize('str', response.headers.get('location')) if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) + return deserialized _replace_content_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'} # type: ignore def begin_replace_content( @@ -175,7 +180,7 @@ def begin_replace_content( runbook_content, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[None] + # type: (...) -> LROPoller[IO] """Replaces the runbook draft content. :param resource_group_name: Name of an Azure Resource group. @@ -184,20 +189,20 @@ def begin_replace_content( :type automation_account_name: str :param runbook_name: The runbook name. :type runbook_name: str - :param runbook_content: The runbook draft content. + :param runbook_content: The runbook draft content. :type runbook_content: 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: 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 None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either IO or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[IO] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType[IO] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -217,8 +222,11 @@ def begin_replace_content( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = response.stream_download(self._client._pipeline) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -227,7 +235,7 @@ def get_long_running_output(pipeline_response): 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + 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: @@ -267,7 +275,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -294,7 +302,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RunbookDraft', pipeline_response) @@ -312,7 +320,7 @@ def undo_edit( runbook_name, # type: str **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> "_models.RunbookDraftUndoEditResult" """Undo draft edit to last known published state identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -322,16 +330,16 @@ def undo_edit( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: RunbookDraftUndoEditResult, or the result of cls(response) + :rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunbookDraftUndoEditResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -358,10 +366,13 @@ def undo_edit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = self._deserialize('RunbookDraftUndoEditResult', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized undo_edit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'} # type: ignore diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py index 62717cca25ee..866ba61f0191 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, IO, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +60,7 @@ def _publish_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -87,7 +87,7 @@ def _publish_initial( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -116,8 +116,8 @@ def begin_publish( :type runbook_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: 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 None or the result of cls(response) @@ -175,7 +175,7 @@ def get_content( runbook_name, # type: str **kwargs # type: Any ): - # type: (...) -> str + # type: (...) -> IO """Retrieve the content of runbook identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -185,16 +185,16 @@ def get_content( :param runbook_name: The runbook name. :type runbook_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str + :return: IO, or the result of cls(response) + :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType[IO] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "text/powershell" # Construct URL @@ -223,7 +223,7 @@ def get_content( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('IO', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -257,7 +257,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -284,7 +284,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Runbook', pipeline_response) @@ -325,7 +325,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -357,7 +357,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -401,7 +401,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -433,7 +433,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Runbook', pipeline_response) @@ -470,7 +470,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -497,7 +497,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -528,7 +528,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" def prepare_request(next_link=None): @@ -570,7 +570,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py index 6bd51aca5617..c70bd8394f7b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py @@ -74,7 +74,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -106,7 +106,7 @@ def create_or_update( if response.status_code not in [200, 201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -151,7 +151,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -183,7 +183,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Schedule', pipeline_response) @@ -220,7 +220,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -247,7 +247,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Schedule', pipeline_response) @@ -284,7 +284,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -311,7 +311,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -342,7 +342,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -384,7 +384,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py index 8fcd0a1009c4..7d390b415d67 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py @@ -103,7 +103,7 @@ def get_by_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRun', pipeline_response) @@ -185,7 +185,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRunListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py index 229b49a5ca4f..88590f95c4ba 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py @@ -102,7 +102,7 @@ def get_by_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationRun', pipeline_response) @@ -184,7 +184,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationRunListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py index 2c1b164f8096..4eb702249df5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py @@ -111,7 +111,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -185,7 +185,7 @@ def get_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) @@ -255,7 +255,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -322,7 +322,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SoftwareUpdateConfigurationListResult', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py index 86678aad8385..c127fa1fbd2a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py @@ -74,7 +74,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -106,7 +106,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -150,7 +150,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -182,7 +182,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -219,7 +219,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -246,7 +246,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -280,7 +280,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -344,7 +344,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -388,7 +388,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py index 8171b1602c8a..abba65cc143f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py @@ -77,7 +77,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -110,7 +110,7 @@ def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJob', pipeline_response) @@ -150,7 +150,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -178,7 +178,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJobById', pipeline_response) @@ -218,7 +218,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -263,7 +263,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py index fb7d88085d3a..6547dc769e3f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py @@ -77,7 +77,7 @@ def list_by_sync_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -123,7 +123,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) @@ -166,7 +166,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -195,7 +195,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControlSyncJobStreamById', pipeline_response) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py index 2c4886e9945d..bcb776af2e28 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py @@ -71,7 +71,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py index 143df34ab9bc..ba0b7a60fd29 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py @@ -73,7 +73,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -105,7 +105,7 @@ def create( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TestJob', pipeline_response) @@ -142,7 +142,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -169,7 +169,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TestJob', pipeline_response) @@ -206,7 +206,7 @@ def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -233,7 +233,7 @@ def resume( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -294,7 +294,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -328,7 +328,7 @@ def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -355,7 +355,7 @@ def suspend( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py index 0b45b5c214e1..9600f6b76e1b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" # Construct URL @@ -102,7 +102,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobStream', pipeline_response) @@ -142,7 +142,7 @@ def list_by_test_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2018-06-30" accept = "application/json" def prepare_request(next_link=None): @@ -187,7 +187,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py index 19cf0634e982..364204059c5c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py @@ -68,7 +68,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py index 5d969e664f97..3677ab4f0e09 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py @@ -74,7 +74,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -106,7 +106,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -150,7 +150,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -182,7 +182,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Variable', pipeline_response) @@ -219,7 +219,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -246,7 +246,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -280,7 +280,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -307,7 +307,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Variable', pipeline_response) @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py index 0ced3fe30b63..83d632ec66c6 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py @@ -74,7 +74,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -106,7 +106,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -147,7 +147,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -174,7 +174,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Watcher', pipeline_response) @@ -214,7 +214,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -246,7 +246,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Watcher', pipeline_response) @@ -283,7 +283,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -310,7 +310,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -344,7 +344,7 @@ def start( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -371,7 +371,7 @@ def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -405,7 +405,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -432,7 +432,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -466,7 +466,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-06-01" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -510,7 +510,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py index 8f6548f69bc4..58a5a1a161ce 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py @@ -94,7 +94,7 @@ def generate_uri( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -158,7 +158,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -219,7 +219,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Webhook', pipeline_response) @@ -291,7 +291,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -367,7 +367,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Webhook', pipeline_response) @@ -448,7 +448,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + 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)