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 2b4df38a78f5..10c9bac191de 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 @@ -18,8 +18,20 @@ from azure.core.credentials import TokenCredential from ._configuration import AutomationClientConfiguration +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 NodeCountInformationOperations +from .operations import SourceControlOperations +from .operations import SourceControlSyncJobOperations +from .operations import SourceControlSyncJobStreamsOperations from .operations import AutomationAccountOperations -from .operations import Operations from .operations import StatisticsOperations from .operations import UsagesOperations from .operations import KeysOperations @@ -27,7 +39,6 @@ from .operations import ConnectionOperations from .operations import ConnectionTypeOperations from .operations import CredentialOperations -from .operations import DscConfigurationOperations from .operations import HybridRunbookWorkerGroupOperations from .operations import JobScheduleOperations from .operations import LinkedWorkspaceOperations @@ -37,38 +48,52 @@ from .operations import FieldsOperations from .operations import ScheduleOperations from .operations import VariableOperations -from .operations import WebhookOperations from .operations import WatcherOperations -from .operations import SoftwareUpdateConfigurationsOperations -from .operations import SoftwareUpdateConfigurationRunsOperations -from .operations import SoftwareUpdateConfigurationMachineRunsOperations -from .operations import SourceControlOperations -from .operations import SourceControlSyncJobOperations -from .operations import SourceControlSyncJobStreamsOperations +from .operations import DscConfigurationOperations from .operations import JobOperations from .operations import JobStreamOperations -from .operations import AgentRegistrationInformationOperations -from .operations import DscNodeOperations -from .operations import NodeReportsOperations -from .operations import DscCompilationJobOperations -from .operations import DscCompilationJobStreamOperations -from .operations import DscNodeConfigurationOperations -from .operations import NodeCountInformationOperations +from .operations import Operations from .operations import RunbookDraftOperations from .operations import RunbookOperations from .operations import TestJobStreamsOperations from .operations import TestJobOperations -from .operations import Python2PackageOperations +from .operations import SoftwareUpdateConfigurationRunsOperations +from .operations import SoftwareUpdateConfigurationMachineRunsOperations +from .operations import WebhookOperations from . import models class AutomationClient(object): """Automation Client. + :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 + :vartype agent_registration_information: azure.mgmt.automation.operations.AgentRegistrationInformationOperations + :ivar dsc_node: DscNodeOperations operations + :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 node_count_information: NodeCountInformationOperations operations + :vartype node_count_information: azure.mgmt.automation.operations.NodeCountInformationOperations + :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 automation_account: AutomationAccountOperations operations :vartype automation_account: azure.mgmt.automation.operations.AutomationAccountOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.automation.operations.Operations :ivar statistics: StatisticsOperations operations :vartype statistics: azure.mgmt.automation.operations.StatisticsOperations :ivar usages: UsagesOperations operations @@ -83,8 +108,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 hybrid_runbook_worker_group: HybridRunbookWorkerGroupOperations operations :vartype hybrid_runbook_worker_group: azure.mgmt.automation.operations.HybridRunbookWorkerGroupOperations :ivar job_schedule: JobScheduleOperations operations @@ -103,40 +126,16 @@ class AutomationClient(object): :vartype schedule: azure.mgmt.automation.operations.ScheduleOperations :ivar variable: VariableOperations operations :vartype variable: azure.mgmt.automation.operations.VariableOperations - :ivar webhook: WebhookOperations operations - :vartype webhook: azure.mgmt.automation.operations.WebhookOperations :ivar watcher: WatcherOperations operations :vartype watcher: azure.mgmt.automation.operations.WatcherOperations - :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 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 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 agent_registration_information: AgentRegistrationInformationOperations operations - :vartype agent_registration_information: azure.mgmt.automation.operations.AgentRegistrationInformationOperations - :ivar dsc_node: DscNodeOperations operations - :vartype dsc_node: azure.mgmt.automation.operations.DscNodeOperations - :ivar node_reports: NodeReportsOperations operations - :vartype node_reports: azure.mgmt.automation.operations.NodeReportsOperations - :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 operations: Operations operations + :vartype operations: azure.mgmt.automation.operations.Operations :ivar runbook_draft: RunbookDraftOperations operations :vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations :ivar runbook: RunbookOperations operations @@ -145,8 +144,12 @@ class AutomationClient(object): :vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations :ivar test_job: TestJobOperations operations :vartype test_job: azure.mgmt.automation.operations.TestJobOperations - :ivar python2_package: Python2PackageOperations operations - :vartype python2_package: azure.mgmt.automation.operations.Python2PackageOperations + :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 webhook: WebhookOperations operations + :vartype webhook: azure.mgmt.automation.operations.WebhookOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -170,12 +173,35 @@ 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.automation_account = AutomationAccountOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( + 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) + self.agent_registration_information = AgentRegistrationInformationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.dsc_node = DscNodeOperations( + 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.node_count_information = NodeCountInformationOperations( + 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.automation_account = AutomationAccountOperations( self._client, self._config, self._serialize, self._deserialize) self.statistics = StatisticsOperations( self._client, self._config, self._serialize, self._deserialize) @@ -191,8 +217,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.hybrid_runbook_worker_group = HybridRunbookWorkerGroupOperations( self._client, self._config, self._serialize, self._deserialize) self.job_schedule = JobScheduleOperations( @@ -211,39 +235,15 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.variable = VariableOperations( self._client, self._config, self._serialize, self._deserialize) - self.webhook = WebhookOperations( - self._client, self._config, self._serialize, self._deserialize) self.watcher = WatcherOperations( 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.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.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.agent_registration_information = AgentRegistrationInformationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.dsc_node = DscNodeOperations( - self._client, self._config, self._serialize, self._deserialize) - self.node_reports = NodeReportsOperations( - 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.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.runbook_draft = RunbookDraftOperations( self._client, self._config, self._serialize, self._deserialize) @@ -253,7 +253,11 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.test_job = TestJobOperations( self._client, self._config, self._serialize, self._deserialize) - self.python2_package = Python2PackageOperations( + 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.webhook = WebhookOperations( self._client, self._config, self._serialize, self._deserialize) def close(self): 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..923a958d1220 --- /dev/null +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json @@ -0,0 +1,102 @@ +{ + "chosen_version": "", + "total_api_version_list": ["2015-10-31", "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": true + }, + "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, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "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" + }, + "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 + }, + "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", + "runbook_draft": "RunbookDraftOperations", + "runbook": "RunbookOperations", + "test_job_streams": "TestJobStreamsOperations", + "test_job": "TestJobOperations", + "software_update_configuration_runs": "SoftwareUpdateConfigurationRunsOperations", + "software_update_configuration_machine_runs": "SoftwareUpdateConfigurationMachineRunsOperations", + "webhook": "WebhookOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ 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 c47f66669f1b..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.0.0" +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 5a09ea49d60f..95b82434b43e 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 @@ -16,8 +16,20 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import AutomationClientConfiguration +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 NodeCountInformationOperations +from .operations import SourceControlOperations +from .operations import SourceControlSyncJobOperations +from .operations import SourceControlSyncJobStreamsOperations from .operations import AutomationAccountOperations -from .operations import Operations from .operations import StatisticsOperations from .operations import UsagesOperations from .operations import KeysOperations @@ -25,7 +37,6 @@ from .operations import ConnectionOperations from .operations import ConnectionTypeOperations from .operations import CredentialOperations -from .operations import DscConfigurationOperations from .operations import HybridRunbookWorkerGroupOperations from .operations import JobScheduleOperations from .operations import LinkedWorkspaceOperations @@ -35,38 +46,52 @@ from .operations import FieldsOperations from .operations import ScheduleOperations from .operations import VariableOperations -from .operations import WebhookOperations from .operations import WatcherOperations -from .operations import SoftwareUpdateConfigurationsOperations -from .operations import SoftwareUpdateConfigurationRunsOperations -from .operations import SoftwareUpdateConfigurationMachineRunsOperations -from .operations import SourceControlOperations -from .operations import SourceControlSyncJobOperations -from .operations import SourceControlSyncJobStreamsOperations +from .operations import DscConfigurationOperations from .operations import JobOperations from .operations import JobStreamOperations -from .operations import AgentRegistrationInformationOperations -from .operations import DscNodeOperations -from .operations import NodeReportsOperations -from .operations import DscCompilationJobOperations -from .operations import DscCompilationJobStreamOperations -from .operations import DscNodeConfigurationOperations -from .operations import NodeCountInformationOperations +from .operations import Operations from .operations import RunbookDraftOperations from .operations import RunbookOperations from .operations import TestJobStreamsOperations from .operations import TestJobOperations -from .operations import Python2PackageOperations +from .operations import SoftwareUpdateConfigurationRunsOperations +from .operations import SoftwareUpdateConfigurationMachineRunsOperations +from .operations import WebhookOperations from .. import models class AutomationClient(object): """Automation Client. + :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 + :vartype agent_registration_information: azure.mgmt.automation.aio.operations.AgentRegistrationInformationOperations + :ivar dsc_node: DscNodeOperations operations + :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 node_count_information: NodeCountInformationOperations operations + :vartype node_count_information: azure.mgmt.automation.aio.operations.NodeCountInformationOperations + :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 automation_account: AutomationAccountOperations operations :vartype automation_account: azure.mgmt.automation.aio.operations.AutomationAccountOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.automation.aio.operations.Operations :ivar statistics: StatisticsOperations operations :vartype statistics: azure.mgmt.automation.aio.operations.StatisticsOperations :ivar usages: UsagesOperations operations @@ -81,8 +106,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 hybrid_runbook_worker_group: HybridRunbookWorkerGroupOperations operations :vartype hybrid_runbook_worker_group: azure.mgmt.automation.aio.operations.HybridRunbookWorkerGroupOperations :ivar job_schedule: JobScheduleOperations operations @@ -101,40 +124,16 @@ class AutomationClient(object): :vartype schedule: azure.mgmt.automation.aio.operations.ScheduleOperations :ivar variable: VariableOperations operations :vartype variable: azure.mgmt.automation.aio.operations.VariableOperations - :ivar webhook: WebhookOperations operations - :vartype webhook: azure.mgmt.automation.aio.operations.WebhookOperations :ivar watcher: WatcherOperations operations :vartype watcher: azure.mgmt.automation.aio.operations.WatcherOperations - :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 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 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 agent_registration_information: AgentRegistrationInformationOperations operations - :vartype agent_registration_information: azure.mgmt.automation.aio.operations.AgentRegistrationInformationOperations - :ivar dsc_node: DscNodeOperations operations - :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_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 operations: Operations operations + :vartype operations: azure.mgmt.automation.aio.operations.Operations :ivar runbook_draft: RunbookDraftOperations operations :vartype runbook_draft: azure.mgmt.automation.aio.operations.RunbookDraftOperations :ivar runbook: RunbookOperations operations @@ -143,8 +142,12 @@ class AutomationClient(object): :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 python2_package: Python2PackageOperations operations - :vartype python2_package: azure.mgmt.automation.aio.operations.Python2PackageOperations + :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 webhook: WebhookOperations operations + :vartype webhook: azure.mgmt.automation.aio.operations.WebhookOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -167,12 +170,35 @@ 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.automation_account = AutomationAccountOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( + 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) + self.agent_registration_information = AgentRegistrationInformationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.dsc_node = DscNodeOperations( + 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.node_count_information = NodeCountInformationOperations( + 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.automation_account = AutomationAccountOperations( self._client, self._config, self._serialize, self._deserialize) self.statistics = StatisticsOperations( self._client, self._config, self._serialize, self._deserialize) @@ -188,8 +214,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.hybrid_runbook_worker_group = HybridRunbookWorkerGroupOperations( self._client, self._config, self._serialize, self._deserialize) self.job_schedule = JobScheduleOperations( @@ -208,39 +232,15 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.variable = VariableOperations( self._client, self._config, self._serialize, self._deserialize) - self.webhook = WebhookOperations( - self._client, self._config, self._serialize, self._deserialize) self.watcher = WatcherOperations( 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.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.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.agent_registration_information = AgentRegistrationInformationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.dsc_node = DscNodeOperations( - self._client, self._config, self._serialize, self._deserialize) - self.node_reports = NodeReportsOperations( - 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.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.runbook_draft = RunbookDraftOperations( self._client, self._config, self._serialize, self._deserialize) @@ -250,7 +250,11 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.test_job = TestJobOperations( self._client, self._config, self._serialize, self._deserialize) - self.python2_package = Python2PackageOperations( + 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.webhook = WebhookOperations( self._client, self._config, self._serialize, self._deserialize) async def close(self) -> None: 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 0229a60f1273..b8f405230865 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,8 +6,20 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +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 ._node_count_information_operations import NodeCountInformationOperations +from ._source_control_operations import SourceControlOperations +from ._source_control_sync_job_operations import SourceControlSyncJobOperations +from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations from ._automation_account_operations import AutomationAccountOperations -from ._operations import Operations from ._statistics_operations import StatisticsOperations from ._usages_operations import UsagesOperations from ._keys_operations import KeysOperations @@ -15,7 +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 ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations from ._job_schedule_operations import JobScheduleOperations from ._linked_workspace_operations import LinkedWorkspaceOperations @@ -25,32 +36,34 @@ from ._fields_operations import FieldsOperations from ._schedule_operations import ScheduleOperations from ._variable_operations import VariableOperations -from ._webhook_operations import WebhookOperations from ._watcher_operations import WatcherOperations -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 ._source_control_operations import SourceControlOperations -from ._source_control_sync_job_operations import SourceControlSyncJobOperations -from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations +from ._dsc_configuration_operations import DscConfigurationOperations from ._job_operations import JobOperations from ._job_stream_operations import JobStreamOperations -from ._agent_registration_information_operations import AgentRegistrationInformationOperations -from ._dsc_node_operations import DscNodeOperations -from ._node_reports_operations import NodeReportsOperations -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 ._operations import Operations 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 ._python2_package_operations import Python2PackageOperations +from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations +from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations +from ._webhook_operations import WebhookOperations __all__ = [ + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'Python2PackageOperations', + 'AgentRegistrationInformationOperations', + 'DscNodeOperations', + 'NodeReportsOperations', + 'DscNodeConfigurationOperations', + 'DscCompilationJobOperations', + 'DscCompilationJobStreamOperations', + 'NodeCountInformationOperations', + 'SourceControlOperations', + 'SourceControlSyncJobOperations', + 'SourceControlSyncJobStreamsOperations', 'AutomationAccountOperations', - 'Operations', 'StatisticsOperations', 'UsagesOperations', 'KeysOperations', @@ -58,7 +71,6 @@ 'ConnectionOperations', 'ConnectionTypeOperations', 'CredentialOperations', - 'DscConfigurationOperations', 'HybridRunbookWorkerGroupOperations', 'JobScheduleOperations', 'LinkedWorkspaceOperations', @@ -68,26 +80,16 @@ 'FieldsOperations', 'ScheduleOperations', 'VariableOperations', - 'WebhookOperations', 'WatcherOperations', - 'SoftwareUpdateConfigurationsOperations', - 'SoftwareUpdateConfigurationRunsOperations', - 'SoftwareUpdateConfigurationMachineRunsOperations', - 'SourceControlOperations', - 'SourceControlSyncJobOperations', - 'SourceControlSyncJobStreamsOperations', + 'DscConfigurationOperations', 'JobOperations', 'JobStreamOperations', - 'AgentRegistrationInformationOperations', - 'DscNodeOperations', - 'NodeReportsOperations', - 'DscCompilationJobOperations', - 'DscCompilationJobStreamOperations', - 'DscNodeConfigurationOperations', - 'NodeCountInformationOperations', + 'Operations', 'RunbookDraftOperations', 'RunbookOperations', 'TestJobStreamsOperations', 'TestJobOperations', - 'Python2PackageOperations', + 'SoftwareUpdateConfigurationRunsOperations', + 'SoftwareUpdateConfigurationMachineRunsOperations', + '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 1ccf5a94b4fb..54791b047b77 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 @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -133,7 +133,7 @@ def list_by_module( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py index e5b186168ca7..eb0ee230ed7a 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 @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -124,7 +124,7 @@ async def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 f43903bb7ad6..51533cde7065 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 @@ -66,7 +66,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -133,7 +133,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -201,7 +201,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -257,7 +257,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -313,7 +313,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -383,7 +383,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py index ad5ad1735c28..ffd80aa27b7f 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py index 776acc604150..090dd50101c3 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 @@ -47,7 +47,7 @@ async def delete( automation_account_name: str, connection_name: str, **kwargs - ) -> Optional["_models.Connection"]: + ) -> None: """Delete the connection. :param resource_group_name: Name of an Azure Resource group. @@ -57,16 +57,16 @@ async def delete( :param connection_name: The name of connection. :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Connection, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.Connection or None + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Connection"]] + 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -96,14 +96,9 @@ async def delete( error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Connection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} # type: ignore async def get( @@ -131,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -197,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -272,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -337,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py index 81402d8ed081..cd917d960eed 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 @@ -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, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -223,16 +223,12 @@ async def create_or_update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201, 409]: + 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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 201: - deserialized = self._deserialize('ConnectionType', pipeline_response) - - if response.status_code == 409: - deserialized = self._deserialize('ConnectionType', pipeline_response) + deserialized = self._deserialize('ConnectionType', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -262,7 +258,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py index 68e3c6fdc382..5f7a45ee1108 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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 78d00d33680c..b601df74a447 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 @@ -56,7 +56,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -200,7 +200,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -263,7 +263,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -346,7 +346,7 @@ async def get_stream( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 303ef5fad0ae..c31cd946558d 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 @@ -65,7 +65,7 @@ async def list_by_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 ddc9eb5951c7..fa2cc5f3e6a9 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 @@ -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, IO, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/plain; charset=utf-8") accept = "application/json" @@ -280,7 +280,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/plain; charset=utf-8") accept = "application/json" @@ -341,7 +341,7 @@ async def get_content( automation_account_name: str, configuration_name: str, **kwargs - ) -> IO: + ) -> str: """Retrieve the configuration script identified by configuration name. :param resource_group_name: Name of an Azure Resource group. @@ -351,16 +351,16 @@ async def get_content( :param configuration_name: The configuration name. :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "text/powershell" # Construct URL @@ -389,7 +389,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('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -431,7 +431,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 9672d48c990b..24f19974ae9d 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 @@ -68,7 +68,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -128,7 +128,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -179,7 +179,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + 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_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py index 1ca41e22915a..9dac593e8fa2 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 @@ -47,7 +47,7 @@ async def delete( automation_account_name: str, node_id: str, **kwargs - ) -> "_models.DscNode": + ) -> None: """Delete the dsc node identified by node id. :param resource_group_name: Name of an Azure Resource group. @@ -57,16 +57,16 @@ async def delete( :param node_id: The node id. :type node_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DscNode, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.DscNode + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DscNode"] + 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -96,12 +96,9 @@ async def delete( error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DscNode', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'} # type: ignore async def get( @@ -129,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -195,7 +192,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -272,7 +269,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + 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/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py index 56797c159543..2fe4b0eb52fb 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 @@ -69,7 +69,7 @@ def list_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py index 8366c241cf92..0877d4c0d507 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -260,7 +260,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py index 46f88ebf14d2..e0d98349d7c7 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 @@ -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, IO, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -48,7 +48,7 @@ async def get_output( job_name: str, client_request_id: Optional[str] = None, **kwargs - ) -> IO: + ) -> str: """Retrieve the job output identified by job name. :param resource_group_name: Name of an Azure Resource group. @@ -60,16 +60,16 @@ async def get_output( :param client_request_id: Identifies this specific client request. :type client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "text/plain" # Construct URL @@ -100,7 +100,7 @@ async def get_output( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -115,7 +115,7 @@ async def get_runbook_content( job_name: str, client_request_id: Optional[str] = None, **kwargs - ) -> IO: + ) -> str: """Retrieve the runbook content of the job identified by job name. :param resource_group_name: Name of an Azure Resource group. @@ -127,17 +127,17 @@ async def get_runbook_content( :param client_request_id: Identifies this specific client request. :type client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" + api_version = "2019-06-01" + accept = "text/powershell" # Construct URL url = self.get_runbook_content.metadata['url'] # type: ignore @@ -160,15 +160,14 @@ async def get_runbook_content( 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=True, **kwargs) + 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -204,7 +203,7 @@ async def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -269,7 +268,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -334,7 +333,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -405,7 +404,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -478,7 +477,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -563,7 +562,7 @@ async def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 c9f1efaea69b..2dea9789eab1 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -260,7 +260,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py index ce45f2ef584f..7a79fe7c3750 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 @@ -72,7 +72,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -144,7 +144,7 @@ def list_by_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 c7a65d51a1f3..c98a8866bc40 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 @@ -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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 b397dce930ac..af2429fec3bd 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 @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 91a890790611..7b2187c81df5 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py index adcc70995efa..09b60e9b8ec6 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 @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 34bf8dbc9ee6..fe0a804fdc06 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 @@ -69,7 +69,7 @@ def list_by_node( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -153,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -220,7 +220,7 @@ async def get_content( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 f8edeae14c63..4decd923588d 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 @@ -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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def list_fields_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py index 18ad6c927d59..5646e67f5ae1 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 @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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..d973b4377160 --- /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 + ) -> 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 + ) -> "_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 + ) -> 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(_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 + ) -> 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: True for ARMPolling, False for no polling, or a + polling object for 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 + ) -> 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(_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 + ) -> 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: True for ARMPolling, False for no polling, or a + polling object for 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..823407a5c124 --- /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 + ) -> 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 9583a94d01d8..8bdfc6f5532f 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 @@ -66,7 +66,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + 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/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py index db5e0093dd9c..5118a9366302 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, IO, Optional, TypeVar, Union +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -48,7 +48,7 @@ async def get_content( automation_account_name: str, runbook_name: str, **kwargs - ) -> IO: + ) -> str: """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: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" 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('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -111,13 +111,13 @@ async def _replace_content_initial( runbook_name: str, runbook_content: str, **kwargs - ) -> Optional[IO]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + ) -> 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 = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/powershell") accept = "application/json" @@ -144,7 +144,7 @@ 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=True, **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]: @@ -153,17 +153,12 @@ async def _replace_content_initial( 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, deserialized, response_headers) + return cls(pipeline_response, None, 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( @@ -173,7 +168,7 @@ async def begin_replace_content( runbook_name: str, runbook_content: str, **kwargs - ) -> AsyncLROPoller[IO]: + ) -> AsyncLROPoller[None]: """Replaces the runbook draft content. :param resource_group_name: Name of an Azure Resource group. @@ -182,7 +177,7 @@ 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. @@ -190,12 +185,12 @@ async def begin_replace_content( polling object for 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 IO or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[IO] + :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[IO] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -215,11 +210,8 @@ 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, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -228,7 +220,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, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -267,7 +259,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -311,7 +303,7 @@ async def undo_edit( automation_account_name: str, runbook_name: str, **kwargs - ) -> "_models.RunbookDraftUndoEditResult": + ) -> None: """Undo draft edit to last known published state identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -321,16 +313,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: RunbookDraftUndoEditResult, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RunbookDraftUndoEditResult"] + 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 = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -360,10 +352,7 @@ async def undo_edit( error = self._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, deserialized, {}) + return cls(pipeline_response, None, {}) - 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 02f213ea4004..bed2db8ae795 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, IO, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -55,7 +55,7 @@ async def _publish_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -168,7 +168,7 @@ async def get_content( automation_account_name: str, runbook_name: str, **kwargs - ) -> IO: + ) -> str: """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: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" 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('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -249,7 +249,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -316,7 +316,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -391,7 +391,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -459,7 +459,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -516,7 +516,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 c9a847af6ac1..68babc3097b9 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 @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -213,7 +213,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -276,7 +276,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -333,7 +333,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_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 a33884446501..3ca0dfd2d7d8 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 @@ -69,7 +69,7 @@ async def get_by_id( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -145,7 +145,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 2806bcc573cc..ae3084d09235 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 @@ -68,7 +68,7 @@ async def get_by_id( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -144,7 +144,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 deleted file mode 100644 index b92ae2b08592..000000000000 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py +++ /dev/null @@ -1,326 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.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 SoftwareUpdateConfigurationsOperations: - """SoftwareUpdateConfigurationsOperations 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 - - async def create( - self, - resource_group_name: str, - automation_account_name: str, - software_update_configuration_name: str, - parameters: "_models.SoftwareUpdateConfiguration", - client_request_id: Optional[str] = None, - **kwargs - ) -> "_models.SoftwareUpdateConfiguration": - """Create a new software update configuration with the name given in the URI. - - :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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param parameters: Request body. - :type parameters: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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, 'SoftwareUpdateConfiguration') - 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, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - async def get_by_name( - self, - resource_group_name: str, - automation_account_name: str, - software_update_configuration_name: str, - client_request_id: Optional[str] = None, - **kwargs - ) -> "_models.SoftwareUpdateConfiguration": - """Get a single software update configuration by 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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.get_by_name.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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - async def delete( - self, - resource_group_name: str, - automation_account_name: str, - software_update_configuration_name: str, - client_request_id: Optional[str] = None, - **kwargs - ) -> None: - """delete a specific software update configuration. - - :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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param client_request_id: Identifies this specific client request. - :type client_request_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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 = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - '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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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 [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - async def list( - self, - resource_group_name: str, - automation_account_name: str, - client_request_id: Optional[str] = None, - filter: Optional[str] = None, - **kwargs - ) -> "_models.SoftwareUpdateConfigurationListResult": - """Get all software update configurations for the 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 - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :param filter: The filter to apply on the operation. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfigurationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.list.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') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SoftwareUpdateConfigurationListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'} # type: ignore 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 e03cc51424c4..910aa5e30b92 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 @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -144,7 +144,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -212,7 +212,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -272,7 +272,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -335,7 +335,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + 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/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py index 2085c8bffaba..698cb0d666a9 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 @@ -72,7 +72,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -144,7 +144,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + 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/_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 226ffeffc2a8..ca348a2fe469 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 @@ -72,7 +72,7 @@ def list_by_sync_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -160,7 +160,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 7f8aaba11284..7accc40669d1 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 @@ -66,7 +66,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py index 3bfb57d33790..ea440aad6497 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 @@ -68,7 +68,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -136,7 +136,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ async def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -259,7 +259,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -319,7 +319,7 @@ async def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 40d4991aeb38..55fb84a09c42 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 @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def list_by_test_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 097e07ea3414..8acd1ce7717b 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 @@ -63,7 +63,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py index 8cf24e014e26..b1a3878b82f0 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 @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -144,7 +144,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -212,7 +212,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -272,7 +272,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -332,7 +332,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py index 05fd6950ea6a..0648056328e2 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 @@ -69,7 +69,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -141,7 +141,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -335,7 +335,7 @@ async def start( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -395,7 +395,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -455,7 +455,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/models/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py index db3cb87360d7..01473e94be7f 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 @@ -22,12 +22,11 @@ from ._models_py3 import AutomationAccountCreateOrUpdateParameters from ._models_py3 import AutomationAccountListResult from ._models_py3 import AutomationAccountUpdateParameters - from ._models_py3 import AzureQueryProperties from ._models_py3 import Certificate from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateListResult from ._models_py3 import CertificateUpdateParameters - from ._models_py3 import CollectionItemUpdateConfiguration + from ._models_py3 import ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties from ._models_py3 import Connection from ._models_py3 import ConnectionCreateOrUpdateParameters from ._models_py3 import ConnectionListResult @@ -66,12 +65,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 @@ -84,8 +86,8 @@ 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 from ._models_py3 import ModuleCreateOrUpdateParameters from ._models_py3 import ModuleErrorInfo @@ -94,10 +96,15 @@ from ._models_py3 import NodeCount from ._models_py3 import NodeCountProperties from ._models_py3 import NodeCounts - from ._models_py3 import NonAzureQueryProperties 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 @@ -117,19 +124,14 @@ from ._models_py3 import ScheduleAssociationProperty from ._models_py3 import ScheduleCreateOrUpdateParameters from ._models_py3 import ScheduleListResult - from ._models_py3 import ScheduleProperties from ._models_py3 import ScheduleUpdateParameters from ._models_py3 import Sku - from ._models_py3 import SoftareUpdateConfigurationRunTaskProperties - from ._models_py3 import SoftareUpdateConfigurationRunTasks - from ._models_py3 import SoftwareUpdateConfiguration - from ._models_py3 import SoftwareUpdateConfigurationCollectionItem - from ._models_py3 import SoftwareUpdateConfigurationListResult from ._models_py3 import SoftwareUpdateConfigurationMachineRun from ._models_py3 import SoftwareUpdateConfigurationMachineRunListResult from ._models_py3 import SoftwareUpdateConfigurationRun from ._models_py3 import SoftwareUpdateConfigurationRunListResult - from ._models_py3 import SoftwareUpdateConfigurationTasks + from ._models_py3 import SoftwareUpdateConfigurationRunTaskProperties + from ._models_py3 import SoftwareUpdateConfigurationRunTasks from ._models_py3 import SourceControl from ._models_py3 import SourceControlCreateOrUpdateParameters from ._models_py3 import SourceControlListResult @@ -144,15 +146,11 @@ from ._models_py3 import SourceControlUpdateParameters from ._models_py3 import Statistics from ._models_py3 import StatisticsListResult - from ._models_py3 import TagSettingsProperties - from ._models_py3 import TargetProperties - from ._models_py3 import TaskProperties from ._models_py3 import TestJob from ._models_py3 import TestJobCreateParameters from ._models_py3 import TrackedResource from ._models_py3 import TypeField from ._models_py3 import TypeFieldListResult - from ._models_py3 import UpdateConfiguration from ._models_py3 import UpdateConfigurationNavigation from ._models_py3 import Usage from ._models_py3 import UsageCounterName @@ -168,7 +166,6 @@ from ._models_py3 import WebhookCreateOrUpdateParameters from ._models_py3 import WebhookListResult from ._models_py3 import WebhookUpdateParameters - from ._models_py3 import WindowsProperties except (SyntaxError, ImportError): from ._models import Activity # type: ignore from ._models import ActivityListResult # type: ignore @@ -185,12 +182,11 @@ from ._models import AutomationAccountCreateOrUpdateParameters # type: ignore from ._models import AutomationAccountListResult # type: ignore from ._models import AutomationAccountUpdateParameters # type: ignore - from ._models import AzureQueryProperties # type: ignore from ._models import Certificate # type: ignore from ._models import CertificateCreateOrUpdateParameters # type: ignore from ._models import CertificateListResult # type: ignore from ._models import CertificateUpdateParameters # type: ignore - from ._models import CollectionItemUpdateConfiguration # 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 @@ -229,12 +225,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 @@ -247,8 +246,8 @@ 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 from ._models import ModuleCreateOrUpdateParameters # type: ignore from ._models import ModuleErrorInfo # type: ignore @@ -257,10 +256,15 @@ from ._models import NodeCount # type: ignore from ._models import NodeCountProperties # type: ignore from ._models import NodeCounts # type: ignore - from ._models import NonAzureQueryProperties # type: ignore 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 @@ -280,19 +284,14 @@ from ._models import ScheduleAssociationProperty # type: ignore from ._models import ScheduleCreateOrUpdateParameters # type: ignore from ._models import ScheduleListResult # type: ignore - from ._models import ScheduleProperties # type: ignore from ._models import ScheduleUpdateParameters # type: ignore from ._models import Sku # type: ignore - from ._models import SoftareUpdateConfigurationRunTaskProperties # type: ignore - from ._models import SoftareUpdateConfigurationRunTasks # type: ignore - from ._models import SoftwareUpdateConfiguration # type: ignore - from ._models import SoftwareUpdateConfigurationCollectionItem # type: ignore - from ._models import SoftwareUpdateConfigurationListResult # type: ignore from ._models import SoftwareUpdateConfigurationMachineRun # type: ignore from ._models import SoftwareUpdateConfigurationMachineRunListResult # type: ignore from ._models import SoftwareUpdateConfigurationRun # type: ignore from ._models import SoftwareUpdateConfigurationRunListResult # type: ignore - from ._models import SoftwareUpdateConfigurationTasks # type: ignore + from ._models import SoftwareUpdateConfigurationRunTaskProperties # type: ignore + from ._models import SoftwareUpdateConfigurationRunTasks # type: ignore from ._models import SourceControl # type: ignore from ._models import SourceControlCreateOrUpdateParameters # type: ignore from ._models import SourceControlListResult # type: ignore @@ -307,15 +306,11 @@ from ._models import SourceControlUpdateParameters # type: ignore from ._models import Statistics # type: ignore from ._models import StatisticsListResult # type: ignore - from ._models import TagSettingsProperties # type: ignore - from ._models import TargetProperties # type: ignore - from ._models import TaskProperties # type: ignore from ._models import TestJob # type: ignore from ._models import TestJobCreateParameters # type: ignore from ._models import TrackedResource # type: ignore from ._models import TypeField # type: ignore from ._models import TypeFieldListResult # type: ignore - from ._models import UpdateConfiguration # type: ignore from ._models import UpdateConfigurationNavigation # type: ignore from ._models import Usage # type: ignore from ._models import UsageCounterName # type: ignore @@ -331,7 +326,6 @@ from ._models import WebhookCreateOrUpdateParameters # type: ignore from ._models import WebhookListResult # type: ignore from ._models import WebhookUpdateParameters # type: ignore - from ._models import WindowsProperties # type: ignore from ._automation_client_enums import ( AgentRegistrationKeyName, @@ -341,15 +335,15 @@ ContentSourceType, CountType, DscConfigurationState, + EncryptionKeySourceType, GroupTypeEnum, HttpStatusCode, JobProvisioningState, JobStatus, JobStreamType, - LinuxUpdateClasses, ModuleProvisioningState, - OperatingSystemType, ProvisioningState, + ResourceIdentityType, RunbookState, RunbookTypeEnum, ScheduleDay, @@ -358,9 +352,7 @@ SourceType, StreamType, SyncType, - TagOperators, TokenType, - WindowsUpdateClasses, ) __all__ = [ @@ -379,12 +371,11 @@ 'AutomationAccountCreateOrUpdateParameters', 'AutomationAccountListResult', 'AutomationAccountUpdateParameters', - 'AzureQueryProperties', 'Certificate', 'CertificateCreateOrUpdateParameters', 'CertificateListResult', 'CertificateUpdateParameters', - 'CollectionItemUpdateConfiguration', + 'ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties', 'Connection', 'ConnectionCreateOrUpdateParameters', 'ConnectionListResult', @@ -423,12 +414,15 @@ 'DscReportError', 'DscReportResource', 'DscReportResourceNavigation', + 'EncryptionProperties', + 'EncryptionPropertiesIdentity', 'ErrorResponse', 'FieldDefinition', 'HybridRunbookWorker', 'HybridRunbookWorkerGroup', 'HybridRunbookWorkerGroupUpdateParameters', 'HybridRunbookWorkerGroupsListResult', + 'Identity', 'Job', 'JobCollectionItem', 'JobCreateParameters', @@ -441,8 +435,8 @@ 'JobStreamListResult', 'Key', 'KeyListResult', + 'KeyVaultProperties', 'LinkedWorkspace', - 'LinuxProperties', 'Module', 'ModuleCreateOrUpdateParameters', 'ModuleErrorInfo', @@ -451,10 +445,15 @@ 'NodeCount', 'NodeCountProperties', 'NodeCounts', - 'NonAzureQueryProperties', 'Operation', 'OperationDisplay', 'OperationListResult', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointProperty', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'PythonPackageCreateParameters', 'PythonPackageUpdateParameters', @@ -474,19 +473,14 @@ 'ScheduleAssociationProperty', 'ScheduleCreateOrUpdateParameters', 'ScheduleListResult', - 'ScheduleProperties', 'ScheduleUpdateParameters', 'Sku', - 'SoftareUpdateConfigurationRunTaskProperties', - 'SoftareUpdateConfigurationRunTasks', - 'SoftwareUpdateConfiguration', - 'SoftwareUpdateConfigurationCollectionItem', - 'SoftwareUpdateConfigurationListResult', 'SoftwareUpdateConfigurationMachineRun', 'SoftwareUpdateConfigurationMachineRunListResult', 'SoftwareUpdateConfigurationRun', 'SoftwareUpdateConfigurationRunListResult', - 'SoftwareUpdateConfigurationTasks', + 'SoftwareUpdateConfigurationRunTaskProperties', + 'SoftwareUpdateConfigurationRunTasks', 'SourceControl', 'SourceControlCreateOrUpdateParameters', 'SourceControlListResult', @@ -501,15 +495,11 @@ 'SourceControlUpdateParameters', 'Statistics', 'StatisticsListResult', - 'TagSettingsProperties', - 'TargetProperties', - 'TaskProperties', 'TestJob', 'TestJobCreateParameters', 'TrackedResource', 'TypeField', 'TypeFieldListResult', - 'UpdateConfiguration', 'UpdateConfigurationNavigation', 'Usage', 'UsageCounterName', @@ -525,7 +515,6 @@ 'WebhookCreateOrUpdateParameters', 'WebhookListResult', 'WebhookUpdateParameters', - 'WindowsProperties', 'AgentRegistrationKeyName', 'AutomationAccountState', 'AutomationKeyName', @@ -533,15 +522,15 @@ 'ContentSourceType', 'CountType', 'DscConfigurationState', + 'EncryptionKeySourceType', 'GroupTypeEnum', 'HttpStatusCode', 'JobProvisioningState', 'JobStatus', 'JobStreamType', - 'LinuxUpdateClasses', 'ModuleProvisioningState', - 'OperatingSystemType', 'ProvisioningState', + 'ResourceIdentityType', 'RunbookState', 'RunbookTypeEnum', 'ScheduleDay', @@ -550,7 +539,5 @@ 'SourceType', 'StreamType', 'SyncType', - 'TagOperators', 'TokenType', - 'WindowsUpdateClasses', ] 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..b312613de522 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. """ @@ -171,15 +178,6 @@ class JobStreamType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VERBOSE = "Verbose" ANY = "Any" -class LinuxUpdateClasses(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Update classifications included in the software update configuration. - """ - - UNCLASSIFIED = "Unclassified" - CRITICAL = "Critical" - SECURITY = "Security" - OTHER = "Other" - class ModuleProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets the provisioning state of the module. """ @@ -201,13 +199,6 @@ class ModuleProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum CANCELLED = "Cancelled" UPDATING = "Updating" -class OperatingSystemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Target operating system for the software update configuration. - """ - - WINDOWS = "Windows" - LINUX = "Linux" - class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state of the job. """ @@ -216,6 +207,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. """ @@ -288,31 +288,9 @@ class SyncType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PARTIAL_SYNC = "PartialSync" FULL_SYNC = "FullSync" -class TagOperators(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Filter VMs by Any or All specified tags. - """ - - ALL = "All" - ANY = "Any" - class TokenType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The token type. Must be either PersonalAccessToken or Oauth. """ PERSONAL_ACCESS_TOKEN = "PersonalAccessToken" OAUTH = "Oauth" - -class WindowsUpdateClasses(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Update classification included in the software update configuration. A comma separated string - with required values - """ - - UNCLASSIFIED = "Unclassified" - CRITICAL = "Critical" - SECURITY = "Security" - UPDATE_ROLLUP = "UpdateRollup" - FEATURE_PACK = "FeaturePack" - SERVICE_PACK = "ServicePack" - DEFINITION = "Definition" - TOOLS = "Tools" - UPDATES = "Updates" 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 9fb39eec954c..eb6181f421a9 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,35 +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) - - -class AzureQueryProperties(msrest.serialization.Model): - """Azure query for the update configuration. - - :param scope: List of Subscription or Resource Group ARM Ids. - :type scope: list[str] - :param locations: List of locations to scope the query to. - :type locations: list[str] - :param tag_settings: Tag settings for the VM. - :type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties - """ - - _attribute_map = { - 'scope': {'key': 'scope', 'type': '[str]'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureQueryProperties, self).__init__(**kwargs) - self.scope = kwargs.get('scope', None) - self.locations = kwargs.get('locations', None) - self.tag_settings = kwargs.get('tag_settings', None) + self.encryption = kwargs.get('encryption', None) + self.public_network_access = kwargs.get('public_network_access', None) class Certificate(Resource): @@ -755,29 +773,34 @@ def __init__( self.description = kwargs.get('description', None) -class CollectionItemUpdateConfiguration(msrest.serialization.Model): - """object returned when requesting a collection of software update configuration. +class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. - :param azure_virtual_machines: List of azure resource Ids for azure virtual machines targeted - by the software update configuration. - :type azure_virtual_machines: list[str] - :param duration: Maximum time allowed for the software update configuration run. Duration needs - to be specified using the format PT[n]H[n]M[n]S as per ISO8601. - :type duration: ~datetime.timedelta + 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 = { - 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, - 'duration': {'key': 'duration', 'type': 'duration'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CollectionItemUpdateConfiguration, self).__init__(**kwargs) - self.azure_virtual_machines = kwargs.get('azure_virtual_machines', None) - self.duration = kwargs.get('duration', None) + super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None class Connection(Resource): @@ -2280,6 +2303,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: object + """ + + _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. @@ -2444,6 +2516,48 @@ def __init__( self.credential = kwargs.get('credential', None) +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(Resource): """Definition of the job. @@ -2933,6 +3047,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. @@ -2958,38 +3099,6 @@ def __init__( self.id = None -class LinuxProperties(msrest.serialization.Model): - """Linux specific update configuration. - - :param included_package_classifications: Update classifications included in the software update - configuration. Possible values include: "Unclassified", "Critical", "Security", "Other". - :type included_package_classifications: str or ~azure.mgmt.automation.models.LinuxUpdateClasses - :param excluded_package_name_masks: packages excluded from the software update configuration. - :type excluded_package_name_masks: list[str] - :param included_package_name_masks: packages included from the software update configuration. - :type included_package_name_masks: list[str] - :param reboot_setting: Reboot setting for the software update configuration. - :type reboot_setting: str - """ - - _attribute_map = { - 'included_package_classifications': {'key': 'includedPackageClassifications', 'type': 'str'}, - 'excluded_package_name_masks': {'key': 'excludedPackageNameMasks', 'type': '[str]'}, - 'included_package_name_masks': {'key': 'includedPackageNameMasks', 'type': '[str]'}, - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LinuxProperties, self).__init__(**kwargs) - self.included_package_classifications = kwargs.get('included_package_classifications', None) - self.excluded_package_name_masks = kwargs.get('excluded_package_name_masks', None) - self.included_package_name_masks = kwargs.get('included_package_name_masks', None) - self.reboot_setting = kwargs.get('reboot_setting', None) - - class Module(TrackedResource): """Definition of the module type. @@ -3259,29 +3368,6 @@ def __init__( self.total_count = kwargs.get('total_count', None) -class NonAzureQueryProperties(msrest.serialization.Model): - """Non Azure query for the update configuration. - - :param function_alias: Log Analytics Saved Search name. - :type function_alias: str - :param workspace_id: Workspace Id for Log Analytics in which the saved Search is resided. - :type workspace_id: str - """ - - _attribute_map = { - 'function_alias': {'key': 'functionAlias', 'type': 'str'}, - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NonAzureQueryProperties, self).__init__(**kwargs) - self.function_alias = kwargs.get('function_alias', None) - self.workspace_id = kwargs.get('workspace_id', None) - - class Operation(msrest.serialization.Model): """Automation REST API operation. @@ -3351,6 +3437,181 @@ def __init__( self.value = kwargs.get('value', None) +class PrivateEndpointConnection(Resource): + """A private endpoint connection. + + 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 + :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 = { + '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'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + } + + def __init__( + self, + **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(Resource): + """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 ProxyResource(Resource): """ARM proxy resource. @@ -4070,91 +4331,13 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class ScheduleProperties(msrest.serialization.Model): - """Definition of schedule parameters. - - Variables are only populated by the server, and will be ignored when sending a request. +class ScheduleUpdateParameters(msrest.serialization.Model): + """The parameters supplied to the update schedule operation. - :param start_time: Gets or sets the start time of the schedule. - :type start_time: ~datetime.datetime - :ivar start_time_offset_minutes: Gets the start time's offset in minutes. - :vartype start_time_offset_minutes: float - :param expiry_time: Gets or sets the end time of the schedule. - :type expiry_time: ~datetime.datetime - :param expiry_time_offset_minutes: Gets or sets the expiry time's offset in minutes. - :type expiry_time_offset_minutes: float - :param is_enabled: Gets or sets a value indicating whether this schedule is enabled. - :type is_enabled: bool - :param next_run: Gets or sets the next run time of the schedule. - :type next_run: ~datetime.datetime - :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: int - :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 - :param time_zone: Gets or sets the time zone of the schedule. - :type time_zone: str - :param advanced_schedule: Gets or sets the advanced schedule. - :type advanced_schedule: ~azure.mgmt.automation.models.AdvancedSchedule - :param creation_time: Gets or sets the creation time. - :type creation_time: ~datetime.datetime - :param last_modified_time: Gets or sets the last modified time. - :type last_modified_time: ~datetime.datetime - :param description: Gets or sets the description. - :type description: str - """ - - _validation = { - 'start_time_offset_minutes': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'start_time_offset_minutes': {'key': 'startTimeOffsetMinutes', 'type': 'float'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'expiry_time_offset_minutes': {'key': 'expiryTimeOffsetMinutes', 'type': 'float'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'next_run': {'key': 'nextRun', 'type': 'iso-8601'}, - 'next_run_offset_minutes': {'key': 'nextRunOffsetMinutes', 'type': 'float'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'advanced_schedule': {'key': 'advancedSchedule', 'type': 'AdvancedSchedule'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScheduleProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.start_time_offset_minutes = None - self.expiry_time = kwargs.get('expiry_time', None) - self.expiry_time_offset_minutes = kwargs.get('expiry_time_offset_minutes', None) - self.is_enabled = kwargs.get('is_enabled', False) - self.next_run = kwargs.get('next_run', None) - self.next_run_offset_minutes = kwargs.get('next_run_offset_minutes', None) - self.interval = kwargs.get('interval', None) - self.frequency = kwargs.get('frequency', None) - self.time_zone = kwargs.get('time_zone', None) - self.advanced_schedule = kwargs.get('advanced_schedule', None) - self.creation_time = kwargs.get('creation_time', None) - self.last_modified_time = kwargs.get('last_modified_time', None) - self.description = kwargs.get('description', None) - - -class ScheduleUpdateParameters(msrest.serialization.Model): - """The parameters supplied to the update schedule operation. - - :param name: Gets or sets the name of the Schedule. - :type name: str - :param description: Gets or sets the description of the schedule. - :type description: str + :param name: Gets or sets the name of the Schedule. + :type name: str + :param description: Gets or sets the description of the schedule. + :type description: str :param is_enabled: Gets or sets a value indicating whether this schedule is enabled. :type is_enabled: bool """ @@ -4209,222 +4392,6 @@ def __init__( self.capacity = kwargs.get('capacity', None) -class SoftareUpdateConfigurationRunTaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param status: The status of the task. - :type status: str - :param source: The name of the source of the task. - :type source: str - :param job_id: The job id of the task. - :type job_id: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SoftareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.source = kwargs.get('source', None) - self.job_id = kwargs.get('job_id', None) - - -class SoftareUpdateConfigurationRunTasks(msrest.serialization.Model): - """Software update configuration run tasks model. - - :param pre_task: Pre task properties. - :type pre_task: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties - :param post_task: Post task properties. - :type post_task: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties - """ - - _attribute_map = { - 'pre_task': {'key': 'preTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'}, - 'post_task': {'key': 'postTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(SoftareUpdateConfigurationRunTasks, self).__init__(**kwargs) - self.pre_task = kwargs.get('pre_task', None) - self.post_task = kwargs.get('post_task', None) - - -class SoftwareUpdateConfiguration(msrest.serialization.Model): - """Software update configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Resource name. - :vartype name: str - :ivar id: Resource Id. - :vartype id: str - :ivar type: Resource type. - :vartype type: str - :param update_configuration: Required. update specific properties for the Software update - configuration. - :type update_configuration: ~azure.mgmt.automation.models.UpdateConfiguration - :param schedule_info: Required. Schedule information for the Software update configuration. - :type schedule_info: ~azure.mgmt.automation.models.ScheduleProperties - :ivar provisioning_state: Provisioning state for the software update configuration, which only - appears in the response. - :vartype provisioning_state: str - :param error: Details of provisioning error. - :type error: ~azure.mgmt.automation.models.ErrorResponse - :ivar creation_time: Creation time of the resource, which only appears in the response. - :vartype creation_time: ~datetime.datetime - :ivar created_by: CreatedBy property, which only appears in the response. - :vartype created_by: str - :ivar last_modified_time: Last time resource was modified, which only appears in the response. - :vartype last_modified_time: ~datetime.datetime - :ivar last_modified_by: LastModifiedBy property, which only appears in the response. - :vartype last_modified_by: str - :param tasks: Tasks information for the Software update configuration. - :type tasks: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationTasks - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'update_configuration': {'required': True}, - 'schedule_info': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'created_by': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'last_modified_by': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'update_configuration': {'key': 'properties.updateConfiguration', 'type': 'UpdateConfiguration'}, - 'schedule_info': {'key': 'properties.scheduleInfo', 'type': 'ScheduleProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'ErrorResponse'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationTasks'}, - } - - def __init__( - self, - **kwargs - ): - super(SoftwareUpdateConfiguration, self).__init__(**kwargs) - self.name = None - self.id = None - self.type = None - self.update_configuration = kwargs['update_configuration'] - self.schedule_info = kwargs['schedule_info'] - self.provisioning_state = None - self.error = kwargs.get('error', None) - self.creation_time = None - self.created_by = None - self.last_modified_time = None - self.last_modified_by = None - self.tasks = kwargs.get('tasks', None) - - -class SoftwareUpdateConfigurationCollectionItem(msrest.serialization.Model): - """Software update configuration collection item properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the software update configuration. - :vartype name: str - :ivar id: Resource Id of the software update configuration. - :vartype id: str - :param update_configuration: Update specific properties of the software update configuration. - :type update_configuration: ~azure.mgmt.automation.models.CollectionItemUpdateConfiguration - :param frequency: execution frequency of the schedule associated with the software update - configuration. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". - :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency - :param start_time: the start time of the update. - :type start_time: ~datetime.datetime - :ivar creation_time: Creation time of the software update configuration, which only appears in - the response. - :vartype creation_time: ~datetime.datetime - :ivar last_modified_time: Last time software update configuration was modified, which only - appears in the response. - :vartype last_modified_time: ~datetime.datetime - :ivar provisioning_state: Provisioning state for the software update configuration, which only - appears in the response. - :vartype provisioning_state: str - :param next_run: ext run time of the update. - :type next_run: ~datetime.datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'update_configuration': {'key': 'properties.updateConfiguration', 'type': 'CollectionItemUpdateConfiguration'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'next_run': {'key': 'properties.nextRun', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(SoftwareUpdateConfigurationCollectionItem, self).__init__(**kwargs) - self.name = None - self.id = None - self.update_configuration = kwargs.get('update_configuration', None) - self.frequency = kwargs.get('frequency', None) - self.start_time = kwargs.get('start_time', None) - self.creation_time = None - self.last_modified_time = None - self.provisioning_state = None - self.next_run = kwargs.get('next_run', None) - - -class SoftwareUpdateConfigurationListResult(msrest.serialization.Model): - """result of listing all software update configuration. - - :param value: outer object returned when listing all software update configurations. - :type value: list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationCollectionItem] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationCollectionItem]'}, - } - - def __init__( - self, - **kwargs - ): - super(SoftwareUpdateConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - class SoftwareUpdateConfigurationMachineRun(msrest.serialization.Model): """Software update configuration machine run model. @@ -4592,7 +4559,7 @@ class SoftwareUpdateConfigurationRun(msrest.serialization.Model): :ivar last_modified_by: LastModifiedBy property, which only appears in the response. :vartype last_modified_by: str :param tasks: Software update configuration tasks triggered in this run. - :type tasks: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTasks + :type tasks: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTasks """ _validation = { @@ -4626,7 +4593,7 @@ class SoftwareUpdateConfigurationRun(msrest.serialization.Model): 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'tasks': {'key': 'properties.tasks', 'type': 'SoftareUpdateConfigurationRunTasks'}, + 'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationRunTasks'}, } def __init__( @@ -4674,25 +4641,52 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class SoftwareUpdateConfigurationTasks(msrest.serialization.Model): +class SoftwareUpdateConfigurationRunTaskProperties(msrest.serialization.Model): """Task properties of the software update configuration. + :param status: The status of the task. + :type status: str + :param source: The name of the source of the task. + :type source: str + :param job_id: The job id of the task. + :type job_id: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SoftwareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.source = kwargs.get('source', None) + self.job_id = kwargs.get('job_id', None) + + +class SoftwareUpdateConfigurationRunTasks(msrest.serialization.Model): + """Software update configuration run tasks model. + :param pre_task: Pre task properties. - :type pre_task: ~azure.mgmt.automation.models.TaskProperties + :type pre_task: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTaskProperties :param post_task: Post task properties. - :type post_task: ~azure.mgmt.automation.models.TaskProperties + :type post_task: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTaskProperties """ _attribute_map = { - 'pre_task': {'key': 'preTask', 'type': 'TaskProperties'}, - 'post_task': {'key': 'postTask', 'type': 'TaskProperties'}, + 'pre_task': {'key': 'preTask', 'type': 'SoftwareUpdateConfigurationRunTaskProperties'}, + 'post_task': {'key': 'postTask', 'type': 'SoftwareUpdateConfigurationRunTaskProperties'}, } def __init__( self, **kwargs ): - super(SoftwareUpdateConfigurationTasks, self).__init__(**kwargs) + super(SoftwareUpdateConfigurationRunTasks, self).__init__(**kwargs) self.pre_task = kwargs.get('pre_task', None) self.post_task = kwargs.get('post_task', None) @@ -5273,76 +5267,6 @@ def __init__( self.value = kwargs.get('value', None) -class TagSettingsProperties(msrest.serialization.Model): - """Tag filter information for the VM. - - :param tags: A set of tags. Dictionary of tags with its list of values. - :type tags: dict[str, list[str]] - :param filter_operator: Filter VMs by Any or All specified tags. Possible values include: - "All", "Any". - :type filter_operator: str or ~azure.mgmt.automation.models.TagOperators - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{[str]}'}, - 'filter_operator': {'key': 'filterOperator', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TagSettingsProperties, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.filter_operator = kwargs.get('filter_operator', None) - - -class TargetProperties(msrest.serialization.Model): - """Group specific to the update configuration. - - :param azure_queries: List of Azure queries in the software update configuration. - :type azure_queries: list[~azure.mgmt.automation.models.AzureQueryProperties] - :param non_azure_queries: List of non Azure queries in the software update configuration. - :type non_azure_queries: list[~azure.mgmt.automation.models.NonAzureQueryProperties] - """ - - _attribute_map = { - 'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'}, - 'non_azure_queries': {'key': 'nonAzureQueries', 'type': '[NonAzureQueryProperties]'}, - } - - def __init__( - self, - **kwargs - ): - super(TargetProperties, self).__init__(**kwargs) - self.azure_queries = kwargs.get('azure_queries', None) - self.non_azure_queries = kwargs.get('non_azure_queries', None) - - -class TaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param parameters: Gets or sets the parameters of the task. - :type parameters: dict[str, str] - :param source: Gets or sets the name of the runbook. - :type source: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'source': {'key': 'source', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TaskProperties, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.source = kwargs.get('source', None) - - class TestJob(msrest.serialization.Model): """Definition of the test job. @@ -5469,59 +5393,6 @@ def __init__( self.value = kwargs.get('value', None) -class UpdateConfiguration(msrest.serialization.Model): - """Update specific properties of the software update configuration. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. operating system of target machines. Possible values - include: "Windows", "Linux". - :type operating_system: str or ~azure.mgmt.automation.models.OperatingSystemType - :param windows: Windows specific update configuration. - :type windows: ~azure.mgmt.automation.models.WindowsProperties - :param linux: Linux specific update configuration. - :type linux: ~azure.mgmt.automation.models.LinuxProperties - :param duration: Maximum time allowed for the software update configuration run. Duration needs - to be specified using the format PT[n]H[n]M[n]S as per ISO8601. - :type duration: ~datetime.timedelta - :param azure_virtual_machines: List of azure resource Ids for azure virtual machines targeted - by the software update configuration. - :type azure_virtual_machines: list[str] - :param non_azure_computer_names: List of names of non-azure machines targeted by the software - update configuration. - :type non_azure_computer_names: list[str] - :param targets: Group targets for the software update configuration. - :type targets: ~azure.mgmt.automation.models.TargetProperties - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'str'}, - 'windows': {'key': 'windows', 'type': 'WindowsProperties'}, - 'linux': {'key': 'linux', 'type': 'LinuxProperties'}, - 'duration': {'key': 'duration', 'type': 'duration'}, - 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, - 'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'}, - 'targets': {'key': 'targets', 'type': 'TargetProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(UpdateConfiguration, self).__init__(**kwargs) - self.operating_system = kwargs['operating_system'] - self.windows = kwargs.get('windows', None) - self.linux = kwargs.get('linux', None) - self.duration = kwargs.get('duration', None) - self.azure_virtual_machines = kwargs.get('azure_virtual_machines', None) - self.non_azure_computer_names = kwargs.get('non_azure_computer_names', None) - self.targets = kwargs.get('targets', None) - - class UpdateConfigurationNavigation(msrest.serialization.Model): """Software update configuration Run Navigation model. @@ -5768,7 +5639,7 @@ def __init__( self.description = kwargs.get('description', None) -class Watcher(TrackedResource): +class Watcher(Resource): """Definition of the watcher type. Variables are only populated by the server, and will be ignored when sending a request. @@ -5779,12 +5650,12 @@ class Watcher(TrackedResource): :vartype name: str :ivar type: The type of the resource. :vartype type: str + :param etag: Gets or sets the etag of the resource. + :type etag: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param location: The Azure Region where the resource lives. + :param location: The geo-location where the resource lives. :type location: str - :param etag: Gets or sets the etag of the resource. - :type etag: str :param execution_frequency_in_seconds: Gets or sets the frequency at which the watcher is invoked. :type execution_frequency_in_seconds: long @@ -5821,9 +5692,9 @@ class Watcher(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, 'execution_frequency_in_seconds': {'key': 'properties.executionFrequencyInSeconds', 'type': 'long'}, 'script_name': {'key': 'properties.scriptName', 'type': 'str'}, 'script_parameters': {'key': 'properties.scriptParameters', 'type': '{str}'}, @@ -5841,6 +5712,8 @@ def __init__( ): super(Watcher, self).__init__(**kwargs) self.etag = kwargs.get('etag', None) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) self.execution_frequency_in_seconds = kwargs.get('execution_frequency_in_seconds', None) self.script_name = kwargs.get('script_name', None) self.script_parameters = kwargs.get('script_parameters', None) @@ -6081,38 +5954,3 @@ def __init__( self.run_on = kwargs.get('run_on', None) self.parameters = kwargs.get('parameters', None) self.description = kwargs.get('description', None) - - -class WindowsProperties(msrest.serialization.Model): - """Windows specific update configuration. - - :param included_update_classifications: Update classification included in the software update - configuration. A comma separated string with required values. Possible values include: - "Unclassified", "Critical", "Security", "UpdateRollup", "FeaturePack", "ServicePack", - "Definition", "Tools", "Updates". - :type included_update_classifications: str or - ~azure.mgmt.automation.models.WindowsUpdateClasses - :param excluded_kb_numbers: KB numbers excluded from the software update configuration. - :type excluded_kb_numbers: list[str] - :param included_kb_numbers: KB numbers included from the software update configuration. - :type included_kb_numbers: list[str] - :param reboot_setting: Reboot setting for the software update configuration. - :type reboot_setting: str - """ - - _attribute_map = { - 'included_update_classifications': {'key': 'includedUpdateClassifications', 'type': 'str'}, - 'excluded_kb_numbers': {'key': 'excludedKbNumbers', 'type': '[str]'}, - 'included_kb_numbers': {'key': 'includedKbNumbers', 'type': '[str]'}, - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WindowsProperties, self).__init__(**kwargs) - self.included_update_classifications = kwargs.get('included_update_classifications', None) - self.excluded_kb_numbers = kwargs.get('excluded_kb_numbers', None) - self.included_kb_numbers = kwargs.get('included_kb_numbers', None) - self.reboot_setting = kwargs.get('reboot_setting', None) 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 76963e6b4fde..10b8f072da4f 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 @@ -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,46 +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 - - -class AzureQueryProperties(msrest.serialization.Model): - """Azure query for the update configuration. - - :param scope: List of Subscription or Resource Group ARM Ids. - :type scope: list[str] - :param locations: List of locations to scope the query to. - :type locations: list[str] - :param tag_settings: Tag settings for the VM. - :type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties - """ - - _attribute_map = { - 'scope': {'key': 'scope', 'type': '[str]'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'}, - } - - def __init__( - self, - *, - scope: Optional[List[str]] = None, - locations: Optional[List[str]] = None, - tag_settings: Optional["TagSettingsProperties"] = None, - **kwargs - ): - super(AzureQueryProperties, self).__init__(**kwargs) - self.scope = scope - self.locations = locations - self.tag_settings = tag_settings + self.encryption = encryption + self.public_network_access = public_network_access class Certificate(Resource): @@ -848,32 +872,34 @@ def __init__( self.description = description -class CollectionItemUpdateConfiguration(msrest.serialization.Model): - """object returned when requesting a collection of software update configuration. +class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. - :param azure_virtual_machines: List of azure resource Ids for azure virtual machines targeted - by the software update configuration. - :type azure_virtual_machines: list[str] - :param duration: Maximum time allowed for the software update configuration run. Duration needs - to be specified using the format PT[n]H[n]M[n]S as per ISO8601. - :type duration: ~datetime.timedelta + :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 = { - 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, - 'duration': {'key': 'duration', 'type': 'duration'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, - *, - azure_virtual_machines: Optional[List[str]] = None, - duration: Optional[datetime.timedelta] = None, **kwargs ): - super(CollectionItemUpdateConfiguration, self).__init__(**kwargs) - self.azure_virtual_machines = azure_virtual_machines - self.duration = duration + super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None class Connection(Resource): @@ -2580,6 +2606,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: object + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'object'}, + } + + def __init__( + self, + *, + user_assigned_identity: Optional[object] = 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. @@ -2767,6 +2848,51 @@ def __init__( self.credential = credential +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(Resource): """Definition of the job. @@ -3306,6 +3432,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. @@ -3331,43 +3488,6 @@ def __init__( self.id = None -class LinuxProperties(msrest.serialization.Model): - """Linux specific update configuration. - - :param included_package_classifications: Update classifications included in the software update - configuration. Possible values include: "Unclassified", "Critical", "Security", "Other". - :type included_package_classifications: str or ~azure.mgmt.automation.models.LinuxUpdateClasses - :param excluded_package_name_masks: packages excluded from the software update configuration. - :type excluded_package_name_masks: list[str] - :param included_package_name_masks: packages included from the software update configuration. - :type included_package_name_masks: list[str] - :param reboot_setting: Reboot setting for the software update configuration. - :type reboot_setting: str - """ - - _attribute_map = { - 'included_package_classifications': {'key': 'includedPackageClassifications', 'type': 'str'}, - 'excluded_package_name_masks': {'key': 'excludedPackageNameMasks', 'type': '[str]'}, - 'included_package_name_masks': {'key': 'includedPackageNameMasks', 'type': '[str]'}, - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - } - - def __init__( - self, - *, - included_package_classifications: Optional[Union[str, "LinuxUpdateClasses"]] = None, - excluded_package_name_masks: Optional[List[str]] = None, - included_package_name_masks: Optional[List[str]] = None, - reboot_setting: Optional[str] = None, - **kwargs - ): - super(LinuxProperties, self).__init__(**kwargs) - self.included_package_classifications = included_package_classifications - self.excluded_package_name_masks = excluded_package_name_masks - self.included_package_name_masks = included_package_name_masks - self.reboot_setting = reboot_setting - - class Module(TrackedResource): """Definition of the module type. @@ -3676,32 +3796,6 @@ def __init__( self.total_count = total_count -class NonAzureQueryProperties(msrest.serialization.Model): - """Non Azure query for the update configuration. - - :param function_alias: Log Analytics Saved Search name. - :type function_alias: str - :param workspace_id: Workspace Id for Log Analytics in which the saved Search is resided. - :type workspace_id: str - """ - - _attribute_map = { - 'function_alias': {'key': 'functionAlias', 'type': 'str'}, - 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, - } - - def __init__( - self, - *, - function_alias: Optional[str] = None, - workspace_id: Optional[str] = None, - **kwargs - ): - super(NonAzureQueryProperties, self).__init__(**kwargs) - self.function_alias = function_alias - self.workspace_id = workspace_id - - class Operation(msrest.serialization.Model): """Automation REST API operation. @@ -3780,6 +3874,193 @@ def __init__( self.value = value +class PrivateEndpointConnection(Resource): + """A private endpoint connection. + + 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 + :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 = { + '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'}, + '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(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(Resource): + """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 ProxyResource(Resource): """ARM proxy resource. @@ -4600,105 +4881,13 @@ def __init__( self.next_link = next_link -class ScheduleProperties(msrest.serialization.Model): - """Definition of schedule parameters. - - Variables are only populated by the server, and will be ignored when sending a request. +class ScheduleUpdateParameters(msrest.serialization.Model): + """The parameters supplied to the update schedule operation. - :param start_time: Gets or sets the start time of the schedule. - :type start_time: ~datetime.datetime - :ivar start_time_offset_minutes: Gets the start time's offset in minutes. - :vartype start_time_offset_minutes: float - :param expiry_time: Gets or sets the end time of the schedule. - :type expiry_time: ~datetime.datetime - :param expiry_time_offset_minutes: Gets or sets the expiry time's offset in minutes. - :type expiry_time_offset_minutes: float - :param is_enabled: Gets or sets a value indicating whether this schedule is enabled. - :type is_enabled: bool - :param next_run: Gets or sets the next run time of the schedule. - :type next_run: ~datetime.datetime - :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: int - :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 - :param time_zone: Gets or sets the time zone of the schedule. - :type time_zone: str - :param advanced_schedule: Gets or sets the advanced schedule. - :type advanced_schedule: ~azure.mgmt.automation.models.AdvancedSchedule - :param creation_time: Gets or sets the creation time. - :type creation_time: ~datetime.datetime - :param last_modified_time: Gets or sets the last modified time. - :type last_modified_time: ~datetime.datetime - :param description: Gets or sets the description. - :type description: str - """ - - _validation = { - 'start_time_offset_minutes': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'start_time_offset_minutes': {'key': 'startTimeOffsetMinutes', 'type': 'float'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'expiry_time_offset_minutes': {'key': 'expiryTimeOffsetMinutes', 'type': 'float'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'next_run': {'key': 'nextRun', 'type': 'iso-8601'}, - 'next_run_offset_minutes': {'key': 'nextRunOffsetMinutes', 'type': 'float'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'advanced_schedule': {'key': 'advancedSchedule', 'type': 'AdvancedSchedule'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - expiry_time: Optional[datetime.datetime] = None, - expiry_time_offset_minutes: Optional[float] = None, - is_enabled: Optional[bool] = False, - next_run: Optional[datetime.datetime] = None, - next_run_offset_minutes: Optional[float] = None, - interval: Optional[int] = None, - frequency: Optional[Union[str, "ScheduleFrequency"]] = None, - time_zone: Optional[str] = None, - advanced_schedule: Optional["AdvancedSchedule"] = None, - creation_time: Optional[datetime.datetime] = None, - last_modified_time: Optional[datetime.datetime] = None, - description: Optional[str] = None, - **kwargs - ): - super(ScheduleProperties, self).__init__(**kwargs) - self.start_time = start_time - self.start_time_offset_minutes = None - self.expiry_time = expiry_time - self.expiry_time_offset_minutes = expiry_time_offset_minutes - self.is_enabled = is_enabled - self.next_run = next_run - self.next_run_offset_minutes = next_run_offset_minutes - self.interval = interval - self.frequency = frequency - self.time_zone = time_zone - self.advanced_schedule = advanced_schedule - self.creation_time = creation_time - self.last_modified_time = last_modified_time - self.description = description - - -class ScheduleUpdateParameters(msrest.serialization.Model): - """The parameters supplied to the update schedule operation. - - :param name: Gets or sets the name of the Schedule. - :type name: str - :param description: Gets or sets the description of the schedule. - :type description: str + :param name: Gets or sets the name of the Schedule. + :type name: str + :param description: Gets or sets the description of the schedule. + :type description: str :param is_enabled: Gets or sets a value indicating whether this schedule is enabled. :type is_enabled: bool """ @@ -4761,241 +4950,6 @@ def __init__( self.capacity = capacity -class SoftareUpdateConfigurationRunTaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param status: The status of the task. - :type status: str - :param source: The name of the source of the task. - :type source: str - :param job_id: The job id of the task. - :type job_id: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[str] = None, - source: Optional[str] = None, - job_id: Optional[str] = None, - **kwargs - ): - super(SoftareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs) - self.status = status - self.source = source - self.job_id = job_id - - -class SoftareUpdateConfigurationRunTasks(msrest.serialization.Model): - """Software update configuration run tasks model. - - :param pre_task: Pre task properties. - :type pre_task: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties - :param post_task: Post task properties. - :type post_task: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties - """ - - _attribute_map = { - 'pre_task': {'key': 'preTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'}, - 'post_task': {'key': 'postTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'}, - } - - def __init__( - self, - *, - pre_task: Optional["SoftareUpdateConfigurationRunTaskProperties"] = None, - post_task: Optional["SoftareUpdateConfigurationRunTaskProperties"] = None, - **kwargs - ): - super(SoftareUpdateConfigurationRunTasks, self).__init__(**kwargs) - self.pre_task = pre_task - self.post_task = post_task - - -class SoftwareUpdateConfiguration(msrest.serialization.Model): - """Software update configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Resource name. - :vartype name: str - :ivar id: Resource Id. - :vartype id: str - :ivar type: Resource type. - :vartype type: str - :param update_configuration: Required. update specific properties for the Software update - configuration. - :type update_configuration: ~azure.mgmt.automation.models.UpdateConfiguration - :param schedule_info: Required. Schedule information for the Software update configuration. - :type schedule_info: ~azure.mgmt.automation.models.ScheduleProperties - :ivar provisioning_state: Provisioning state for the software update configuration, which only - appears in the response. - :vartype provisioning_state: str - :param error: Details of provisioning error. - :type error: ~azure.mgmt.automation.models.ErrorResponse - :ivar creation_time: Creation time of the resource, which only appears in the response. - :vartype creation_time: ~datetime.datetime - :ivar created_by: CreatedBy property, which only appears in the response. - :vartype created_by: str - :ivar last_modified_time: Last time resource was modified, which only appears in the response. - :vartype last_modified_time: ~datetime.datetime - :ivar last_modified_by: LastModifiedBy property, which only appears in the response. - :vartype last_modified_by: str - :param tasks: Tasks information for the Software update configuration. - :type tasks: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationTasks - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'update_configuration': {'required': True}, - 'schedule_info': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'created_by': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'last_modified_by': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'update_configuration': {'key': 'properties.updateConfiguration', 'type': 'UpdateConfiguration'}, - 'schedule_info': {'key': 'properties.scheduleInfo', 'type': 'ScheduleProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'ErrorResponse'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationTasks'}, - } - - def __init__( - self, - *, - update_configuration: "UpdateConfiguration", - schedule_info: "ScheduleProperties", - error: Optional["ErrorResponse"] = None, - tasks: Optional["SoftwareUpdateConfigurationTasks"] = None, - **kwargs - ): - super(SoftwareUpdateConfiguration, self).__init__(**kwargs) - self.name = None - self.id = None - self.type = None - self.update_configuration = update_configuration - self.schedule_info = schedule_info - self.provisioning_state = None - self.error = error - self.creation_time = None - self.created_by = None - self.last_modified_time = None - self.last_modified_by = None - self.tasks = tasks - - -class SoftwareUpdateConfigurationCollectionItem(msrest.serialization.Model): - """Software update configuration collection item properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the software update configuration. - :vartype name: str - :ivar id: Resource Id of the software update configuration. - :vartype id: str - :param update_configuration: Update specific properties of the software update configuration. - :type update_configuration: ~azure.mgmt.automation.models.CollectionItemUpdateConfiguration - :param frequency: execution frequency of the schedule associated with the software update - configuration. Possible values include: "OneTime", "Day", "Hour", "Week", "Month", "Minute". - :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency - :param start_time: the start time of the update. - :type start_time: ~datetime.datetime - :ivar creation_time: Creation time of the software update configuration, which only appears in - the response. - :vartype creation_time: ~datetime.datetime - :ivar last_modified_time: Last time software update configuration was modified, which only - appears in the response. - :vartype last_modified_time: ~datetime.datetime - :ivar provisioning_state: Provisioning state for the software update configuration, which only - appears in the response. - :vartype provisioning_state: str - :param next_run: ext run time of the update. - :type next_run: ~datetime.datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'update_configuration': {'key': 'properties.updateConfiguration', 'type': 'CollectionItemUpdateConfiguration'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'next_run': {'key': 'properties.nextRun', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - update_configuration: Optional["CollectionItemUpdateConfiguration"] = None, - frequency: Optional[Union[str, "ScheduleFrequency"]] = None, - start_time: Optional[datetime.datetime] = None, - next_run: Optional[datetime.datetime] = None, - **kwargs - ): - super(SoftwareUpdateConfigurationCollectionItem, self).__init__(**kwargs) - self.name = None - self.id = None - self.update_configuration = update_configuration - self.frequency = frequency - self.start_time = start_time - self.creation_time = None - self.last_modified_time = None - self.provisioning_state = None - self.next_run = next_run - - -class SoftwareUpdateConfigurationListResult(msrest.serialization.Model): - """result of listing all software update configuration. - - :param value: outer object returned when listing all software update configurations. - :type value: list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationCollectionItem] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationCollectionItem]'}, - } - - def __init__( - self, - *, - value: Optional[List["SoftwareUpdateConfigurationCollectionItem"]] = None, - **kwargs - ): - super(SoftwareUpdateConfigurationListResult, self).__init__(**kwargs) - self.value = value - - class SoftwareUpdateConfigurationMachineRun(msrest.serialization.Model): """Software update configuration machine run model. @@ -5170,7 +5124,7 @@ class SoftwareUpdateConfigurationRun(msrest.serialization.Model): :ivar last_modified_by: LastModifiedBy property, which only appears in the response. :vartype last_modified_by: str :param tasks: Software update configuration tasks triggered in this run. - :type tasks: ~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTasks + :type tasks: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTasks """ _validation = { @@ -5204,14 +5158,14 @@ class SoftwareUpdateConfigurationRun(msrest.serialization.Model): 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'tasks': {'key': 'properties.tasks', 'type': 'SoftareUpdateConfigurationRunTasks'}, + 'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationRunTasks'}, } def __init__( self, *, software_update_configuration: Optional["UpdateConfigurationNavigation"] = None, - tasks: Optional["SoftareUpdateConfigurationRunTasks"] = None, + tasks: Optional["SoftwareUpdateConfigurationRunTasks"] = None, **kwargs ): super(SoftwareUpdateConfigurationRun, self).__init__(**kwargs) @@ -5258,28 +5212,59 @@ def __init__( self.next_link = next_link -class SoftwareUpdateConfigurationTasks(msrest.serialization.Model): +class SoftwareUpdateConfigurationRunTaskProperties(msrest.serialization.Model): """Task properties of the software update configuration. + :param status: The status of the task. + :type status: str + :param source: The name of the source of the task. + :type source: str + :param job_id: The job id of the task. + :type job_id: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + source: Optional[str] = None, + job_id: Optional[str] = None, + **kwargs + ): + super(SoftwareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs) + self.status = status + self.source = source + self.job_id = job_id + + +class SoftwareUpdateConfigurationRunTasks(msrest.serialization.Model): + """Software update configuration run tasks model. + :param pre_task: Pre task properties. - :type pre_task: ~azure.mgmt.automation.models.TaskProperties + :type pre_task: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTaskProperties :param post_task: Post task properties. - :type post_task: ~azure.mgmt.automation.models.TaskProperties + :type post_task: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTaskProperties """ _attribute_map = { - 'pre_task': {'key': 'preTask', 'type': 'TaskProperties'}, - 'post_task': {'key': 'postTask', 'type': 'TaskProperties'}, + 'pre_task': {'key': 'preTask', 'type': 'SoftwareUpdateConfigurationRunTaskProperties'}, + 'post_task': {'key': 'postTask', 'type': 'SoftwareUpdateConfigurationRunTaskProperties'}, } def __init__( self, *, - pre_task: Optional["TaskProperties"] = None, - post_task: Optional["TaskProperties"] = None, + pre_task: Optional["SoftwareUpdateConfigurationRunTaskProperties"] = None, + post_task: Optional["SoftwareUpdateConfigurationRunTaskProperties"] = None, **kwargs ): - super(SoftwareUpdateConfigurationTasks, self).__init__(**kwargs) + super(SoftwareUpdateConfigurationRunTasks, self).__init__(**kwargs) self.pre_task = pre_task self.post_task = post_task @@ -5922,85 +5907,6 @@ def __init__( self.value = value -class TagSettingsProperties(msrest.serialization.Model): - """Tag filter information for the VM. - - :param tags: A set of tags. Dictionary of tags with its list of values. - :type tags: dict[str, list[str]] - :param filter_operator: Filter VMs by Any or All specified tags. Possible values include: - "All", "Any". - :type filter_operator: str or ~azure.mgmt.automation.models.TagOperators - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{[str]}'}, - 'filter_operator': {'key': 'filterOperator', 'type': 'str'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, List[str]]] = None, - filter_operator: Optional[Union[str, "TagOperators"]] = None, - **kwargs - ): - super(TagSettingsProperties, self).__init__(**kwargs) - self.tags = tags - self.filter_operator = filter_operator - - -class TargetProperties(msrest.serialization.Model): - """Group specific to the update configuration. - - :param azure_queries: List of Azure queries in the software update configuration. - :type azure_queries: list[~azure.mgmt.automation.models.AzureQueryProperties] - :param non_azure_queries: List of non Azure queries in the software update configuration. - :type non_azure_queries: list[~azure.mgmt.automation.models.NonAzureQueryProperties] - """ - - _attribute_map = { - 'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'}, - 'non_azure_queries': {'key': 'nonAzureQueries', 'type': '[NonAzureQueryProperties]'}, - } - - def __init__( - self, - *, - azure_queries: Optional[List["AzureQueryProperties"]] = None, - non_azure_queries: Optional[List["NonAzureQueryProperties"]] = None, - **kwargs - ): - super(TargetProperties, self).__init__(**kwargs) - self.azure_queries = azure_queries - self.non_azure_queries = non_azure_queries - - -class TaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param parameters: Gets or sets the parameters of the task. - :type parameters: dict[str, str] - :param source: Gets or sets the name of the runbook. - :type source: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'source': {'key': 'source', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional[Dict[str, str]] = None, - source: Optional[str] = None, - **kwargs - ): - super(TaskProperties, self).__init__(**kwargs) - self.parameters = parameters - self.source = source - - class TestJob(msrest.serialization.Model): """Definition of the test job. @@ -6147,67 +6053,6 @@ def __init__( self.value = value -class UpdateConfiguration(msrest.serialization.Model): - """Update specific properties of the software update configuration. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. operating system of target machines. Possible values - include: "Windows", "Linux". - :type operating_system: str or ~azure.mgmt.automation.models.OperatingSystemType - :param windows: Windows specific update configuration. - :type windows: ~azure.mgmt.automation.models.WindowsProperties - :param linux: Linux specific update configuration. - :type linux: ~azure.mgmt.automation.models.LinuxProperties - :param duration: Maximum time allowed for the software update configuration run. Duration needs - to be specified using the format PT[n]H[n]M[n]S as per ISO8601. - :type duration: ~datetime.timedelta - :param azure_virtual_machines: List of azure resource Ids for azure virtual machines targeted - by the software update configuration. - :type azure_virtual_machines: list[str] - :param non_azure_computer_names: List of names of non-azure machines targeted by the software - update configuration. - :type non_azure_computer_names: list[str] - :param targets: Group targets for the software update configuration. - :type targets: ~azure.mgmt.automation.models.TargetProperties - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'str'}, - 'windows': {'key': 'windows', 'type': 'WindowsProperties'}, - 'linux': {'key': 'linux', 'type': 'LinuxProperties'}, - 'duration': {'key': 'duration', 'type': 'duration'}, - 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, - 'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'}, - 'targets': {'key': 'targets', 'type': 'TargetProperties'}, - } - - def __init__( - self, - *, - operating_system: Union[str, "OperatingSystemType"], - windows: Optional["WindowsProperties"] = None, - linux: Optional["LinuxProperties"] = None, - duration: Optional[datetime.timedelta] = None, - azure_virtual_machines: Optional[List[str]] = None, - non_azure_computer_names: Optional[List[str]] = None, - targets: Optional["TargetProperties"] = None, - **kwargs - ): - super(UpdateConfiguration, self).__init__(**kwargs) - self.operating_system = operating_system - self.windows = windows - self.linux = linux - self.duration = duration - self.azure_virtual_machines = azure_virtual_machines - self.non_azure_computer_names = non_azure_computer_names - self.targets = targets - - class UpdateConfigurationNavigation(msrest.serialization.Model): """Software update configuration Run Navigation model. @@ -6484,7 +6329,7 @@ def __init__( self.description = description -class Watcher(TrackedResource): +class Watcher(Resource): """Definition of the watcher type. Variables are only populated by the server, and will be ignored when sending a request. @@ -6495,12 +6340,12 @@ class Watcher(TrackedResource): :vartype name: str :ivar type: The type of the resource. :vartype type: str + :param etag: Gets or sets the etag of the resource. + :type etag: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param location: The Azure Region where the resource lives. + :param location: The geo-location where the resource lives. :type location: str - :param etag: Gets or sets the etag of the resource. - :type etag: str :param execution_frequency_in_seconds: Gets or sets the frequency at which the watcher is invoked. :type execution_frequency_in_seconds: long @@ -6537,9 +6382,9 @@ class Watcher(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, 'execution_frequency_in_seconds': {'key': 'properties.executionFrequencyInSeconds', 'type': 'long'}, 'script_name': {'key': 'properties.scriptName', 'type': 'str'}, 'script_parameters': {'key': 'properties.scriptParameters', 'type': '{str}'}, @@ -6554,9 +6399,9 @@ class Watcher(TrackedResource): def __init__( self, *, + etag: Optional[str] = None, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, - etag: Optional[str] = None, execution_frequency_in_seconds: Optional[int] = None, script_name: Optional[str] = None, script_parameters: Optional[Dict[str, str]] = None, @@ -6564,8 +6409,10 @@ def __init__( description: Optional[str] = None, **kwargs ): - super(Watcher, self).__init__(tags=tags, location=location, **kwargs) + super(Watcher, self).__init__(**kwargs) self.etag = etag + self.tags = tags + self.location = location self.execution_frequency_in_seconds = execution_frequency_in_seconds self.script_name = script_name self.script_parameters = script_parameters @@ -6841,43 +6688,3 @@ def __init__( self.run_on = run_on self.parameters = parameters self.description = description - - -class WindowsProperties(msrest.serialization.Model): - """Windows specific update configuration. - - :param included_update_classifications: Update classification included in the software update - configuration. A comma separated string with required values. Possible values include: - "Unclassified", "Critical", "Security", "UpdateRollup", "FeaturePack", "ServicePack", - "Definition", "Tools", "Updates". - :type included_update_classifications: str or - ~azure.mgmt.automation.models.WindowsUpdateClasses - :param excluded_kb_numbers: KB numbers excluded from the software update configuration. - :type excluded_kb_numbers: list[str] - :param included_kb_numbers: KB numbers included from the software update configuration. - :type included_kb_numbers: list[str] - :param reboot_setting: Reboot setting for the software update configuration. - :type reboot_setting: str - """ - - _attribute_map = { - 'included_update_classifications': {'key': 'includedUpdateClassifications', 'type': 'str'}, - 'excluded_kb_numbers': {'key': 'excludedKbNumbers', 'type': '[str]'}, - 'included_kb_numbers': {'key': 'includedKbNumbers', 'type': '[str]'}, - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - } - - def __init__( - self, - *, - included_update_classifications: Optional[Union[str, "WindowsUpdateClasses"]] = None, - excluded_kb_numbers: Optional[List[str]] = None, - included_kb_numbers: Optional[List[str]] = None, - reboot_setting: Optional[str] = None, - **kwargs - ): - super(WindowsProperties, self).__init__(**kwargs) - self.included_update_classifications = included_update_classifications - self.excluded_kb_numbers = excluded_kb_numbers - self.included_kb_numbers = included_kb_numbers - self.reboot_setting = reboot_setting 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 0229a60f1273..b8f405230865 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,8 +6,20 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +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 ._node_count_information_operations import NodeCountInformationOperations +from ._source_control_operations import SourceControlOperations +from ._source_control_sync_job_operations import SourceControlSyncJobOperations +from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations from ._automation_account_operations import AutomationAccountOperations -from ._operations import Operations from ._statistics_operations import StatisticsOperations from ._usages_operations import UsagesOperations from ._keys_operations import KeysOperations @@ -15,7 +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 ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations from ._job_schedule_operations import JobScheduleOperations from ._linked_workspace_operations import LinkedWorkspaceOperations @@ -25,32 +36,34 @@ from ._fields_operations import FieldsOperations from ._schedule_operations import ScheduleOperations from ._variable_operations import VariableOperations -from ._webhook_operations import WebhookOperations from ._watcher_operations import WatcherOperations -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 ._source_control_operations import SourceControlOperations -from ._source_control_sync_job_operations import SourceControlSyncJobOperations -from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations +from ._dsc_configuration_operations import DscConfigurationOperations from ._job_operations import JobOperations from ._job_stream_operations import JobStreamOperations -from ._agent_registration_information_operations import AgentRegistrationInformationOperations -from ._dsc_node_operations import DscNodeOperations -from ._node_reports_operations import NodeReportsOperations -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 ._operations import Operations 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 ._python2_package_operations import Python2PackageOperations +from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations +from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations +from ._webhook_operations import WebhookOperations __all__ = [ + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'Python2PackageOperations', + 'AgentRegistrationInformationOperations', + 'DscNodeOperations', + 'NodeReportsOperations', + 'DscNodeConfigurationOperations', + 'DscCompilationJobOperations', + 'DscCompilationJobStreamOperations', + 'NodeCountInformationOperations', + 'SourceControlOperations', + 'SourceControlSyncJobOperations', + 'SourceControlSyncJobStreamsOperations', 'AutomationAccountOperations', - 'Operations', 'StatisticsOperations', 'UsagesOperations', 'KeysOperations', @@ -58,7 +71,6 @@ 'ConnectionOperations', 'ConnectionTypeOperations', 'CredentialOperations', - 'DscConfigurationOperations', 'HybridRunbookWorkerGroupOperations', 'JobScheduleOperations', 'LinkedWorkspaceOperations', @@ -68,26 +80,16 @@ 'FieldsOperations', 'ScheduleOperations', 'VariableOperations', - 'WebhookOperations', 'WatcherOperations', - 'SoftwareUpdateConfigurationsOperations', - 'SoftwareUpdateConfigurationRunsOperations', - 'SoftwareUpdateConfigurationMachineRunsOperations', - 'SourceControlOperations', - 'SourceControlSyncJobOperations', - 'SourceControlSyncJobStreamsOperations', + 'DscConfigurationOperations', 'JobOperations', 'JobStreamOperations', - 'AgentRegistrationInformationOperations', - 'DscNodeOperations', - 'NodeReportsOperations', - 'DscCompilationJobOperations', - 'DscCompilationJobStreamOperations', - 'DscNodeConfigurationOperations', - 'NodeCountInformationOperations', + 'Operations', 'RunbookDraftOperations', 'RunbookOperations', 'TestJobStreamsOperations', 'TestJobOperations', - 'Python2PackageOperations', + 'SoftwareUpdateConfigurationRunsOperations', + 'SoftwareUpdateConfigurationMachineRunsOperations', + '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 f44112bcfdc6..90a876d8da0b 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -139,7 +139,7 @@ def list_by_module( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py index 5f66219dc6b3..27bc3dc3670c 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -130,7 +130,7 @@ def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 305440073d69..8794f91a8f08 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 = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -139,7 +139,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -208,7 +208,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -322,7 +322,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -393,7 +393,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py index df2a0831bf3e..fa701997429e 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py index 1b6feff983e0..8bd913601ba2 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 @@ -52,7 +52,7 @@ def delete( connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.Connection"] + # type: (...) -> None """Delete the connection. :param resource_group_name: Name of an Azure Resource group. @@ -62,16 +62,16 @@ def delete( :param connection_name: The name of connection. :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Connection, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.Connection or None + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Connection"]] + 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -101,14 +101,9 @@ def delete( error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Connection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} # type: ignore def get( @@ -137,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -204,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -280,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -346,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py index 9099282a6405..79b44fd5c604 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 @@ -18,7 +18,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, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -230,16 +230,12 @@ def create_or_update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201, 409]: + 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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 201: - deserialized = self._deserialize('ConnectionType', pipeline_response) - - if response.status_code == 409: - deserialized = self._deserialize('ConnectionType', pipeline_response) + deserialized = self._deserialize('ConnectionType', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -270,7 +266,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py index e4213ebc2957..473de40230c3 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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 84646537403d..107039f2fc14 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 = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -207,7 +207,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -271,7 +271,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -355,7 +355,7 @@ def get_stream( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 938571f9791e..9edf3227c17e 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 5b1684e5f1f9..48af11730a06 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 @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, IO, Iterable, Optional, TypeVar, Union + 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]] @@ -71,7 +71,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/plain; charset=utf-8") accept = "application/json" @@ -288,7 +288,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/plain; charset=utf-8") accept = "application/json" @@ -350,7 +350,7 @@ def get_content( configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> IO + # type: (...) -> str """Retrieve the configuration script identified by configuration name. :param resource_group_name: Name of an Azure Resource group. @@ -360,16 +360,16 @@ def get_content( :param configuration_name: The configuration name. :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "text/powershell" # Construct URL @@ -398,7 +398,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('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -441,7 +441,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 f20e4667db6c..016610c2f1f8 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -134,7 +134,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -186,7 +186,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -343,7 +343,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + 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_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py index 3ca1a16c8a85..7281838cb661 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 @@ -52,7 +52,7 @@ def delete( node_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.DscNode" + # type: (...) -> None """Delete the dsc node identified by node id. :param resource_group_name: Name of an Azure Resource group. @@ -62,16 +62,16 @@ def delete( :param node_id: The node id. :type node_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DscNode, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.DscNode + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DscNode"] + 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -101,12 +101,9 @@ def delete( error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DscNode', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'} # type: ignore def get( @@ -135,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -202,7 +199,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -280,7 +277,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + 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/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py index 576f19cec144..446d76851a16 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 = "2015-10-31" + 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/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py index 944d103302a8..60a5c8a6695b 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -268,7 +268,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py index c3078c92e46e..2afce74497f4 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 @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, IO, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +53,7 @@ def get_output( client_request_id=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> IO + # type: (...) -> str """Retrieve the job output identified by job name. :param resource_group_name: Name of an Azure Resource group. @@ -65,16 +65,16 @@ def get_output( :param client_request_id: Identifies this specific client request. :type client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "text/plain" # Construct URL @@ -105,7 +105,7 @@ def get_output( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('IO', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -121,7 +121,7 @@ def get_runbook_content( client_request_id=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> IO + # type: (...) -> str """Retrieve the runbook content of the job identified by job name. :param resource_group_name: Name of an Azure Resource group. @@ -133,17 +133,17 @@ def get_runbook_content( :param client_request_id: Identifies this specific client request. :type client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" + api_version = "2019-06-01" + accept = "text/powershell" # Construct URL url = self.get_runbook_content.metadata['url'] # type: ignore @@ -166,15 +166,14 @@ def get_runbook_content( 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=True, **kwargs) + 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = response.stream_download(self._client._pipeline) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -211,7 +210,7 @@ def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -277,7 +276,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -343,7 +342,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -415,7 +414,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -489,7 +488,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -575,7 +574,7 @@ def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 5f9e06e82dc7..d6fd3fa0842c 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -268,7 +268,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py index a556dac67fe6..4db34971e8ba 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 @@ -77,7 +77,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -150,7 +150,7 @@ def list_by_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 9b6fe31ea100..b2d428515457 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 c1b674b7af04..42ffd1000ef1 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 5b44b6878d71..d48c44fb9687 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py index b4bb08088163..a604e80eb585 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 93797e0d8f6a..e97d39741fd9 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 = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -159,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -227,7 +227,7 @@ def get_content( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-01-15" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 0f4a71efdc3c..ad905c10f5e7 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 = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -155,7 +155,7 @@ def list_fields_by_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py index 8540c685e839..a26716803b06 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 @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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..564a81eed2b7 --- /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(_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: True for ARMPolling, False for no polling, or a + polling object for 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(_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: True for ARMPolling, False for no polling, or a + polling object for 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 23c565316e5d..ba5e19048e31 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 = "2018-06-30" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + 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/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py index 896636296db4..c60a44fca278 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, IO, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, 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: (...) -> IO + # type: (...) -> str """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: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" 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('IO', pipeline_response) + deserialized = self._deserialize('str', 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: (...) -> Optional[IO] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + # 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 = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "text/powershell") accept = "application/json" @@ -150,7 +150,7 @@ 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=True, **kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -159,17 +159,12 @@ def _replace_content_initial( 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, deserialized, response_headers) + return cls(pipeline_response, None, 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( @@ -180,7 +175,7 @@ def begin_replace_content( runbook_content, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[IO] + # type: (...) -> LROPoller[None] """Replaces the runbook draft content. :param resource_group_name: Name of an Azure Resource group. @@ -189,7 +184,7 @@ 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. @@ -197,12 +192,12 @@ def begin_replace_content( polling object for 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 IO or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[IO] + :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[IO] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -222,11 +217,8 @@ 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, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -235,7 +227,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, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -275,7 +267,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -320,7 +312,7 @@ def undo_edit( runbook_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RunbookDraftUndoEditResult" + # type: (...) -> None """Undo draft edit to last known published state identified by runbook name. :param resource_group_name: Name of an Azure Resource group. @@ -330,16 +322,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: RunbookDraftUndoEditResult, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult + :return: None, or the result of cls(response) + :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RunbookDraftUndoEditResult"] + 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 = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -369,10 +361,7 @@ def undo_edit( error = self._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, deserialized, {}) + return cls(pipeline_response, None, {}) - 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 b05e259a1e50..62717cca25ee 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, IO, Iterable, Optional, TypeVar, Union + 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]] @@ -60,7 +60,7 @@ def _publish_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -175,7 +175,7 @@ def get_content( runbook_name, # type: str **kwargs # type: Any ): - # type: (...) -> IO + # type: (...) -> str """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: IO, or the result of cls(response) - :rtype: IO + :return: str, or the result of cls(response) + :rtype: str :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop('cls', None) # type: ClsType[str] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" 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('IO', pipeline_response) + deserialized = self._deserialize('str', 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 = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -325,7 +325,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -401,7 +401,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -470,7 +470,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -528,7 +528,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 81390ff30f96..10ef62119114 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 = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -220,7 +220,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -284,7 +284,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -342,7 +342,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_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 9ed09ae61f79..8fcd0a1009c4 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 @@ -74,7 +74,7 @@ def get_by_id( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -151,7 +151,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 38f4fb89bde0..229b49a5ca4f 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 @@ -73,7 +73,7 @@ def get_by_id( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -150,7 +150,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 deleted file mode 100644 index afddfe0ea051..000000000000 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.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, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class SoftwareUpdateConfigurationsOperations(object): - """SoftwareUpdateConfigurationsOperations 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 create( - self, - resource_group_name, # type: str - automation_account_name, # type: str - software_update_configuration_name, # type: str - parameters, # type: "_models.SoftwareUpdateConfiguration" - client_request_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.SoftwareUpdateConfiguration" - """Create a new software update configuration with the name given in the URI. - - :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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param parameters: Request body. - :type parameters: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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, 'SoftwareUpdateConfiguration') - 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, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - def get_by_name( - self, - resource_group_name, # type: str - automation_account_name, # type: str - software_update_configuration_name, # type: str - client_request_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.SoftwareUpdateConfiguration" - """Get a single software update configuration by 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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.get_by_name.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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SoftwareUpdateConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - def delete( - self, - resource_group_name, # type: str - automation_account_name, # type: str - software_update_configuration_name, # type: str - client_request_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """delete a specific software update configuration. - - :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 software_update_configuration_name: The name of the software update configuration to be - created. - :type software_update_configuration_name: str - :param client_request_id: Identifies this specific client request. - :type client_request_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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 = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - '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'), - 'softwareUpdateConfigurationName': self._serialize.url("software_update_configuration_name", software_update_configuration_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] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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 [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - automation_account_name, # type: str - client_request_id=None, # type: Optional[str] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.SoftwareUpdateConfigurationListResult" - """Get all software update configurations for the 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 - :param client_request_id: Identifies this specific client request. - :type client_request_id: str - :param filter: The filter to apply on the operation. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SoftwareUpdateConfigurationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SoftwareUpdateConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" - accept = "application/json" - - # Construct URL - url = self.list.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') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if client_request_id is not None: - header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') - 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) - error = self._deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SoftwareUpdateConfigurationListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'} # type: ignore 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 a0a54161228e..4e0e3d3dc2f8 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 = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -150,7 +150,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -219,7 +219,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -280,7 +280,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -344,7 +344,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + 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/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py index 41534df8b8cc..5928114301fe 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 = "2017-05-15-preview" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -150,7 +150,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -218,7 +218,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + 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/_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 5d774c40b998..b23c4b3d0ebb 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 = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None): @@ -166,7 +166,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-05-15-preview" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL 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 0dba930ec1f1..869d3e444bf1 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 = "2015-10-31" + 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/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py index 297955b967f2..143df34ab9bc 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 = "2018-06-30" + api_version = "2019-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -142,7 +142,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ def resume( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -267,7 +267,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -328,7 +328,7 @@ def suspend( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL 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 7bf2c4836c35..0b45b5c214e1 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 = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" # Construct URL @@ -142,7 +142,7 @@ def list_by_test_job( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-06-30" + api_version = "2019-06-01" accept = "application/json" def prepare_request(next_link=None): 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 bc18e115bf2f..aff73b1396c8 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 = "2015-10-31" + 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/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py index c62df7a639bf..7aa2f754ae8c 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 = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -150,7 +150,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -219,7 +219,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -280,7 +280,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -341,7 +341,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + 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/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py index 0950cf14a453..125d5808cbab 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 = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -147,7 +147,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -283,7 +283,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -344,7 +344,7 @@ def start( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -405,7 +405,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" # Construct URL @@ -466,7 +466,7 @@ def list_by_automation_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2015-10-31" + api_version = "2020-01-13-preview" accept = "application/json" def prepare_request(next_link=None):