From 543357df4d3cbc346c59c173f5496ca298c915b6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 10 Aug 2018 20:40:20 +0000 Subject: [PATCH] Generated from 7f91113e2307757835762f54c1b5ce165d189ee5 Adding property syncType, and removing property startType from SourceControlSyncJobs. Renaming property syncJobStreamId to sourceControlSyncJobStreamId and updating example to reflect the changes. --- .../azure/mgmt/automation/__init__.py | 18 + .../mgmt/automation/automation_client.py | 288 +++++++++ .../azure/mgmt/automation/models/__init__.py | 505 +++++++++++++++ .../azure/mgmt/automation/models/activity.py | 64 ++ .../automation/models/activity_output_type.py | 32 + .../models/activity_output_type_py3.py | 32 + .../mgmt/automation/models/activity_paged.py | 27 + .../automation/models/activity_parameter.py | 82 +++ .../models/activity_parameter_py3.py | 82 +++ .../models/activity_parameter_set.py | 33 + .../models/activity_parameter_set_py3.py | 33 + .../activity_parameter_validation_set.py | 29 + .../activity_parameter_validation_set_py3.py | 29 + .../mgmt/automation/models/activity_py3.py | 64 ++ .../automation/models/advanced_schedule.py | 38 ++ .../advanced_schedule_monthly_occurrence.py | 36 ++ ...dvanced_schedule_monthly_occurrence_py3.py | 36 ++ .../models/advanced_schedule_py3.py | 38 ++ .../automation/models/agent_registration.py | 40 ++ .../models/agent_registration_keys.py | 32 + .../models/agent_registration_keys_py3.py | 32 + .../models/agent_registration_py3.py | 40 ++ ...t_registration_regenerate_key_parameter.py | 36 ++ ...gistration_regenerate_key_parameter_py3.py | 36 ++ .../automation/models/automation_account.py | 81 +++ ...ion_account_create_or_update_parameters.py | 41 ++ ...account_create_or_update_parameters_py3.py | 41 ++ .../models/automation_account_paged.py | 27 + .../models/automation_account_py3.py | 81 +++ .../automation_account_update_parameters.py | 40 ++ ...utomation_account_update_parameters_py3.py | 40 ++ .../models/automation_client_enums.py | 281 +++++++++ .../mgmt/automation/models/certificate.py | 71 +++ ...certificate_create_or_update_parameters.py | 54 ++ ...ificate_create_or_update_parameters_py3.py | 54 ++ .../automation/models/certificate_paged.py | 27 + .../mgmt/automation/models/certificate_py3.py | 71 +++ .../models/certificate_update_parameters.py | 32 + .../certificate_update_parameters_py3.py | 32 + .../collection_item_update_configuration.py | 36 ++ ...ollection_item_update_configuration_py3.py | 36 ++ .../mgmt/automation/models/connection.py | 67 ++ .../connection_create_or_update_parameters.py | 50 ++ ...nection_create_or_update_parameters_py3.py | 50 ++ .../automation/models/connection_paged.py | 27 + .../mgmt/automation/models/connection_py3.py | 67 ++ .../mgmt/automation/models/connection_type.py | 70 +++ .../connection_type_association_property.py | 28 + ...onnection_type_association_property_py3.py | 28 + ...ection_type_create_or_update_parameters.py | 46 ++ ...on_type_create_or_update_parameters_py3.py | 46 ++ .../models/connection_type_paged.py | 27 + .../automation/models/connection_type_py3.py | 70 +++ .../models/connection_update_parameters.py | 37 ++ .../connection_update_parameters_py3.py | 37 ++ .../mgmt/automation/models/content_hash.py | 40 ++ .../automation/models/content_hash_py3.py | 40 ++ .../mgmt/automation/models/content_link.py | 36 ++ .../automation/models/content_link_py3.py | 36 ++ .../mgmt/automation/models/content_source.py | 42 ++ .../automation/models/content_source_py3.py | 42 ++ .../mgmt/automation/models/credential.py | 61 ++ .../credential_create_or_update_parameters.py | 48 ++ ...dential_create_or_update_parameters_py3.py | 48 ++ .../automation/models/credential_paged.py | 27 + .../mgmt/automation/models/credential_py3.py | 61 ++ .../models/credential_update_parameters.py | 40 ++ .../credential_update_parameters_py3.py | 40 ++ .../automation/models/dsc_compilation_job.py | 114 ++++ .../dsc_compilation_job_create_parameters.py | 56 ++ ...c_compilation_job_create_parameters_py3.py | 56 ++ .../models/dsc_compilation_job_paged.py | 27 + .../models/dsc_compilation_job_py3.py | 114 ++++ .../automation/models/dsc_configuration.py | 97 +++ .../dsc_configuration_association_property.py | 28 + ..._configuration_association_property_py3.py | 28 + ...nfiguration_create_or_update_parameters.py | 63 ++ ...uration_create_or_update_parameters_py3.py | 63 ++ .../models/dsc_configuration_paged.py | 27 + .../models/dsc_configuration_parameter.py | 41 ++ .../models/dsc_configuration_parameter_py3.py | 41 ++ .../models/dsc_configuration_py3.py | 97 +++ .../dsc_configuration_update_parameters.py | 59 ++ ...dsc_configuration_update_parameters_py3.py | 59 ++ .../models/dsc_meta_configuration.py | 59 ++ .../models/dsc_meta_configuration_py3.py | 59 ++ .../azure/mgmt/automation/models/dsc_node.py | 85 +++ .../models/dsc_node_configuration.py | 68 ++ ...nfiguration_create_or_update_parameters.py | 55 ++ ...uration_create_or_update_parameters_py3.py | 55 ++ .../models/dsc_node_configuration_paged.py | 27 + .../models/dsc_node_configuration_py3.py | 68 ++ ..._extension_handler_association_property.py | 32 + ...ension_handler_association_property_py3.py | 32 + .../mgmt/automation/models/dsc_node_paged.py | 27 + .../mgmt/automation/models/dsc_node_py3.py | 85 +++ .../mgmt/automation/models/dsc_node_report.py | 110 ++++ .../models/dsc_node_report_paged.py | 27 + .../automation/models/dsc_node_report_py3.py | 110 ++++ .../models/dsc_node_update_parameters.py | 33 + .../dsc_node_update_parameters_properties.py | 28 + ...c_node_update_parameters_properties_py3.py | 28 + .../models/dsc_node_update_parameters_py3.py | 33 + .../automation/models/dsc_report_error.py | 49 ++ .../automation/models/dsc_report_error_py3.py | 49 ++ .../automation/models/dsc_report_resource.py | 67 ++ .../models/dsc_report_resource_navigation.py | 28 + .../dsc_report_resource_navigation_py3.py | 28 + .../models/dsc_report_resource_py3.py | 67 ++ .../mgmt/automation/models/error_response.py | 45 ++ .../automation/models/error_response_py3.py | 45 ++ .../automation/models/field_definition.py | 45 ++ .../automation/models/field_definition_py3.py | 45 ++ .../models/hybrid_runbook_worker.py | 41 ++ .../models/hybrid_runbook_worker_group.py | 48 ++ .../hybrid_runbook_worker_group_paged.py | 27 + .../models/hybrid_runbook_worker_group_py3.py | 48 ++ ..._runbook_worker_group_update_parameters.py | 29 + ...book_worker_group_update_parameters_py3.py | 29 + .../models/hybrid_runbook_worker_py3.py | 41 ++ .../azure/mgmt/automation/models/job.py | 105 ++++ .../automation/models/job_collection_item.py | 89 +++ .../models/job_collection_item_paged.py | 27 + .../models/job_collection_item_py3.py | 89 +++ .../models/job_create_parameters.py | 37 ++ .../models/job_create_parameters_py3.py | 37 ++ .../mgmt/automation/models/job_navigation.py | 36 ++ .../automation/models/job_navigation_py3.py | 36 ++ .../azure/mgmt/automation/models/job_py3.py | 105 ++++ .../mgmt/automation/models/job_schedule.py | 66 ++ .../models/job_schedule_create_parameters.py | 48 ++ .../job_schedule_create_parameters_py3.py | 48 ++ .../automation/models/job_schedule_paged.py | 27 + .../automation/models/job_schedule_py3.py | 66 ++ .../mgmt/automation/models/job_stream.py | 53 ++ .../models/job_stream_list_result.py | 32 + .../models/job_stream_list_result_py3.py | 32 + .../automation/models/job_stream_paged.py | 27 + .../mgmt/automation/models/job_stream_py3.py | 53 ++ .../azure/mgmt/automation/models/key.py | 48 ++ .../mgmt/automation/models/key_list_result.py | 28 + .../automation/models/key_list_result_py3.py | 28 + .../azure/mgmt/automation/models/key_py3.py | 48 ++ .../automation/models/linked_workspace.py | 35 ++ .../automation/models/linked_workspace_py3.py | 35 ++ .../automation/models/linux_properties.py | 46 ++ .../automation/models/linux_properties_py3.py | 46 ++ .../azure/mgmt/automation/models/module.py | 103 ++++ .../module_create_or_update_parameters.py | 46 ++ .../module_create_or_update_parameters_py3.py | 46 ++ .../automation/models/module_error_info.py | 32 + .../models/module_error_info_py3.py | 32 + .../mgmt/automation/models/module_paged.py | 27 + .../mgmt/automation/models/module_py3.py | 103 ++++ .../models/module_update_parameters.py | 40 ++ .../models/module_update_parameters_py3.py | 40 ++ .../mgmt/automation/models/node_count.py | 32 + .../models/node_count_properties.py | 28 + .../models/node_count_properties_py3.py | 28 + .../mgmt/automation/models/node_count_py3.py | 32 + .../mgmt/automation/models/node_counts.py | 33 + .../mgmt/automation/models/node_counts_py3.py | 33 + .../azure/mgmt/automation/models/operation.py | 32 + .../automation/models/operation_display.py | 37 ++ .../models/operation_display_py3.py | 37 ++ .../mgmt/automation/models/operation_paged.py | 27 + .../mgmt/automation/models/operation_py3.py | 32 + .../mgmt/automation/models/proxy_resource.py | 42 ++ .../automation/models/proxy_resource_py3.py | 42 ++ .../azure/mgmt/automation/models/resource.py | 45 ++ .../mgmt/automation/models/resource_py3.py | 45 ++ .../run_as_credential_association_property.py | 28 + ..._as_credential_association_property_py3.py | 28 + .../azure/mgmt/automation/models/runbook.py | 120 ++++ .../models/runbook_association_property.py | 28 + .../runbook_association_property_py3.py | 28 + ...nbook_create_or_update_draft_parameters.py | 34 + ...k_create_or_update_draft_parameters_py3.py | 34 + ...nbook_create_or_update_draft_properties.py | 58 ++ ...k_create_or_update_draft_properties_py3.py | 58 ++ .../runbook_create_or_update_parameters.py | 74 +++ ...runbook_create_or_update_parameters_py3.py | 74 +++ .../mgmt/automation/models/runbook_draft.py | 50 ++ .../automation/models/runbook_draft_py3.py | 50 ++ .../models/runbook_draft_undo_edit_result.py | 45 ++ .../runbook_draft_undo_edit_result_py3.py | 45 ++ .../mgmt/automation/models/runbook_paged.py | 27 + .../automation/models/runbook_parameter.py | 41 ++ .../models/runbook_parameter_py3.py | 41 ++ .../mgmt/automation/models/runbook_py3.py | 120 ++++ .../models/runbook_update_parameters.py | 53 ++ .../models/runbook_update_parameters_py3.py | 53 ++ .../azure/mgmt/automation/models/schedule.py | 103 ++++ .../models/schedule_association_property.py | 28 + .../schedule_association_property_py3.py | 28 + .../schedule_create_or_update_parameters.py | 65 ++ ...chedule_create_or_update_parameters_py3.py | 65 ++ .../mgmt/automation/models/schedule_paged.py | 27 + .../automation/models/schedule_properties.py | 91 +++ .../models/schedule_properties_py3.py | 91 +++ .../mgmt/automation/models/schedule_py3.py | 103 ++++ .../models/schedule_update_parameters.py | 37 ++ .../models/schedule_update_parameters_py3.py | 37 ++ .../azure/mgmt/automation/models/sku.py | 43 ++ .../azure/mgmt/automation/models/sku_py3.py | 43 ++ .../models/software_update_configuration.py | 93 +++ ...re_update_configuration_collection_item.py | 78 +++ ...pdate_configuration_collection_item_py3.py | 78 +++ ...ftware_update_configuration_list_result.py | 30 + ...re_update_configuration_list_result_py3.py | 30 + ...ftware_update_configuration_machine_run.py | 124 ++++ ...e_configuration_machine_run_list_result.py | 34 + ...nfiguration_machine_run_list_result_py3.py | 34 + ...re_update_configuration_machine_run_py3.py | 124 ++++ .../software_update_configuration_py3.py | 93 +++ .../software_update_configuration_run.py | 107 ++++ ...re_update_configuration_run_list_result.py | 34 + ...pdate_configuration_run_list_result_py3.py | 34 + .../software_update_configuration_run_py3.py | 107 ++++ .../mgmt/automation/models/source_control.py | 81 +++ ...rce_control_create_or_update_parameters.py | 70 +++ ...control_create_or_update_parameters_py3.py | 70 +++ .../automation/models/source_control_paged.py | 27 + .../automation/models/source_control_py3.py | 81 +++ ...ource_control_security_token_properties.py | 42 ++ ...e_control_security_token_properties_py3.py | 42 ++ .../models/source_control_sync_job.py | 75 +++ .../models/source_control_sync_job_by_id.py | 68 ++ .../source_control_sync_job_by_id_py3.py | 68 ++ ...urce_control_sync_job_create_parameters.py | 35 ++ ..._control_sync_job_create_parameters_py3.py | 35 ++ .../models/source_control_sync_job_paged.py | 27 + .../models/source_control_sync_job_py3.py | 75 +++ .../models/source_control_sync_job_stream.py | 53 ++ .../source_control_sync_job_stream_by_id.py | 61 ++ ...ource_control_sync_job_stream_by_id_py3.py | 61 ++ .../source_control_sync_job_stream_paged.py | 27 + .../source_control_sync_job_stream_py3.py | 53 ++ .../source_control_update_parameters.py | 52 ++ .../source_control_update_parameters_py3.py | 52 ++ .../mgmt/automation/models/statistics.py | 55 ++ .../automation/models/statistics_paged.py | 27 + .../mgmt/automation/models/statistics_py3.py | 55 ++ .../azure/mgmt/automation/models/test_job.py | 72 +++ .../models/test_job_create_parameters.py | 33 + .../models/test_job_create_parameters_py3.py | 33 + .../mgmt/automation/models/test_job_py3.py | 72 +++ .../automation/models/tracked_resource.py | 50 ++ .../automation/models/tracked_resource_py3.py | 50 ++ .../mgmt/automation/models/type_field.py | 32 + .../automation/models/type_field_paged.py | 27 + .../mgmt/automation/models/type_field_py3.py | 32 + .../automation/models/update_configuration.py | 60 ++ .../models/update_configuration_navigation.py | 36 ++ .../update_configuration_navigation_py3.py | 36 ++ .../models/update_configuration_py3.py | 60 ++ .../azure/mgmt/automation/models/usage.py | 48 ++ .../automation/models/usage_counter_name.py | 32 + .../models/usage_counter_name_py3.py | 32 + .../mgmt/automation/models/usage_paged.py | 27 + .../azure/mgmt/automation/models/usage_py3.py | 48 ++ .../azure/mgmt/automation/models/variable.py | 62 ++ .../variable_create_or_update_parameters.py | 46 ++ ...ariable_create_or_update_parameters_py3.py | 46 ++ .../mgmt/automation/models/variable_paged.py | 27 + .../mgmt/automation/models/variable_py3.py | 62 ++ .../models/variable_update_parameters.py | 36 ++ .../models/variable_update_parameters_py3.py | 36 ++ .../azure/mgmt/automation/models/watcher.py | 95 +++ .../mgmt/automation/models/watcher_paged.py | 27 + .../mgmt/automation/models/watcher_py3.py | 95 +++ .../models/watcher_update_parameters.py | 33 + .../models/watcher_update_parameters_py3.py | 33 + .../azure/mgmt/automation/models/webhook.py | 89 +++ .../webhook_create_or_update_parameters.py | 59 ++ ...webhook_create_or_update_parameters_py3.py | 59 ++ .../mgmt/automation/models/webhook_paged.py | 27 + .../mgmt/automation/models/webhook_py3.py | 89 +++ .../models/webhook_update_parameters.py | 45 ++ .../models/webhook_update_parameters_py3.py | 45 ++ .../automation/models/windows_properties.py | 48 ++ .../models/windows_properties_py3.py | 48 ++ .../mgmt/automation/operations/__init__.py | 94 +++ .../operations/activity_operations.py | 177 ++++++ ...ent_registration_information_operations.py | 169 +++++ .../automation_account_operations.py | 421 +++++++++++++ .../operations/certificate_operations.py | 375 +++++++++++ .../operations/connection_operations.py | 382 ++++++++++++ .../operations/connection_type_operations.py | 300 +++++++++ .../operations/credential_operations.py | 375 +++++++++++ .../dsc_compilation_job_operations.py | 348 +++++++++++ .../dsc_compilation_job_stream_operations.py | 101 +++ .../dsc_configuration_operations.py | 453 ++++++++++++++ .../dsc_node_configuration_operations.py | 347 +++++++++++ .../operations/dsc_node_operations.py | 325 ++++++++++ .../operations/fields_operations.py | 112 ++++ .../hybrid_runbook_worker_group_operations.py | 305 +++++++++ .../automation/operations/job_operations.py | 580 ++++++++++++++++++ .../operations/job_schedule_operations.py | 301 +++++++++ .../operations/job_stream_operations.py | 188 ++++++ .../automation/operations/keys_operations.py | 98 +++ .../operations/linked_workspace_operations.py | 98 +++ .../operations/module_operations.py | 368 +++++++++++ .../node_count_information_operations.py | 99 +++ .../operations/node_reports_operations.py | 246 ++++++++ .../object_data_types_operations.py | 185 ++++++ .../mgmt/automation/operations/operations.py | 96 +++ .../operations/runbook_draft_operations.py | 439 +++++++++++++ .../operations/runbook_operations.py | 441 +++++++++++++ .../operations/schedule_operations.py | 371 +++++++++++ ...e_configuration_machine_runs_operations.py | 191 ++++++ ...re_update_configuration_runs_operations.py | 190 ++++++ ...ftware_update_configurations_operations.py | 316 ++++++++++ .../operations/source_control_operations.py | 375 +++++++++++ .../source_control_sync_job_operations.py | 256 ++++++++ ...rce_control_sync_job_streams_operations.py | 187 ++++++ .../operations/statistics_operations.py | 110 ++++ .../operations/test_job_operations.py | 342 +++++++++++ .../operations/test_job_streams_operations.py | 181 ++++++ .../operations/usages_operations.py | 106 ++++ .../operations/variable_operations.py | 371 +++++++++++ .../operations/watcher_operations.py | 486 +++++++++++++++ .../operations/webhook_operations.py | 433 +++++++++++++ .../azure/mgmt/automation/version.py | 13 + 324 files changed, 26361 insertions(+) create mode 100644 azure-mgmt-automation/azure/mgmt/automation/__init__.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/automation_client.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/__init__.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/activity_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_type_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_hash.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_hash_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_link.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_link_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_source.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/content_source_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/error_response.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/error_response_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/field_definition.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/field_definition_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_navigation.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_navigation_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_schedule.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_stream.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_stream_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/job_stream_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/key.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/key_list_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/key_list_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/key_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/linux_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/linux_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_error_info.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_error_info_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_count.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_count_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_counts.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/node_counts_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/operation.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/operation_display.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/operation_display_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/operation_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/operation_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/resource.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/resource_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/sku.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/sku_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/statistics.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/statistics_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/statistics_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/test_job.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/test_job_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/type_field.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/type_field_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/type_field_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/usage.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/usage_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/usage_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/watcher.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/watcher_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/watcher_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_paged.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/windows_properties.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/models/windows_properties_py3.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/activity_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/agent_registration_information_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/automation_account_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/certificate_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/connection_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/connection_type_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/credential_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_stream_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/dsc_configuration_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_configuration_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/fields_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/hybrid_runbook_worker_group_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/job_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/job_schedule_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/job_stream_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/keys_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/linked_workspace_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/module_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/node_count_information_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/node_reports_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/object_data_types_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/runbook_draft_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/runbook_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_machine_runs_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_runs_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configurations_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/source_control_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_streams_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/statistics_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/test_job_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/test_job_streams_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/usages_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/variable_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/watcher_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/operations/webhook_operations.py create mode 100644 azure-mgmt-automation/azure/mgmt/automation/version.py diff --git a/azure-mgmt-automation/azure/mgmt/automation/__init__.py b/azure-mgmt-automation/azure/mgmt/automation/__init__.py new file mode 100644 index 000000000000..583531e6aca2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/__init__.py @@ -0,0 +1,18 @@ +# 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 .automation_client import AutomationClient +from .version import VERSION + +__all__ = ['AutomationClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-automation/azure/mgmt/automation/automation_client.py b/azure-mgmt-automation/azure/mgmt/automation/automation_client.py new file mode 100644 index 000000000000..14d92c7ec336 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/automation_client.py @@ -0,0 +1,288 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.automation_account_operations import AutomationAccountOperations +from .operations.operations import Operations +from .operations.statistics_operations import StatisticsOperations +from .operations.usages_operations import UsagesOperations +from .operations.keys_operations import KeysOperations +from .operations.certificate_operations import CertificateOperations +from .operations.connection_operations import ConnectionOperations +from .operations.connection_type_operations import ConnectionTypeOperations +from .operations.credential_operations import CredentialOperations +from .operations.dsc_configuration_operations import DscConfigurationOperations +from .operations.hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations +from .operations.job_schedule_operations import JobScheduleOperations +from .operations.linked_workspace_operations import LinkedWorkspaceOperations +from .operations.activity_operations import ActivityOperations +from .operations.module_operations import ModuleOperations +from .operations.object_data_types_operations import ObjectDataTypesOperations +from .operations.fields_operations import FieldsOperations +from .operations.runbook_draft_operations import RunbookDraftOperations +from .operations.runbook_operations import RunbookOperations +from .operations.test_job_streams_operations import TestJobStreamsOperations +from .operations.test_job_operations import TestJobOperations +from .operations.schedule_operations import ScheduleOperations +from .operations.variable_operations import VariableOperations +from .operations.webhook_operations import WebhookOperations +from .operations.watcher_operations import WatcherOperations +from .operations.software_update_configurations_operations import SoftwareUpdateConfigurationsOperations +from .operations.software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations +from .operations.software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations +from .operations.source_control_operations import SourceControlOperations +from .operations.source_control_sync_job_operations import SourceControlSyncJobOperations +from .operations.source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations +from .operations.job_operations import JobOperations +from .operations.job_stream_operations import JobStreamOperations +from .operations.agent_registration_information_operations import AgentRegistrationInformationOperations +from .operations.dsc_node_operations import DscNodeOperations +from .operations.node_reports_operations import NodeReportsOperations +from .operations.dsc_compilation_job_operations import DscCompilationJobOperations +from .operations.dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations +from .operations.dsc_node_configuration_operations import DscNodeConfigurationOperations +from .operations.node_count_information_operations import NodeCountInformationOperations +from . import models + + +class AutomationClientConfiguration(AzureConfiguration): + """Configuration for AutomationClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param count_type1: The type of counts to retrieve. Possible values + include: 'status', 'nodeconfiguration' + :type count_type1: str or ~azure.mgmt.automation.models.CountType + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, count_type1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if count_type1 is None: + raise ValueError("Parameter 'count_type1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AutomationClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-automation/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.count_type1 = count_type1 + + +class AutomationClient(SDKClient): + """Automation Client + + :ivar config: Configuration for client. + :vartype config: AutomationClientConfiguration + + :ivar automation_account: AutomationAccount operations + :vartype automation_account: azure.mgmt.automation.operations.AutomationAccountOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.automation.operations.Operations + :ivar statistics: Statistics operations + :vartype statistics: azure.mgmt.automation.operations.StatisticsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.automation.operations.UsagesOperations + :ivar keys: Keys operations + :vartype keys: azure.mgmt.automation.operations.KeysOperations + :ivar certificate: Certificate operations + :vartype certificate: azure.mgmt.automation.operations.CertificateOperations + :ivar connection: Connection operations + :vartype connection: azure.mgmt.automation.operations.ConnectionOperations + :ivar connection_type: ConnectionType operations + :vartype connection_type: azure.mgmt.automation.operations.ConnectionTypeOperations + :ivar credential: Credential operations + :vartype credential: azure.mgmt.automation.operations.CredentialOperations + :ivar dsc_configuration: DscConfiguration operations + :vartype dsc_configuration: azure.mgmt.automation.operations.DscConfigurationOperations + :ivar hybrid_runbook_worker_group: HybridRunbookWorkerGroup operations + :vartype hybrid_runbook_worker_group: azure.mgmt.automation.operations.HybridRunbookWorkerGroupOperations + :ivar job_schedule: JobSchedule operations + :vartype job_schedule: azure.mgmt.automation.operations.JobScheduleOperations + :ivar linked_workspace: LinkedWorkspace operations + :vartype linked_workspace: azure.mgmt.automation.operations.LinkedWorkspaceOperations + :ivar activity: Activity operations + :vartype activity: azure.mgmt.automation.operations.ActivityOperations + :ivar module: Module operations + :vartype module: azure.mgmt.automation.operations.ModuleOperations + :ivar object_data_types: ObjectDataTypes operations + :vartype object_data_types: azure.mgmt.automation.operations.ObjectDataTypesOperations + :ivar fields: Fields operations + :vartype fields: azure.mgmt.automation.operations.FieldsOperations + :ivar runbook_draft: RunbookDraft operations + :vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations + :ivar runbook: Runbook operations + :vartype runbook: azure.mgmt.automation.operations.RunbookOperations + :ivar test_job_streams: TestJobStreams operations + :vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations + :ivar test_job: TestJob operations + :vartype test_job: azure.mgmt.automation.operations.TestJobOperations + :ivar schedule: Schedule operations + :vartype schedule: azure.mgmt.automation.operations.ScheduleOperations + :ivar variable: Variable operations + :vartype variable: azure.mgmt.automation.operations.VariableOperations + :ivar webhook: Webhook operations + :vartype webhook: azure.mgmt.automation.operations.WebhookOperations + :ivar watcher: Watcher operations + :vartype watcher: azure.mgmt.automation.operations.WatcherOperations + :ivar software_update_configurations: SoftwareUpdateConfigurations operations + :vartype software_update_configurations: azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations + :ivar software_update_configuration_runs: SoftwareUpdateConfigurationRuns operations + :vartype software_update_configuration_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationRunsOperations + :ivar software_update_configuration_machine_runs: SoftwareUpdateConfigurationMachineRuns operations + :vartype software_update_configuration_machine_runs: azure.mgmt.automation.operations.SoftwareUpdateConfigurationMachineRunsOperations + :ivar source_control: SourceControl operations + :vartype source_control: azure.mgmt.automation.operations.SourceControlOperations + :ivar source_control_sync_job: SourceControlSyncJob operations + :vartype source_control_sync_job: azure.mgmt.automation.operations.SourceControlSyncJobOperations + :ivar source_control_sync_job_streams: SourceControlSyncJobStreams operations + :vartype source_control_sync_job_streams: azure.mgmt.automation.operations.SourceControlSyncJobStreamsOperations + :ivar job: Job operations + :vartype job: azure.mgmt.automation.operations.JobOperations + :ivar job_stream: JobStream operations + :vartype job_stream: azure.mgmt.automation.operations.JobStreamOperations + :ivar agent_registration_information: AgentRegistrationInformation operations + :vartype agent_registration_information: azure.mgmt.automation.operations.AgentRegistrationInformationOperations + :ivar dsc_node: DscNode operations + :vartype dsc_node: azure.mgmt.automation.operations.DscNodeOperations + :ivar node_reports: NodeReports operations + :vartype node_reports: azure.mgmt.automation.operations.NodeReportsOperations + :ivar dsc_compilation_job: DscCompilationJob operations + :vartype dsc_compilation_job: azure.mgmt.automation.operations.DscCompilationJobOperations + :ivar dsc_compilation_job_stream: DscCompilationJobStream operations + :vartype dsc_compilation_job_stream: azure.mgmt.automation.operations.DscCompilationJobStreamOperations + :ivar dsc_node_configuration: DscNodeConfiguration operations + :vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations + :ivar node_count_information: NodeCountInformation operations + :vartype node_count_information: azure.mgmt.automation.operations.NodeCountInformationOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param count_type1: The type of counts to retrieve. Possible values + include: 'status', 'nodeconfiguration' + :type count_type1: str or ~azure.mgmt.automation.models.CountType + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, count_type1, base_url=None): + + self.config = AutomationClientConfiguration(credentials, subscription_id, count_type1, base_url) + super(AutomationClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.automation_account = AutomationAccountOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.statistics = StatisticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.keys = KeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.certificate = CertificateOperations( + self._client, self.config, self._serialize, self._deserialize) + self.connection = ConnectionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.connection_type = ConnectionTypeOperations( + 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( + self._client, self.config, self._serialize, self._deserialize) + self.linked_workspace = LinkedWorkspaceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.activity = ActivityOperations( + self._client, self.config, self._serialize, self._deserialize) + self.module = ModuleOperations( + self._client, self.config, self._serialize, self._deserialize) + self.object_data_types = ObjectDataTypesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.fields = FieldsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.runbook_draft = RunbookDraftOperations( + self._client, self.config, self._serialize, self._deserialize) + self.runbook = RunbookOperations( + self._client, self.config, self._serialize, self._deserialize) + self.test_job_streams = TestJobStreamsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.test_job = TestJobOperations( + self._client, self.config, self._serialize, self._deserialize) + self.schedule = ScheduleOperations( + 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._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._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py new file mode 100644 index 000000000000..bcffa10b0f8a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py @@ -0,0 +1,505 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .sku_py3 import Sku + from .automation_account_py3 import AutomationAccount + from .automation_account_create_or_update_parameters_py3 import AutomationAccountCreateOrUpdateParameters + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .statistics_py3 import Statistics + from .usage_counter_name_py3 import UsageCounterName + from .usage_py3 import Usage + from .key_py3 import Key + from .key_list_result_py3 import KeyListResult + from .automation_account_update_parameters_py3 import AutomationAccountUpdateParameters + from .proxy_resource_py3 import ProxyResource + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .certificate_create_or_update_parameters_py3 import CertificateCreateOrUpdateParameters + from .certificate_py3 import Certificate + from .certificate_update_parameters_py3 import CertificateUpdateParameters + from .connection_type_association_property_py3 import ConnectionTypeAssociationProperty + from .connection_create_or_update_parameters_py3 import ConnectionCreateOrUpdateParameters + from .connection_py3 import Connection + from .connection_update_parameters_py3 import ConnectionUpdateParameters + from .field_definition_py3 import FieldDefinition + from .connection_type_py3 import ConnectionType + from .connection_type_create_or_update_parameters_py3 import ConnectionTypeCreateOrUpdateParameters + from .credential_create_or_update_parameters_py3 import CredentialCreateOrUpdateParameters + from .credential_py3 import Credential + from .credential_update_parameters_py3 import CredentialUpdateParameters + from .content_hash_py3 import ContentHash + from .content_source_py3 import ContentSource + from .dsc_configuration_parameter_py3 import DscConfigurationParameter + from .dsc_configuration_create_or_update_parameters_py3 import DscConfigurationCreateOrUpdateParameters + from .dsc_configuration_py3 import DscConfiguration + from .dsc_configuration_update_parameters_py3 import DscConfigurationUpdateParameters + from .run_as_credential_association_property_py3 import RunAsCredentialAssociationProperty + from .hybrid_runbook_worker_py3 import HybridRunbookWorker + from .hybrid_runbook_worker_group_py3 import HybridRunbookWorkerGroup + from .hybrid_runbook_worker_group_update_parameters_py3 import HybridRunbookWorkerGroupUpdateParameters + from .schedule_association_property_py3 import ScheduleAssociationProperty + from .runbook_association_property_py3 import RunbookAssociationProperty + from .job_schedule_py3 import JobSchedule + from .job_schedule_create_parameters_py3 import JobScheduleCreateParameters + from .linked_workspace_py3 import LinkedWorkspace + from .activity_parameter_validation_set_py3 import ActivityParameterValidationSet + from .activity_parameter_py3 import ActivityParameter + from .activity_parameter_set_py3 import ActivityParameterSet + from .activity_output_type_py3 import ActivityOutputType + from .activity_py3 import Activity + from .module_error_info_py3 import ModuleErrorInfo + from .content_link_py3 import ContentLink + from .module_py3 import Module + from .module_create_or_update_parameters_py3 import ModuleCreateOrUpdateParameters + from .module_update_parameters_py3 import ModuleUpdateParameters + from .type_field_py3 import TypeField + from .runbook_parameter_py3 import RunbookParameter + from .runbook_draft_py3 import RunbookDraft + from .runbook_py3 import Runbook + from .runbook_create_or_update_parameters_py3 import RunbookCreateOrUpdateParameters + from .runbook_update_parameters_py3 import RunbookUpdateParameters + from .runbook_draft_undo_edit_result_py3 import RunbookDraftUndoEditResult + from .test_job_create_parameters_py3 import TestJobCreateParameters + from .test_job_py3 import TestJob + from .runbook_create_or_update_draft_properties_py3 import RunbookCreateOrUpdateDraftProperties + from .runbook_create_or_update_draft_parameters_py3 import RunbookCreateOrUpdateDraftParameters + from .job_stream_py3 import JobStream + from .job_stream_list_result_py3 import JobStreamListResult + from .advanced_schedule_monthly_occurrence_py3 import AdvancedScheduleMonthlyOccurrence + from .advanced_schedule_py3 import AdvancedSchedule + from .schedule_create_or_update_parameters_py3 import ScheduleCreateOrUpdateParameters + from .schedule_properties_py3 import ScheduleProperties + from .schedule_py3 import Schedule + from .schedule_update_parameters_py3 import ScheduleUpdateParameters + from .variable_create_or_update_parameters_py3 import VariableCreateOrUpdateParameters + from .variable_py3 import Variable + from .variable_update_parameters_py3 import VariableUpdateParameters + from .webhook_py3 import Webhook + from .webhook_update_parameters_py3 import WebhookUpdateParameters + from .webhook_create_or_update_parameters_py3 import WebhookCreateOrUpdateParameters + from .watcher_py3 import Watcher + from .watcher_update_parameters_py3 import WatcherUpdateParameters + from .windows_properties_py3 import WindowsProperties + from .linux_properties_py3 import LinuxProperties + from .update_configuration_py3 import UpdateConfiguration + from .software_update_configuration_py3 import SoftwareUpdateConfiguration + from .collection_item_update_configuration_py3 import CollectionItemUpdateConfiguration + from .software_update_configuration_collection_item_py3 import SoftwareUpdateConfigurationCollectionItem + from .software_update_configuration_list_result_py3 import SoftwareUpdateConfigurationListResult + from .update_configuration_navigation_py3 import UpdateConfigurationNavigation + from .software_update_configuration_run_py3 import SoftwareUpdateConfigurationRun + from .software_update_configuration_run_list_result_py3 import SoftwareUpdateConfigurationRunListResult + from .job_navigation_py3 import JobNavigation + from .software_update_configuration_machine_run_py3 import SoftwareUpdateConfigurationMachineRun + from .software_update_configuration_machine_run_list_result_py3 import SoftwareUpdateConfigurationMachineRunListResult + from .source_control_py3 import SourceControl + from .source_control_security_token_properties_py3 import SourceControlSecurityTokenProperties + from .source_control_update_parameters_py3 import SourceControlUpdateParameters + from .source_control_create_or_update_parameters_py3 import SourceControlCreateOrUpdateParameters + from .source_control_sync_job_py3 import SourceControlSyncJob + from .source_control_sync_job_create_parameters_py3 import SourceControlSyncJobCreateParameters + from .source_control_sync_job_by_id_py3 import SourceControlSyncJobById + from .source_control_sync_job_stream_py3 import SourceControlSyncJobStream + from .source_control_sync_job_stream_by_id_py3 import SourceControlSyncJobStreamById + from .job_py3 import Job + from .job_collection_item_py3 import JobCollectionItem + from .job_create_parameters_py3 import JobCreateParameters + from .dsc_report_error_py3 import DscReportError + from .dsc_report_resource_navigation_py3 import DscReportResourceNavigation + from .dsc_report_resource_py3 import DscReportResource + from .dsc_meta_configuration_py3 import DscMetaConfiguration + from .dsc_node_report_py3 import DscNodeReport + from .agent_registration_keys_py3 import AgentRegistrationKeys + from .agent_registration_py3 import AgentRegistration + from .dsc_node_extension_handler_association_property_py3 import DscNodeExtensionHandlerAssociationProperty + from .dsc_node_py3 import DscNode + from .agent_registration_regenerate_key_parameter_py3 import AgentRegistrationRegenerateKeyParameter + from .dsc_node_update_parameters_properties_py3 import DscNodeUpdateParametersProperties + from .dsc_node_update_parameters_py3 import DscNodeUpdateParameters + from .dsc_configuration_association_property_py3 import DscConfigurationAssociationProperty + from .dsc_compilation_job_py3 import DscCompilationJob + from .dsc_compilation_job_create_parameters_py3 import DscCompilationJobCreateParameters + from .dsc_node_configuration_py3 import DscNodeConfiguration + from .dsc_node_configuration_create_or_update_parameters_py3 import DscNodeConfigurationCreateOrUpdateParameters + from .node_count_properties_py3 import NodeCountProperties + from .node_count_py3 import NodeCount + from .node_counts_py3 import NodeCounts +except (SyntaxError, ImportError): + from .sku import Sku + from .automation_account import AutomationAccount + from .automation_account_create_or_update_parameters import AutomationAccountCreateOrUpdateParameters + from .operation_display import OperationDisplay + from .operation import Operation + from .statistics import Statistics + from .usage_counter_name import UsageCounterName + from .usage import Usage + from .key import Key + from .key_list_result import KeyListResult + from .automation_account_update_parameters import AutomationAccountUpdateParameters + from .proxy_resource import ProxyResource + from .resource import Resource + from .tracked_resource import TrackedResource + from .error_response import ErrorResponse, ErrorResponseException + from .certificate_create_or_update_parameters import CertificateCreateOrUpdateParameters + from .certificate import Certificate + from .certificate_update_parameters import CertificateUpdateParameters + from .connection_type_association_property import ConnectionTypeAssociationProperty + from .connection_create_or_update_parameters import ConnectionCreateOrUpdateParameters + from .connection import Connection + from .connection_update_parameters import ConnectionUpdateParameters + from .field_definition import FieldDefinition + from .connection_type import ConnectionType + from .connection_type_create_or_update_parameters import ConnectionTypeCreateOrUpdateParameters + from .credential_create_or_update_parameters import CredentialCreateOrUpdateParameters + from .credential import Credential + from .credential_update_parameters import CredentialUpdateParameters + from .content_hash import ContentHash + from .content_source import ContentSource + from .dsc_configuration_parameter import DscConfigurationParameter + from .dsc_configuration_create_or_update_parameters import DscConfigurationCreateOrUpdateParameters + from .dsc_configuration import DscConfiguration + from .dsc_configuration_update_parameters import DscConfigurationUpdateParameters + from .run_as_credential_association_property import RunAsCredentialAssociationProperty + from .hybrid_runbook_worker import HybridRunbookWorker + from .hybrid_runbook_worker_group import HybridRunbookWorkerGroup + from .hybrid_runbook_worker_group_update_parameters import HybridRunbookWorkerGroupUpdateParameters + from .schedule_association_property import ScheduleAssociationProperty + from .runbook_association_property import RunbookAssociationProperty + from .job_schedule import JobSchedule + from .job_schedule_create_parameters import JobScheduleCreateParameters + from .linked_workspace import LinkedWorkspace + from .activity_parameter_validation_set import ActivityParameterValidationSet + from .activity_parameter import ActivityParameter + from .activity_parameter_set import ActivityParameterSet + from .activity_output_type import ActivityOutputType + from .activity import Activity + from .module_error_info import ModuleErrorInfo + from .content_link import ContentLink + from .module import Module + from .module_create_or_update_parameters import ModuleCreateOrUpdateParameters + from .module_update_parameters import ModuleUpdateParameters + from .type_field import TypeField + from .runbook_parameter import RunbookParameter + from .runbook_draft import RunbookDraft + from .runbook import Runbook + from .runbook_create_or_update_parameters import RunbookCreateOrUpdateParameters + from .runbook_update_parameters import RunbookUpdateParameters + from .runbook_draft_undo_edit_result import RunbookDraftUndoEditResult + from .test_job_create_parameters import TestJobCreateParameters + from .test_job import TestJob + from .runbook_create_or_update_draft_properties import RunbookCreateOrUpdateDraftProperties + from .runbook_create_or_update_draft_parameters import RunbookCreateOrUpdateDraftParameters + from .job_stream import JobStream + from .job_stream_list_result import JobStreamListResult + from .advanced_schedule_monthly_occurrence import AdvancedScheduleMonthlyOccurrence + from .advanced_schedule import AdvancedSchedule + from .schedule_create_or_update_parameters import ScheduleCreateOrUpdateParameters + from .schedule_properties import ScheduleProperties + from .schedule import Schedule + from .schedule_update_parameters import ScheduleUpdateParameters + from .variable_create_or_update_parameters import VariableCreateOrUpdateParameters + from .variable import Variable + from .variable_update_parameters import VariableUpdateParameters + from .webhook import Webhook + from .webhook_update_parameters import WebhookUpdateParameters + from .webhook_create_or_update_parameters import WebhookCreateOrUpdateParameters + from .watcher import Watcher + from .watcher_update_parameters import WatcherUpdateParameters + from .windows_properties import WindowsProperties + from .linux_properties import LinuxProperties + from .update_configuration import UpdateConfiguration + from .software_update_configuration import SoftwareUpdateConfiguration + from .collection_item_update_configuration import CollectionItemUpdateConfiguration + from .software_update_configuration_collection_item import SoftwareUpdateConfigurationCollectionItem + from .software_update_configuration_list_result import SoftwareUpdateConfigurationListResult + from .update_configuration_navigation import UpdateConfigurationNavigation + from .software_update_configuration_run import SoftwareUpdateConfigurationRun + from .software_update_configuration_run_list_result import SoftwareUpdateConfigurationRunListResult + from .job_navigation import JobNavigation + from .software_update_configuration_machine_run import SoftwareUpdateConfigurationMachineRun + from .software_update_configuration_machine_run_list_result import SoftwareUpdateConfigurationMachineRunListResult + from .source_control import SourceControl + from .source_control_security_token_properties import SourceControlSecurityTokenProperties + from .source_control_update_parameters import SourceControlUpdateParameters + from .source_control_create_or_update_parameters import SourceControlCreateOrUpdateParameters + from .source_control_sync_job import SourceControlSyncJob + from .source_control_sync_job_create_parameters import SourceControlSyncJobCreateParameters + from .source_control_sync_job_by_id import SourceControlSyncJobById + from .source_control_sync_job_stream import SourceControlSyncJobStream + from .source_control_sync_job_stream_by_id import SourceControlSyncJobStreamById + from .job import Job + from .job_collection_item import JobCollectionItem + from .job_create_parameters import JobCreateParameters + from .dsc_report_error import DscReportError + from .dsc_report_resource_navigation import DscReportResourceNavigation + from .dsc_report_resource import DscReportResource + from .dsc_meta_configuration import DscMetaConfiguration + from .dsc_node_report import DscNodeReport + from .agent_registration_keys import AgentRegistrationKeys + from .agent_registration import AgentRegistration + from .dsc_node_extension_handler_association_property import DscNodeExtensionHandlerAssociationProperty + from .dsc_node import DscNode + from .agent_registration_regenerate_key_parameter import AgentRegistrationRegenerateKeyParameter + from .dsc_node_update_parameters_properties import DscNodeUpdateParametersProperties + from .dsc_node_update_parameters import DscNodeUpdateParameters + from .dsc_configuration_association_property import DscConfigurationAssociationProperty + from .dsc_compilation_job import DscCompilationJob + from .dsc_compilation_job_create_parameters import DscCompilationJobCreateParameters + from .dsc_node_configuration import DscNodeConfiguration + from .dsc_node_configuration_create_or_update_parameters import DscNodeConfigurationCreateOrUpdateParameters + from .node_count_properties import NodeCountProperties + from .node_count import NodeCount + from .node_counts import NodeCounts +from .automation_account_paged import AutomationAccountPaged +from .operation_paged import OperationPaged +from .statistics_paged import StatisticsPaged +from .usage_paged import UsagePaged +from .certificate_paged import CertificatePaged +from .connection_paged import ConnectionPaged +from .connection_type_paged import ConnectionTypePaged +from .credential_paged import CredentialPaged +from .dsc_configuration_paged import DscConfigurationPaged +from .hybrid_runbook_worker_group_paged import HybridRunbookWorkerGroupPaged +from .job_schedule_paged import JobSchedulePaged +from .activity_paged import ActivityPaged +from .module_paged import ModulePaged +from .type_field_paged import TypeFieldPaged +from .runbook_paged import RunbookPaged +from .job_stream_paged import JobStreamPaged +from .schedule_paged import SchedulePaged +from .variable_paged import VariablePaged +from .webhook_paged import WebhookPaged +from .watcher_paged import WatcherPaged +from .source_control_paged import SourceControlPaged +from .source_control_sync_job_paged import SourceControlSyncJobPaged +from .source_control_sync_job_stream_paged import SourceControlSyncJobStreamPaged +from .job_collection_item_paged import JobCollectionItemPaged +from .dsc_node_paged import DscNodePaged +from .dsc_node_report_paged import DscNodeReportPaged +from .dsc_compilation_job_paged import DscCompilationJobPaged +from .dsc_node_configuration_paged import DscNodeConfigurationPaged +from .automation_client_enums import ( + SkuNameEnum, + AutomationAccountState, + AutomationKeyName, + AutomationKeyPermissions, + ContentSourceType, + DscConfigurationProvisioningState, + DscConfigurationState, + GroupTypeEnum, + ModuleProvisioningState, + RunbookTypeEnum, + RunbookState, + RunbookProvisioningState, + HttpStatusCode, + JobStreamType, + ScheduleDay, + ScheduleFrequency, + OperatingSystemType, + WindowsUpdateClasses, + LinuxUpdateClasses, + SourceType, + TokenType, + ProvisioningState, + SyncType, + StreamType, + JobStatus, + JobProvisioningState, + AgentRegistrationKeyName, + CountType, +) + +__all__ = [ + 'Sku', + 'AutomationAccount', + 'AutomationAccountCreateOrUpdateParameters', + 'OperationDisplay', + 'Operation', + 'Statistics', + 'UsageCounterName', + 'Usage', + 'Key', + 'KeyListResult', + 'AutomationAccountUpdateParameters', + 'ProxyResource', + 'Resource', + 'TrackedResource', + 'ErrorResponse', 'ErrorResponseException', + 'CertificateCreateOrUpdateParameters', + 'Certificate', + 'CertificateUpdateParameters', + 'ConnectionTypeAssociationProperty', + 'ConnectionCreateOrUpdateParameters', + 'Connection', + 'ConnectionUpdateParameters', + 'FieldDefinition', + 'ConnectionType', + 'ConnectionTypeCreateOrUpdateParameters', + 'CredentialCreateOrUpdateParameters', + 'Credential', + 'CredentialUpdateParameters', + 'ContentHash', + 'ContentSource', + 'DscConfigurationParameter', + 'DscConfigurationCreateOrUpdateParameters', + 'DscConfiguration', + 'DscConfigurationUpdateParameters', + 'RunAsCredentialAssociationProperty', + 'HybridRunbookWorker', + 'HybridRunbookWorkerGroup', + 'HybridRunbookWorkerGroupUpdateParameters', + 'ScheduleAssociationProperty', + 'RunbookAssociationProperty', + 'JobSchedule', + 'JobScheduleCreateParameters', + 'LinkedWorkspace', + 'ActivityParameterValidationSet', + 'ActivityParameter', + 'ActivityParameterSet', + 'ActivityOutputType', + 'Activity', + 'ModuleErrorInfo', + 'ContentLink', + 'Module', + 'ModuleCreateOrUpdateParameters', + 'ModuleUpdateParameters', + 'TypeField', + 'RunbookParameter', + 'RunbookDraft', + 'Runbook', + 'RunbookCreateOrUpdateParameters', + 'RunbookUpdateParameters', + 'RunbookDraftUndoEditResult', + 'TestJobCreateParameters', + 'TestJob', + 'RunbookCreateOrUpdateDraftProperties', + 'RunbookCreateOrUpdateDraftParameters', + 'JobStream', + 'JobStreamListResult', + 'AdvancedScheduleMonthlyOccurrence', + 'AdvancedSchedule', + 'ScheduleCreateOrUpdateParameters', + 'ScheduleProperties', + 'Schedule', + 'ScheduleUpdateParameters', + 'VariableCreateOrUpdateParameters', + 'Variable', + 'VariableUpdateParameters', + 'Webhook', + 'WebhookUpdateParameters', + 'WebhookCreateOrUpdateParameters', + 'Watcher', + 'WatcherUpdateParameters', + 'WindowsProperties', + 'LinuxProperties', + 'UpdateConfiguration', + 'SoftwareUpdateConfiguration', + 'CollectionItemUpdateConfiguration', + 'SoftwareUpdateConfigurationCollectionItem', + 'SoftwareUpdateConfigurationListResult', + 'UpdateConfigurationNavigation', + 'SoftwareUpdateConfigurationRun', + 'SoftwareUpdateConfigurationRunListResult', + 'JobNavigation', + 'SoftwareUpdateConfigurationMachineRun', + 'SoftwareUpdateConfigurationMachineRunListResult', + 'SourceControl', + 'SourceControlSecurityTokenProperties', + 'SourceControlUpdateParameters', + 'SourceControlCreateOrUpdateParameters', + 'SourceControlSyncJob', + 'SourceControlSyncJobCreateParameters', + 'SourceControlSyncJobById', + 'SourceControlSyncJobStream', + 'SourceControlSyncJobStreamById', + 'Job', + 'JobCollectionItem', + 'JobCreateParameters', + 'DscReportError', + 'DscReportResourceNavigation', + 'DscReportResource', + 'DscMetaConfiguration', + 'DscNodeReport', + 'AgentRegistrationKeys', + 'AgentRegistration', + 'DscNodeExtensionHandlerAssociationProperty', + 'DscNode', + 'AgentRegistrationRegenerateKeyParameter', + 'DscNodeUpdateParametersProperties', + 'DscNodeUpdateParameters', + 'DscConfigurationAssociationProperty', + 'DscCompilationJob', + 'DscCompilationJobCreateParameters', + 'DscNodeConfiguration', + 'DscNodeConfigurationCreateOrUpdateParameters', + 'NodeCountProperties', + 'NodeCount', + 'NodeCounts', + 'AutomationAccountPaged', + 'OperationPaged', + 'StatisticsPaged', + 'UsagePaged', + 'CertificatePaged', + 'ConnectionPaged', + 'ConnectionTypePaged', + 'CredentialPaged', + 'DscConfigurationPaged', + 'HybridRunbookWorkerGroupPaged', + 'JobSchedulePaged', + 'ActivityPaged', + 'ModulePaged', + 'TypeFieldPaged', + 'RunbookPaged', + 'JobStreamPaged', + 'SchedulePaged', + 'VariablePaged', + 'WebhookPaged', + 'WatcherPaged', + 'SourceControlPaged', + 'SourceControlSyncJobPaged', + 'SourceControlSyncJobStreamPaged', + 'JobCollectionItemPaged', + 'DscNodePaged', + 'DscNodeReportPaged', + 'DscCompilationJobPaged', + 'DscNodeConfigurationPaged', + 'SkuNameEnum', + 'AutomationAccountState', + 'AutomationKeyName', + 'AutomationKeyPermissions', + 'ContentSourceType', + 'DscConfigurationProvisioningState', + 'DscConfigurationState', + 'GroupTypeEnum', + 'ModuleProvisioningState', + 'RunbookTypeEnum', + 'RunbookState', + 'RunbookProvisioningState', + 'HttpStatusCode', + 'JobStreamType', + 'ScheduleDay', + 'ScheduleFrequency', + 'OperatingSystemType', + 'WindowsUpdateClasses', + 'LinuxUpdateClasses', + 'SourceType', + 'TokenType', + 'ProvisioningState', + 'SyncType', + 'StreamType', + 'JobStatus', + 'JobProvisioningState', + 'AgentRegistrationKeyName', + 'CountType', +] diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity.py new file mode 100644 index 000000000000..e8aea9bc54e3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class Activity(Model): + """Definition of the activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Gets or sets the id of the resource. + :type id: str + :ivar name: Gets the name of the activity. + :vartype name: str + :param definition: Gets or sets the user name of the activity. + :type definition: str + :param parameter_sets: Gets or sets the parameter sets of the activity. + :type parameter_sets: + list[~azure.mgmt.automation.models.ActivityParameterSet] + :param output_types: Gets or sets the output types of the activity. + :type output_types: list[~azure.mgmt.automation.models.ActivityOutputType] + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'definition': {'key': 'properties.definition', 'type': 'str'}, + 'parameter_sets': {'key': 'properties.parameterSets', 'type': '[ActivityParameterSet]'}, + 'output_types': {'key': 'properties.outputTypes', 'type': '[ActivityOutputType]'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Activity, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.definition = kwargs.get('definition', None) + self.parameter_sets = kwargs.get('parameter_sets', None) + self.output_types = kwargs.get('output_types', 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type.py new file mode 100644 index 000000000000..1bdaff52b130 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ActivityOutputType(Model): + """Definition of the activity output type. + + :param name: Gets or sets the name of the activity output type. + :type name: str + :param type: Gets or sets the type of the activity output type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActivityOutputType, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type_py3.py new file mode 100644 index 000000000000..5dfb3cd40130 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_output_type_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ActivityOutputType(Model): + """Definition of the activity output type. + + :param name: Gets or sets the name of the activity output type. + :type name: str + :param type: Gets or sets the type of the activity output type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(ActivityOutputType, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_paged.py new file mode 100644 index 000000000000..2020f7cfa836 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`Activity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Activity]'} + } + + def __init__(self, *args, **kwargs): + + super(ActivityPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter.py new file mode 100644 index 000000000000..3a75dd47fa94 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter.py @@ -0,0 +1,82 @@ +# 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 msrest.serialization import Model + + +class ActivityParameter(Model): + """Definition of the activity parameter. + + :param name: Gets or sets the name of the activity parameter. + :type name: str + :param type: Gets or sets the type of the activity parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value that indicates true if + the parameter is required. If the value is false, the parameter is + optional. + :type is_mandatory: bool + :param is_dynamic: Gets or sets a Boolean value that indicates true if the + parameter is dynamic. + :type is_dynamic: bool + :param position: Gets or sets the position of the activity parameter. + :type position: long + :param value_from_pipeline: Gets or sets a Boolean value that indicates + true if the parameter can take values from the incoming pipeline objects. + This setting is used if the cmdlet must access the complete input object. + false indicates that the parameter cannot take values from the complete + input object. + :type value_from_pipeline: bool + :param value_from_pipeline_by_property_name: Gets or sets a Boolean value + that indicates true if the parameter can be filled from a property of the + incoming pipeline object that has the same name as this parameter. false + indicates that the parameter cannot be filled from the incoming pipeline + object property with the same name. + :type value_from_pipeline_by_property_name: bool + :param value_from_remaining_arguments: Gets or sets a Boolean value that + indicates true if the cmdlet parameter accepts all the remaining + command-line arguments that are associated with this parameter in the form + of an array. false if the cmdlet parameter does not accept all the + remaining argument values. + :type value_from_remaining_arguments: bool + :param description: Gets or sets the description of the activity + parameter. + :type description: str + :param validation_set: Gets or sets the validation set of activity + parameter. + :type validation_set: + list[~azure.mgmt.automation.models.ActivityParameterValidationSet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'is_dynamic': {'key': 'isDynamic', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'long'}, + 'value_from_pipeline': {'key': 'valueFromPipeline', 'type': 'bool'}, + 'value_from_pipeline_by_property_name': {'key': 'valueFromPipelineByPropertyName', 'type': 'bool'}, + 'value_from_remaining_arguments': {'key': 'valueFromRemainingArguments', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'validation_set': {'key': 'validationSet', 'type': '[ActivityParameterValidationSet]'}, + } + + def __init__(self, **kwargs): + super(ActivityParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.is_mandatory = kwargs.get('is_mandatory', None) + self.is_dynamic = kwargs.get('is_dynamic', None) + self.position = kwargs.get('position', None) + self.value_from_pipeline = kwargs.get('value_from_pipeline', None) + self.value_from_pipeline_by_property_name = kwargs.get('value_from_pipeline_by_property_name', None) + self.value_from_remaining_arguments = kwargs.get('value_from_remaining_arguments', None) + self.description = kwargs.get('description', None) + self.validation_set = kwargs.get('validation_set', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_py3.py new file mode 100644 index 000000000000..d9a73b2493cd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_py3.py @@ -0,0 +1,82 @@ +# 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 msrest.serialization import Model + + +class ActivityParameter(Model): + """Definition of the activity parameter. + + :param name: Gets or sets the name of the activity parameter. + :type name: str + :param type: Gets or sets the type of the activity parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value that indicates true if + the parameter is required. If the value is false, the parameter is + optional. + :type is_mandatory: bool + :param is_dynamic: Gets or sets a Boolean value that indicates true if the + parameter is dynamic. + :type is_dynamic: bool + :param position: Gets or sets the position of the activity parameter. + :type position: long + :param value_from_pipeline: Gets or sets a Boolean value that indicates + true if the parameter can take values from the incoming pipeline objects. + This setting is used if the cmdlet must access the complete input object. + false indicates that the parameter cannot take values from the complete + input object. + :type value_from_pipeline: bool + :param value_from_pipeline_by_property_name: Gets or sets a Boolean value + that indicates true if the parameter can be filled from a property of the + incoming pipeline object that has the same name as this parameter. false + indicates that the parameter cannot be filled from the incoming pipeline + object property with the same name. + :type value_from_pipeline_by_property_name: bool + :param value_from_remaining_arguments: Gets or sets a Boolean value that + indicates true if the cmdlet parameter accepts all the remaining + command-line arguments that are associated with this parameter in the form + of an array. false if the cmdlet parameter does not accept all the + remaining argument values. + :type value_from_remaining_arguments: bool + :param description: Gets or sets the description of the activity + parameter. + :type description: str + :param validation_set: Gets or sets the validation set of activity + parameter. + :type validation_set: + list[~azure.mgmt.automation.models.ActivityParameterValidationSet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'is_dynamic': {'key': 'isDynamic', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'long'}, + 'value_from_pipeline': {'key': 'valueFromPipeline', 'type': 'bool'}, + 'value_from_pipeline_by_property_name': {'key': 'valueFromPipelineByPropertyName', 'type': 'bool'}, + 'value_from_remaining_arguments': {'key': 'valueFromRemainingArguments', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'validation_set': {'key': 'validationSet', 'type': '[ActivityParameterValidationSet]'}, + } + + def __init__(self, *, name: str=None, type: str=None, is_mandatory: bool=None, is_dynamic: bool=None, position: int=None, value_from_pipeline: bool=None, value_from_pipeline_by_property_name: bool=None, value_from_remaining_arguments: bool=None, description: str=None, validation_set=None, **kwargs) -> None: + super(ActivityParameter, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_mandatory = is_mandatory + self.is_dynamic = is_dynamic + self.position = position + self.value_from_pipeline = value_from_pipeline + self.value_from_pipeline_by_property_name = value_from_pipeline_by_property_name + self.value_from_remaining_arguments = value_from_remaining_arguments + self.description = description + self.validation_set = validation_set diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set.py new file mode 100644 index 000000000000..ab331d6c74f7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class ActivityParameterSet(Model): + """Definition of the activity parameter set. + + :param name: Gets or sets the name of the activity parameter set. + :type name: str + :param parameters: Gets or sets the parameters of the activity parameter + set. + :type parameters: list[~azure.mgmt.automation.models.ActivityParameter] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ActivityParameter]'}, + } + + def __init__(self, **kwargs): + super(ActivityParameterSet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set_py3.py new file mode 100644 index 000000000000..0835b9adccd8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_set_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class ActivityParameterSet(Model): + """Definition of the activity parameter set. + + :param name: Gets or sets the name of the activity parameter set. + :type name: str + :param parameters: Gets or sets the parameters of the activity parameter + set. + :type parameters: list[~azure.mgmt.automation.models.ActivityParameter] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ActivityParameter]'}, + } + + def __init__(self, *, name: str=None, parameters=None, **kwargs) -> None: + super(ActivityParameterSet, self).__init__(**kwargs) + self.name = name + self.parameters = parameters diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set.py new file mode 100644 index 000000000000..92efa86a720e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ActivityParameterValidationSet(Model): + """Definition of the activity parameter validation set. + + :param member_value: Gets or sets the name of the activity parameter + validation set member. + :type member_value: str + """ + + _attribute_map = { + 'member_value': {'key': 'memberValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActivityParameterValidationSet, self).__init__(**kwargs) + self.member_value = kwargs.get('member_value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set_py3.py new file mode 100644 index 000000000000..971f1ee02058 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_parameter_validation_set_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ActivityParameterValidationSet(Model): + """Definition of the activity parameter validation set. + + :param member_value: Gets or sets the name of the activity parameter + validation set member. + :type member_value: str + """ + + _attribute_map = { + 'member_value': {'key': 'memberValue', 'type': 'str'}, + } + + def __init__(self, *, member_value: str=None, **kwargs) -> None: + super(ActivityParameterValidationSet, self).__init__(**kwargs) + self.member_value = member_value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/activity_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/activity_py3.py new file mode 100644 index 000000000000..b44113544c75 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/activity_py3.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class Activity(Model): + """Definition of the activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Gets or sets the id of the resource. + :type id: str + :ivar name: Gets the name of the activity. + :vartype name: str + :param definition: Gets or sets the user name of the activity. + :type definition: str + :param parameter_sets: Gets or sets the parameter sets of the activity. + :type parameter_sets: + list[~azure.mgmt.automation.models.ActivityParameterSet] + :param output_types: Gets or sets the output types of the activity. + :type output_types: list[~azure.mgmt.automation.models.ActivityOutputType] + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'definition': {'key': 'properties.definition', 'type': 'str'}, + 'parameter_sets': {'key': 'properties.parameterSets', 'type': '[ActivityParameterSet]'}, + 'output_types': {'key': 'properties.outputTypes', 'type': '[ActivityOutputType]'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, definition: str=None, parameter_sets=None, output_types=None, creation_time=None, last_modified_time=None, description: str=None, **kwargs) -> None: + super(Activity, self).__init__(**kwargs) + self.id = id + self.name = None + self.definition = definition + self.parameter_sets = parameter_sets + self.output_types = output_types + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule.py b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule.py new file mode 100644 index 000000000000..4f989d9d626b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class AdvancedSchedule(Model): + """The properties of the create Advanced Schedule. + + :param week_days: Days of the week that the job should execute on. + :type week_days: list[str] + :param month_days: Days of the month that the job should execute on. Must + be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Occurrences of days within a month. + :type monthly_occurrences: + list[~azure.mgmt.automation.models.AdvancedScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[str]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[AdvancedScheduleMonthlyOccurrence]'}, + } + + def __init__(self, **kwargs): + super(AdvancedSchedule, self).__init__(**kwargs) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence.py b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence.py new file mode 100644 index 000000000000..38613a2e3d12 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class AdvancedScheduleMonthlyOccurrence(Model): + """The properties of the create advanced schedule monthly occurrence. + + :param occurrence: Occurrence of the week within the month. Must be + between 1 and 5 + :type occurrence: int + :param day: Day of the occurrence. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.automation.models.ScheduleDay + """ + + _attribute_map = { + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + 'day': {'key': 'day', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdvancedScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.occurrence = kwargs.get('occurrence', None) + self.day = kwargs.get('day', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence_py3.py new file mode 100644 index 000000000000..067f245ad80f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_monthly_occurrence_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class AdvancedScheduleMonthlyOccurrence(Model): + """The properties of the create advanced schedule monthly occurrence. + + :param occurrence: Occurrence of the week within the month. Must be + between 1 and 5 + :type occurrence: int + :param day: Day of the occurrence. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.automation.models.ScheduleDay + """ + + _attribute_map = { + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + 'day': {'key': 'day', 'type': 'str'}, + } + + def __init__(self, *, occurrence: int=None, day=None, **kwargs) -> None: + super(AdvancedScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.occurrence = occurrence + self.day = day diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_py3.py new file mode 100644 index 000000000000..055f0fba2d02 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/advanced_schedule_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class AdvancedSchedule(Model): + """The properties of the create Advanced Schedule. + + :param week_days: Days of the week that the job should execute on. + :type week_days: list[str] + :param month_days: Days of the month that the job should execute on. Must + be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Occurrences of days within a month. + :type monthly_occurrences: + list[~azure.mgmt.automation.models.AdvancedScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[str]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[AdvancedScheduleMonthlyOccurrence]'}, + } + + def __init__(self, *, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(AdvancedSchedule, self).__init__(**kwargs) + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration.py new file mode 100644 index 000000000000..63dc3b228888 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class AgentRegistration(Model): + """Definition of the agent registration infomration type. + + :param dsc_meta_configuration: Gets or sets the dsc meta configuration. + :type dsc_meta_configuration: str + :param endpoint: Gets or sets the dsc server endpoint. + :type endpoint: str + :param keys: Gets or sets the agent registration keys. + :type keys: ~azure.mgmt.automation.models.AgentRegistrationKeys + :param id: Gets or sets the id. + :type id: str + """ + + _attribute_map = { + 'dsc_meta_configuration': {'key': 'dscMetaConfiguration', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'AgentRegistrationKeys'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AgentRegistration, self).__init__(**kwargs) + self.dsc_meta_configuration = kwargs.get('dsc_meta_configuration', None) + self.endpoint = kwargs.get('endpoint', None) + self.keys = kwargs.get('keys', None) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys.py new file mode 100644 index 000000000000..137865da016f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class AgentRegistrationKeys(Model): + """Definition of the agent registration keys. + + :param primary: Gets or sets the primary key. + :type primary: str + :param secondary: Gets or sets the secondary key. + :type secondary: str + """ + + _attribute_map = { + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AgentRegistrationKeys, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + self.secondary = kwargs.get('secondary', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys_py3.py new file mode 100644 index 000000000000..2d38c305260c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_keys_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class AgentRegistrationKeys(Model): + """Definition of the agent registration keys. + + :param primary: Gets or sets the primary key. + :type primary: str + :param secondary: Gets or sets the secondary key. + :type secondary: str + """ + + _attribute_map = { + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, *, primary: str=None, secondary: str=None, **kwargs) -> None: + super(AgentRegistrationKeys, self).__init__(**kwargs) + self.primary = primary + self.secondary = secondary diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_py3.py new file mode 100644 index 000000000000..9c5f8e329008 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class AgentRegistration(Model): + """Definition of the agent registration infomration type. + + :param dsc_meta_configuration: Gets or sets the dsc meta configuration. + :type dsc_meta_configuration: str + :param endpoint: Gets or sets the dsc server endpoint. + :type endpoint: str + :param keys: Gets or sets the agent registration keys. + :type keys: ~azure.mgmt.automation.models.AgentRegistrationKeys + :param id: Gets or sets the id. + :type id: str + """ + + _attribute_map = { + 'dsc_meta_configuration': {'key': 'dscMetaConfiguration', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'AgentRegistrationKeys'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, dsc_meta_configuration: str=None, endpoint: str=None, keys=None, id: str=None, **kwargs) -> None: + super(AgentRegistration, self).__init__(**kwargs) + self.dsc_meta_configuration = dsc_meta_configuration + self.endpoint = endpoint + self.keys = keys + self.id = id diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter.py new file mode 100644 index 000000000000..7ecbae09165d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class AgentRegistrationRegenerateKeyParameter(Model): + """The parameters supplied to the regenerate keys operation. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. Gets or sets the agent registration key name - + primary or secondary. Possible values include: 'primary', 'secondary' + :type key_name: str or + ~azure.mgmt.automation.models.AgentRegistrationKeyName + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AgentRegistrationRegenerateKeyParameter, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter_py3.py new file mode 100644 index 000000000000..c4ae457c3563 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/agent_registration_regenerate_key_parameter_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class AgentRegistrationRegenerateKeyParameter(Model): + """The parameters supplied to the regenerate keys operation. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. Gets or sets the agent registration key name - + primary or secondary. Possible values include: 'primary', 'secondary' + :type key_name: str or + ~azure.mgmt.automation.models.AgentRegistrationKeyName + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name, **kwargs) -> None: + super(AgentRegistrationRegenerateKeyParameter, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account.py new file mode 100644 index 000000000000..46bb437d295c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account.py @@ -0,0 +1,81 @@ +# 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 .tracked_resource import TrackedResource + + +class AutomationAccount(TrackedResource): + """Definition of the automation account type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :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. + :type last_modified_by: str + :ivar state: Gets status of account. Possible values include: 'Ok', + 'Unavailable', 'Suspended' + :vartype state: str or + ~azure.mgmt.automation.models.AutomationAccountState + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + '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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutomationAccount, self).__init__(**kwargs) + 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.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters.py new file mode 100644 index 000000000000..75c83d7ced9f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class AutomationAccountCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update automation account + operation. + + :param sku: Gets or sets account SKU. + :type sku: ~azure.mgmt.automation.models.Sku + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(AutomationAccountCreateOrUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..33252b8ecd54 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_create_or_update_parameters_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class AutomationAccountCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update automation account + operation. + + :param sku: Gets or sets account SKU. + :type sku: ~azure.mgmt.automation.models.Sku + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(AutomationAccountCreateOrUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_paged.py new file mode 100644 index 000000000000..2ded30ea0c31 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class AutomationAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`AutomationAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AutomationAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(AutomationAccountPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_py3.py new file mode 100644 index 000000000000..edb7aa61b565 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_py3.py @@ -0,0 +1,81 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class AutomationAccount(TrackedResource): + """Definition of the automation account type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :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. + :type last_modified_by: str + :ivar state: Gets status of account. Possible values include: 'Ok', + 'Unavailable', 'Suspended' + :vartype state: str or + ~azure.mgmt.automation.models.AutomationAccountState + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + '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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, sku=None, last_modified_by: str=None, description: str=None, etag: str=None, **kwargs) -> None: + super(AutomationAccount, self).__init__(tags=tags, location=location, **kwargs) + 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.etag = etag diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters.py new file mode 100644 index 000000000000..9493f7811def --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class AutomationAccountUpdateParameters(Model): + """The parameters supplied to the update automation account operation. + + :param sku: Gets or sets account SKU. + :type sku: ~azure.mgmt.automation.models.Sku + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(AutomationAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters_py3.py new file mode 100644 index 000000000000..41ffeb1ca0c7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_account_update_parameters_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class AutomationAccountUpdateParameters(Model): + """The parameters supplied to the update automation account operation. + + :param sku: Gets or sets account SKU. + :type sku: ~azure.mgmt.automation.models.Sku + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(AutomationAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py new file mode 100644 index 000000000000..27ff5fc7e27c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py @@ -0,0 +1,281 @@ +# 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 enum import Enum + + +class SkuNameEnum(str, Enum): + + free = "Free" + basic = "Basic" + + +class AutomationAccountState(str, Enum): + + ok = "Ok" + unavailable = "Unavailable" + suspended = "Suspended" + + +class AutomationKeyName(str, Enum): + + primary = "Primary" + secondary = "Secondary" + + +class AutomationKeyPermissions(str, Enum): + + read = "Read" + full = "Full" + + +class ContentSourceType(str, Enum): + + embedded_content = "embeddedContent" + uri = "uri" + + +class DscConfigurationProvisioningState(str, Enum): + + succeeded = "Succeeded" + + +class DscConfigurationState(str, Enum): + + new = "New" + edit = "Edit" + published = "Published" + + +class GroupTypeEnum(str, Enum): + + user = "User" + system = "System" + + +class ModuleProvisioningState(str, Enum): + + created = "Created" + creating = "Creating" + starting_import_module_runbook = "StartingImportModuleRunbook" + running_import_module_runbook = "RunningImportModuleRunbook" + content_retrieved = "ContentRetrieved" + content_downloaded = "ContentDownloaded" + content_validated = "ContentValidated" + connection_type_imported = "ConnectionTypeImported" + content_stored = "ContentStored" + module_data_stored = "ModuleDataStored" + activities_stored = "ActivitiesStored" + module_import_runbook_complete = "ModuleImportRunbookComplete" + succeeded = "Succeeded" + failed = "Failed" + cancelled = "Cancelled" + updating = "Updating" + + +class RunbookTypeEnum(str, Enum): + + script = "Script" + graph = "Graph" + power_shell_workflow = "PowerShellWorkflow" + power_shell = "PowerShell" + graph_power_shell_workflow = "GraphPowerShellWorkflow" + graph_power_shell = "GraphPowerShell" + + +class RunbookState(str, Enum): + + new = "New" + edit = "Edit" + published = "Published" + + +class RunbookProvisioningState(str, Enum): + + succeeded = "Succeeded" + + +class HttpStatusCode(str, Enum): + + continue_enum = "Continue" + switching_protocols = "SwitchingProtocols" + ok = "OK" + created = "Created" + accepted = "Accepted" + non_authoritative_information = "NonAuthoritativeInformation" + no_content = "NoContent" + reset_content = "ResetContent" + partial_content = "PartialContent" + multiple_choices = "MultipleChoices" + ambiguous = "Ambiguous" + moved_permanently = "MovedPermanently" + moved = "Moved" + found = "Found" + redirect = "Redirect" + see_other = "SeeOther" + redirect_method = "RedirectMethod" + not_modified = "NotModified" + use_proxy = "UseProxy" + unused = "Unused" + temporary_redirect = "TemporaryRedirect" + redirect_keep_verb = "RedirectKeepVerb" + bad_request = "BadRequest" + unauthorized = "Unauthorized" + payment_required = "PaymentRequired" + forbidden = "Forbidden" + not_found = "NotFound" + method_not_allowed = "MethodNotAllowed" + not_acceptable = "NotAcceptable" + proxy_authentication_required = "ProxyAuthenticationRequired" + request_timeout = "RequestTimeout" + conflict = "Conflict" + gone = "Gone" + length_required = "LengthRequired" + precondition_failed = "PreconditionFailed" + request_entity_too_large = "RequestEntityTooLarge" + request_uri_too_long = "RequestUriTooLong" + unsupported_media_type = "UnsupportedMediaType" + requested_range_not_satisfiable = "RequestedRangeNotSatisfiable" + expectation_failed = "ExpectationFailed" + upgrade_required = "UpgradeRequired" + internal_server_error = "InternalServerError" + not_implemented = "NotImplemented" + bad_gateway = "BadGateway" + service_unavailable = "ServiceUnavailable" + gateway_timeout = "GatewayTimeout" + http_version_not_supported = "HttpVersionNotSupported" + + +class JobStreamType(str, Enum): + + progress = "Progress" + output = "Output" + warning = "Warning" + error = "Error" + debug = "Debug" + verbose = "Verbose" + any = "Any" + + +class ScheduleDay(str, Enum): + + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + sunday = "Sunday" + + +class ScheduleFrequency(str, Enum): + + one_time = "OneTime" + day = "Day" + hour = "Hour" + week = "Week" + month = "Month" + + +class OperatingSystemType(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class WindowsUpdateClasses(str, Enum): + + unclassified = "Unclassified" + critical = "Critical" + security = "Security" + update_rollup = "UpdateRollup" + feature_pack = "FeaturePack" + service_pack = "ServicePack" + definition = "Definition" + tools = "Tools" + updates = "Updates" + + +class LinuxUpdateClasses(str, Enum): + + unclassified = "Unclassified" + critical = "Critical" + security = "Security" + other = "Other" + + +class SourceType(str, Enum): + + vso_git = "VsoGit" + vso_tfvc = "VsoTfvc" + git_hub = "GitHub" + + +class TokenType(str, Enum): + + personal_access_token = "PersonalAccessToken" + oauth = "Oauth" + + +class ProvisioningState(str, Enum): + + completed = "Completed" + failed = "Failed" + running = "Running" + + +class SyncType(str, Enum): + + partial_sync = "PartialSync" + full_sync = "FullSync" + + +class StreamType(str, Enum): + + error = "Error" + output = "Output" + + +class JobStatus(str, Enum): + + new = "New" + activating = "Activating" + running = "Running" + completed = "Completed" + failed = "Failed" + stopped = "Stopped" + blocked = "Blocked" + suspended = "Suspended" + disconnected = "Disconnected" + suspending = "Suspending" + stopping = "Stopping" + resuming = "Resuming" + removing = "Removing" + + +class JobProvisioningState(str, Enum): + + failed = "Failed" + succeeded = "Succeeded" + suspended = "Suspended" + processing = "Processing" + + +class AgentRegistrationKeyName(str, Enum): + + primary = "primary" + secondary = "secondary" + + +class CountType(str, Enum): + + status = "status" + nodeconfiguration = "nodeconfiguration" diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate.py new file mode 100644 index 000000000000..d116817e726f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate.py @@ -0,0 +1,71 @@ +# 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 .proxy_resource import ProxyResource + + +class Certificate(ProxyResource): + """Definition of the certificate. + + 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 thumbprint: Gets the thumbprint of the certificate. + :vartype thumbprint: str + :ivar expiry_time: Gets the expiry time of the certificate. + :vartype expiry_time: datetime + :ivar is_exportable: Gets the is exportable flag of the certificate. + :vartype is_exportable: bool + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'is_exportable': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'is_exportable': {'key': 'properties.isExportable', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint = None + self.expiry_time = None + self.is_exportable = None + self.creation_time = None + self.last_modified_time = None + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters.py new file mode 100644 index 000000000000..1be51ecfea4a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class CertificateCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update or replace certificate + operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the certificate. + :type name: str + :param base64_value: Required. Gets or sets the base64 encoded value of + the certificate. + :type base64_value: str + :param description: Gets or sets the description of the certificate. + :type description: str + :param thumbprint: Gets or sets the thumbprint of the certificate. + :type thumbprint: str + :param is_exportable: Gets or sets the is exportable flag of the + certificate. + :type is_exportable: bool + """ + + _validation = { + 'name': {'required': True}, + 'base64_value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'base64_value': {'key': 'properties.base64Value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'is_exportable': {'key': 'properties.isExportable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.base64_value = kwargs.get('base64_value', None) + self.description = kwargs.get('description', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.is_exportable = kwargs.get('is_exportable', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..609f6bf4cfb1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_create_or_update_parameters_py3.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class CertificateCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update or replace certificate + operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the certificate. + :type name: str + :param base64_value: Required. Gets or sets the base64 encoded value of + the certificate. + :type base64_value: str + :param description: Gets or sets the description of the certificate. + :type description: str + :param thumbprint: Gets or sets the thumbprint of the certificate. + :type thumbprint: str + :param is_exportable: Gets or sets the is exportable flag of the + certificate. + :type is_exportable: bool + """ + + _validation = { + 'name': {'required': True}, + 'base64_value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'base64_value': {'key': 'properties.base64Value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'is_exportable': {'key': 'properties.isExportable', 'type': 'bool'}, + } + + def __init__(self, *, name: str, base64_value: str, description: str=None, thumbprint: str=None, is_exportable: bool=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.base64_value = base64_value + self.description = description + self.thumbprint = thumbprint + self.is_exportable = is_exportable diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_paged.py new file mode 100644 index 000000000000..bb13e8ce3b97 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_py3.py new file mode 100644 index 000000000000..473492406f94 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_py3.py @@ -0,0 +1,71 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Certificate(ProxyResource): + """Definition of the certificate. + + 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 thumbprint: Gets the thumbprint of the certificate. + :vartype thumbprint: str + :ivar expiry_time: Gets the expiry time of the certificate. + :vartype expiry_time: datetime + :ivar is_exportable: Gets the is exportable flag of the certificate. + :vartype is_exportable: bool + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'is_exportable': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'is_exportable': {'key': 'properties.isExportable', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint = None + self.expiry_time = None + self.is_exportable = None + self.creation_time = None + self.last_modified_time = None + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters.py new file mode 100644 index 000000000000..5f92cca4c652 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class CertificateUpdateParameters(Model): + """The parameters supplied to the update certificate operation. + + :param name: Gets or sets the name of the certificate. + :type name: str + :param description: Gets or sets the description of the certificate. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters_py3.py new file mode 100644 index 000000000000..4aeac9c6aeba --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/certificate_update_parameters_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class CertificateUpdateParameters(Model): + """The parameters supplied to the update certificate operation. + + :param name: Gets or sets the name of the certificate. + :type name: str + :param description: Gets or sets the description of the certificate. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + super(CertificateUpdateParameters, self).__init__(**kwargs) + self.name = name + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration.py new file mode 100644 index 000000000000..8102bddec71b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class CollectionItemUpdateConfiguration(Model): + """object returned when requesting a collection of software update + configuration. + + :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: timedelta + """ + + _attribute_map = { + 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration_py3.py new file mode 100644 index 000000000000..6ec50c07c0bd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/collection_item_update_configuration_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class CollectionItemUpdateConfiguration(Model): + """object returned when requesting a collection of software update + configuration. + + :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: timedelta + """ + + _attribute_map = { + 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, azure_virtual_machines=None, duration=None, **kwargs) -> None: + super(CollectionItemUpdateConfiguration, self).__init__(**kwargs) + self.azure_virtual_machines = azure_virtual_machines + self.duration = duration diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection.py new file mode 100644 index 000000000000..2394b4294119 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection.py @@ -0,0 +1,67 @@ +# 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 .proxy_resource import ProxyResource + + +class Connection(ProxyResource): + """Definition of the 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 connection_type: Gets or sets the connectionType of the connection. + :type connection_type: + ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty + :ivar field_definition_values: Gets the field definition values of the + connection. + :vartype field_definition_values: dict[str, str] + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'field_definition_values': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ConnectionTypeAssociationProperty'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', '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'}, + } + + def __init__(self, **kwargs): + super(Connection, self).__init__(**kwargs) + self.connection_type = kwargs.get('connection_type', None) + self.field_definition_values = None + self.creation_time = None + self.last_modified_time = None + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters.py new file mode 100644 index 000000000000..b6de8724130f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ConnectionCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update connection operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the connection. + :type name: str + :param description: Gets or sets the description of the connection. + :type description: str + :param connection_type: Required. Gets or sets the connectionType of the + connection. + :type connection_type: + ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty + :param field_definition_values: Gets or sets the field definition + properties of the connection. + :type field_definition_values: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ConnectionTypeAssociationProperty'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ConnectionCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.connection_type = kwargs.get('connection_type', None) + self.field_definition_values = kwargs.get('field_definition_values', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..60f11d5ea5ef --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_create_or_update_parameters_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ConnectionCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update connection operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the connection. + :type name: str + :param description: Gets or sets the description of the connection. + :type description: str + :param connection_type: Required. Gets or sets the connectionType of the + connection. + :type connection_type: + ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty + :param field_definition_values: Gets or sets the field definition + properties of the connection. + :type field_definition_values: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ConnectionTypeAssociationProperty'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', 'type': '{str}'}, + } + + def __init__(self, *, name: str, connection_type, description: str=None, field_definition_values=None, **kwargs) -> None: + super(ConnectionCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.description = description + self.connection_type = connection_type + self.field_definition_values = field_definition_values diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_paged.py new file mode 100644 index 000000000000..fcae5786fd0d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Connection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Connection]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_py3.py new file mode 100644 index 000000000000..e24477b8959a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_py3.py @@ -0,0 +1,67 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Connection(ProxyResource): + """Definition of the 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 connection_type: Gets or sets the connectionType of the connection. + :type connection_type: + ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty + :ivar field_definition_values: Gets the field definition values of the + connection. + :vartype field_definition_values: dict[str, str] + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'field_definition_values': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ConnectionTypeAssociationProperty'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', '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'}, + } + + def __init__(self, *, connection_type=None, description: str=None, **kwargs) -> None: + super(Connection, self).__init__(**kwargs) + self.connection_type = connection_type + self.field_definition_values = None + self.creation_time = None + self.last_modified_time = None + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type.py new file mode 100644 index 000000000000..e53594e6567c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ConnectionType(Model): + """Definition of the connection type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the resource. + :vartype id: str + :ivar name: Gets the name of the connection type. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_global: Gets or sets a Boolean value to indicate if the + connection type is global. + :type is_global: bool + :ivar field_definitions: Gets the field definitions of the connection + type. + :vartype field_definitions: dict[str, + ~azure.mgmt.automation.models.FieldDefinition] + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'field_definitions': {'readonly': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'field_definitions': {'key': 'properties.fieldDefinitions', 'type': '{FieldDefinition}'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionType, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.is_global = kwargs.get('is_global', None) + self.field_definitions = None + self.creation_time = None + self.last_modified_time = kwargs.get('last_modified_time', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property.py new file mode 100644 index 000000000000..7be12278cddf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ConnectionTypeAssociationProperty(Model): + """The connection type property associated with the entity. + + :param name: Gets or sets the name of the connection type. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionTypeAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property_py3.py new file mode 100644 index 000000000000..1452ce7562f2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_association_property_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ConnectionTypeAssociationProperty(Model): + """The connection type property associated with the entity. + + :param name: Gets or sets the name of the connection type. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ConnectionTypeAssociationProperty, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters.py new file mode 100644 index 000000000000..5e7aceac131e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ConnectionTypeCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update connection type operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the connection type. + :type name: str + :param is_global: Gets or sets a Boolean value to indicate if the + connection type is global. + :type is_global: bool + :param field_definitions: Required. Gets or sets the field definitions of + the connection type. + :type field_definitions: dict[str, + ~azure.mgmt.automation.models.FieldDefinition] + """ + + _validation = { + 'name': {'required': True}, + 'field_definitions': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'field_definitions': {'key': 'properties.fieldDefinitions', 'type': '{FieldDefinition}'}, + } + + def __init__(self, **kwargs): + super(ConnectionTypeCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_global = kwargs.get('is_global', None) + self.field_definitions = kwargs.get('field_definitions', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..d36c20f059f3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_create_or_update_parameters_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ConnectionTypeCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update connection type operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the connection type. + :type name: str + :param is_global: Gets or sets a Boolean value to indicate if the + connection type is global. + :type is_global: bool + :param field_definitions: Required. Gets or sets the field definitions of + the connection type. + :type field_definitions: dict[str, + ~azure.mgmt.automation.models.FieldDefinition] + """ + + _validation = { + 'name': {'required': True}, + 'field_definitions': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'field_definitions': {'key': 'properties.fieldDefinitions', 'type': '{FieldDefinition}'}, + } + + def __init__(self, *, name: str, field_definitions, is_global: bool=None, **kwargs) -> None: + super(ConnectionTypeCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.is_global = is_global + self.field_definitions = field_definitions diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_paged.py new file mode 100644 index 000000000000..1ffa5ec5f162 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ConnectionTypePaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectionType ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectionType]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectionTypePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_py3.py new file mode 100644 index 000000000000..2d5b3fb27795 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_type_py3.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ConnectionType(Model): + """Definition of the connection type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the resource. + :vartype id: str + :ivar name: Gets the name of the connection type. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_global: Gets or sets a Boolean value to indicate if the + connection type is global. + :type is_global: bool + :ivar field_definitions: Gets the field definitions of the connection + type. + :vartype field_definitions: dict[str, + ~azure.mgmt.automation.models.FieldDefinition] + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'field_definitions': {'readonly': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'field_definitions': {'key': 'properties.fieldDefinitions', 'type': '{FieldDefinition}'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, is_global: bool=None, last_modified_time=None, description: str=None, **kwargs) -> None: + super(ConnectionType, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.is_global = is_global + self.field_definitions = None + self.creation_time = None + self.last_modified_time = last_modified_time + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters.py new file mode 100644 index 000000000000..844a4dfc11b4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ConnectionUpdateParameters(Model): + """The parameters supplied to the update connection operation. + + :param name: Gets or sets the name of the connection. + :type name: str + :param description: Gets or sets the description of the connection. + :type description: str + :param field_definition_values: Gets or sets the field definition values + of the connection. + :type field_definition_values: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ConnectionUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.field_definition_values = kwargs.get('field_definition_values', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters_py3.py new file mode 100644 index 000000000000..610a3ab24219 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/connection_update_parameters_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ConnectionUpdateParameters(Model): + """The parameters supplied to the update connection operation. + + :param name: Gets or sets the name of the connection. + :type name: str + :param description: Gets or sets the description of the connection. + :type description: str + :param field_definition_values: Gets or sets the field definition values + of the connection. + :type field_definition_values: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'field_definition_values': {'key': 'properties.fieldDefinitionValues', 'type': '{str}'}, + } + + def __init__(self, *, name: str=None, description: str=None, field_definition_values=None, **kwargs) -> None: + super(ConnectionUpdateParameters, self).__init__(**kwargs) + self.name = name + self.description = description + self.field_definition_values = field_definition_values diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_hash.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_hash.py new file mode 100644 index 000000000000..20857dc0ceda --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_hash.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ContentHash(Model): + """Definition of the runbook property type. + + All required parameters must be populated in order to send to Azure. + + :param algorithm: Required. Gets or sets the content hash algorithm used + to hash the content. + :type algorithm: str + :param value: Required. Gets or sets expected hash value of the content. + :type value: str + """ + + _validation = { + 'algorithm': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContentHash, self).__init__(**kwargs) + self.algorithm = kwargs.get('algorithm', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_hash_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_hash_py3.py new file mode 100644 index 000000000000..7e77ddf326df --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_hash_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ContentHash(Model): + """Definition of the runbook property type. + + All required parameters must be populated in order to send to Azure. + + :param algorithm: Required. Gets or sets the content hash algorithm used + to hash the content. + :type algorithm: str + :param value: Required. Gets or sets expected hash value of the content. + :type value: str + """ + + _validation = { + 'algorithm': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, algorithm: str, value: str, **kwargs) -> None: + super(ContentHash, self).__init__(**kwargs) + self.algorithm = algorithm + self.value = value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_link.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_link.py new file mode 100644 index 000000000000..9285bc0abfaf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_link.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ContentLink(Model): + """Definition of the content link. + + :param uri: Gets or sets the uri of the runbook content. + :type uri: str + :param content_hash: Gets or sets the hash. + :type content_hash: ~azure.mgmt.automation.models.ContentHash + :param version: Gets or sets the version of the content. + :type version: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContentLink, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.content_hash = kwargs.get('content_hash', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_link_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_link_py3.py new file mode 100644 index 000000000000..4361aa88158e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_link_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ContentLink(Model): + """Definition of the content link. + + :param uri: Gets or sets the uri of the runbook content. + :type uri: str + :param content_hash: Gets or sets the hash. + :type content_hash: ~azure.mgmt.automation.models.ContentHash + :param version: Gets or sets the version of the content. + :type version: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, content_hash=None, version: str=None, **kwargs) -> None: + super(ContentLink, self).__init__(**kwargs) + self.uri = uri + self.content_hash = content_hash + self.version = version diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_source.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_source.py new file mode 100644 index 000000000000..61a65f95f5a2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_source.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ContentSource(Model): + """Definition of the content source. + + :param hash: Gets or sets the hash. + :type hash: ~azure.mgmt.automation.models.ContentHash + :param type: Gets or sets the content source type. Possible values + include: 'embeddedContent', 'uri' + :type type: str or ~azure.mgmt.automation.models.ContentSourceType + :param value: Gets or sets the value of the content. This is based on the + content source type. + :type value: str + :param version: Gets or sets the version of the content. + :type version: str + """ + + _attribute_map = { + 'hash': {'key': 'hash', 'type': 'ContentHash'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContentSource, self).__init__(**kwargs) + self.hash = kwargs.get('hash', None) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/content_source_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/content_source_py3.py new file mode 100644 index 000000000000..5aadbc73bdd6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/content_source_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ContentSource(Model): + """Definition of the content source. + + :param hash: Gets or sets the hash. + :type hash: ~azure.mgmt.automation.models.ContentHash + :param type: Gets or sets the content source type. Possible values + include: 'embeddedContent', 'uri' + :type type: str or ~azure.mgmt.automation.models.ContentSourceType + :param value: Gets or sets the value of the content. This is based on the + content source type. + :type value: str + :param version: Gets or sets the version of the content. + :type version: str + """ + + _attribute_map = { + 'hash': {'key': 'hash', 'type': 'ContentHash'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, hash=None, type=None, value: str=None, version: str=None, **kwargs) -> None: + super(ContentSource, self).__init__(**kwargs) + self.hash = hash + self.type = type + self.value = value + self.version = version diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential.py new file mode 100644 index 000000000000..8c42c6c20316 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential.py @@ -0,0 +1,61 @@ +# 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 .proxy_resource import ProxyResource + + +class Credential(ProxyResource): + """Definition of the credential. + + 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 user_name: Gets the user name of the credential. + :vartype user_name: str + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', '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'}, + } + + def __init__(self, **kwargs): + super(Credential, self).__init__(**kwargs) + self.user_name = None + self.creation_time = None + self.last_modified_time = None + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters.py new file mode 100644 index 000000000000..106d6a13e3f0 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class CredentialCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update credential operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the credential. + :type name: str + :param user_name: Required. Gets or sets the user name of the credential. + :type user_name: str + :param password: Required. Gets or sets the password of the credential. + :type password: str + :param description: Gets or sets the description of the credential. + :type description: str + """ + + _validation = { + 'name': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CredentialCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..47fbde30495a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_create_or_update_parameters_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class CredentialCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update credential operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the credential. + :type name: str + :param user_name: Required. Gets or sets the user name of the credential. + :type user_name: str + :param password: Required. Gets or sets the password of the credential. + :type password: str + :param description: Gets or sets the description of the credential. + :type description: str + """ + + _validation = { + 'name': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, name: str, user_name: str, password: str, description: str=None, **kwargs) -> None: + super(CredentialCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.user_name = user_name + self.password = password + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_paged.py new file mode 100644 index 000000000000..75c5d852da17 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class CredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`Credential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Credential]'} + } + + def __init__(self, *args, **kwargs): + + super(CredentialPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_py3.py new file mode 100644 index 000000000000..cb2f3a7a8c63 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_py3.py @@ -0,0 +1,61 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Credential(ProxyResource): + """Definition of the credential. + + 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 user_name: Gets the user name of the credential. + :vartype user_name: str + :ivar creation_time: Gets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets the last modified time. + :vartype last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', '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'}, + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(Credential, self).__init__(**kwargs) + self.user_name = None + self.creation_time = None + self.last_modified_time = None + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters.py new file mode 100644 index 000000000000..446e8b0b3434 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class CredentialUpdateParameters(Model): + """The parameters supplied to the Update credential operation. + + :param name: Gets or sets the name of the credential. + :type name: str + :param user_name: Gets or sets the user name of the credential. + :type user_name: str + :param password: Gets or sets the password of the credential. + :type password: str + :param description: Gets or sets the description of the credential. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CredentialUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters_py3.py new file mode 100644 index 000000000000..89e43f7fe7f1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/credential_update_parameters_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class CredentialUpdateParameters(Model): + """The parameters supplied to the Update credential operation. + + :param name: Gets or sets the name of the credential. + :type name: str + :param user_name: Gets or sets the user name of the credential. + :type user_name: str + :param password: Gets or sets the password of the credential. + :type password: str + :param description: Gets or sets the description of the credential. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, user_name: str=None, password: str=None, description: str=None, **kwargs) -> None: + super(CredentialUpdateParameters, self).__init__(**kwargs) + self.name = name + self.user_name = user_name + self.password = password + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job.py new file mode 100644 index 000000000000..b372fc3072bf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job.py @@ -0,0 +1,114 @@ +# 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 .proxy_resource import ProxyResource + + +class DscCompilationJob(ProxyResource): + """Definition of the Dsc Compilation job. + + 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 configuration: Gets or sets the configuration. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :ivar started_by: Gets the compilation job started by. + :vartype started_by: str + :ivar job_id: Gets the id of the job. + :vartype job_id: str + :ivar creation_time: Gets the creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The current provisioning state of the job. + Possible values include: 'Failed', 'Succeeded', 'Suspended', 'Processing' + :type provisioning_state: str or + ~azure.mgmt.automation.models.JobProvisioningState + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param status: Gets or sets the status of the job. Possible values + include: 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', + 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', + 'Resuming', 'Removing' + :type status: str or ~azure.mgmt.automation.models.JobStatus + :param status_details: Gets or sets the status details of the job. + :type status_details: str + :ivar start_time: Gets the start time of the job. + :vartype start_time: datetime + :ivar end_time: Gets the end time of the job. + :vartype end_time: datetime + :ivar exception: Gets the exception of the job. + :vartype exception: str + :ivar last_modified_time: Gets the last modified time of the job. + :vartype last_modified_time: datetime + :ivar last_status_modified_time: Gets the last status modified time of the + job. + :vartype last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'started_by': {'readonly': True}, + 'job_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'exception': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'last_status_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'started_by': {'key': 'properties.startedBy', 'type': 'str'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'properties.lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DscCompilationJob, self).__init__(**kwargs) + self.configuration = kwargs.get('configuration', None) + self.started_by = None + self.job_id = None + self.creation_time = None + self.provisioning_state = kwargs.get('provisioning_state', None) + self.run_on = kwargs.get('run_on', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.start_time = None + self.end_time = None + self.exception = None + self.last_modified_time = None + self.last_status_modified_time = None + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters.py new file mode 100644 index 000000000000..5db59d70e8b4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class DscCompilationJobCreateParameters(Model): + """The parameters supplied to the create compilation job operation. + + All required parameters must be populated in order to send to Azure. + + :param configuration: Required. Gets or sets the configuration. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'configuration': {'required': True}, + } + + _attribute_map = { + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DscCompilationJobCreateParameters, self).__init__(**kwargs) + self.configuration = kwargs.get('configuration', None) + self.parameters = kwargs.get('parameters', None) + self.increment_node_configuration_build = kwargs.get('increment_node_configuration_build', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters_py3.py new file mode 100644 index 000000000000..f854f629217d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_create_parameters_py3.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class DscCompilationJobCreateParameters(Model): + """The parameters supplied to the create compilation job operation. + + All required parameters must be populated in order to send to Azure. + + :param configuration: Required. Gets or sets the configuration. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'configuration': {'required': True}, + } + + _attribute_map = { + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, configuration, parameters=None, increment_node_configuration_build: bool=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(DscCompilationJobCreateParameters, self).__init__(**kwargs) + self.configuration = configuration + self.parameters = parameters + self.increment_node_configuration_build = increment_node_configuration_build + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_paged.py new file mode 100644 index 000000000000..78ab64c92a77 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DscCompilationJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`DscCompilationJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DscCompilationJob]'} + } + + def __init__(self, *args, **kwargs): + + super(DscCompilationJobPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_py3.py new file mode 100644 index 000000000000..f8936bcb1d94 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_compilation_job_py3.py @@ -0,0 +1,114 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class DscCompilationJob(ProxyResource): + """Definition of the Dsc Compilation job. + + 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 configuration: Gets or sets the configuration. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :ivar started_by: Gets the compilation job started by. + :vartype started_by: str + :ivar job_id: Gets the id of the job. + :vartype job_id: str + :ivar creation_time: Gets the creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The current provisioning state of the job. + Possible values include: 'Failed', 'Succeeded', 'Suspended', 'Processing' + :type provisioning_state: str or + ~azure.mgmt.automation.models.JobProvisioningState + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param status: Gets or sets the status of the job. Possible values + include: 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', + 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', + 'Resuming', 'Removing' + :type status: str or ~azure.mgmt.automation.models.JobStatus + :param status_details: Gets or sets the status details of the job. + :type status_details: str + :ivar start_time: Gets the start time of the job. + :vartype start_time: datetime + :ivar end_time: Gets the end time of the job. + :vartype end_time: datetime + :ivar exception: Gets the exception of the job. + :vartype exception: str + :ivar last_modified_time: Gets the last modified time of the job. + :vartype last_modified_time: datetime + :ivar last_status_modified_time: Gets the last status modified time of the + job. + :vartype last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'started_by': {'readonly': True}, + 'job_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'exception': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'last_status_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'started_by': {'key': 'properties.startedBy', 'type': 'str'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'properties.lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, *, configuration=None, provisioning_state=None, run_on: str=None, status=None, status_details: str=None, parameters=None, **kwargs) -> None: + super(DscCompilationJob, self).__init__(**kwargs) + self.configuration = configuration + self.started_by = None + self.job_id = None + self.creation_time = None + self.provisioning_state = provisioning_state + self.run_on = run_on + self.status = status + self.status_details = status_details + self.start_time = None + self.end_time = None + self.exception = None + self.last_modified_time = None + self.last_status_modified_time = None + self.parameters = parameters diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration.py new file mode 100644 index 000000000000..8cec8cd9b9a6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration.py @@ -0,0 +1,97 @@ +# 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 .tracked_resource import TrackedResource + + +class DscConfiguration(TrackedResource): + """Definition of the configuration type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param provisioning_state: Gets or sets the provisioning state of the + configuration. Possible values include: 'Succeeded' + :type provisioning_state: str or + ~azure.mgmt.automation.models.DscConfigurationProvisioningState + :param job_count: Gets or sets the job count of the configuration. + :type job_count: int + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param source: Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param state: Gets or sets the state of the configuration. Possible values + include: 'New', 'Edit', 'Published' + :type state: str or ~azure.mgmt.automation.models.DscConfigurationState + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param node_configuration_count: Gets the number of compiled node + configurations. + :type node_configuration_count: int + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DscConfigurationProvisioningState'}, + 'job_count': {'key': 'properties.jobCount', 'type': 'int'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'node_configuration_count': {'key': 'properties.nodeConfigurationCount', 'type': 'int'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscConfiguration, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.job_count = kwargs.get('job_count', None) + self.parameters = kwargs.get('parameters', None) + self.source = kwargs.get('source', None) + self.state = kwargs.get('state', None) + self.log_verbose = kwargs.get('log_verbose', None) + self.creation_time = kwargs.get('creation_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.node_configuration_count = kwargs.get('node_configuration_count', None) + self.description = kwargs.get('description', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property.py new file mode 100644 index 000000000000..ed27f8bc210b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationAssociationProperty(Model): + """The Dsc configuration property associated with the entity. + + :param name: Gets or sets the name of the Dsc configuration. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscConfigurationAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property_py3.py new file mode 100644 index 000000000000..5448692e606a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_association_property_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationAssociationProperty(Model): + """The Dsc configuration property associated with the entity. + + :param name: Gets or sets the name of the Dsc configuration. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(DscConfigurationAssociationProperty, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters.py new file mode 100644 index 000000000000..0d36e301c6bf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters.py @@ -0,0 +1,63 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update configuration operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param description: Gets or sets the description of the configuration. + :type description: str + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DscConfigurationCreateOrUpdateParameters, self).__init__(**kwargs) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.source = kwargs.get('source', None) + self.parameters = kwargs.get('parameters', None) + self.description = kwargs.get('description', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..9a23f4165100 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_create_or_update_parameters_py3.py @@ -0,0 +1,63 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update configuration operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param description: Gets or sets the description of the configuration. + :type description: str + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, source, log_verbose: bool=None, log_progress: bool=None, parameters=None, description: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(DscConfigurationCreateOrUpdateParameters, self).__init__(**kwargs) + self.log_verbose = log_verbose + self.log_progress = log_progress + self.source = source + self.parameters = parameters + self.description = description + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_paged.py new file mode 100644 index 000000000000..ff3e9a25d1d5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DscConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DscConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DscConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(DscConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter.py new file mode 100644 index 000000000000..d0ed65916ece --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationParameter(Model): + """Definition of the configuration parameter type. + + :param type: Gets or sets the type of the parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value to indicate whether the + parameter is madatory or not. + :type is_mandatory: bool + :param position: Get or sets the position of the parameter. + :type position: int + :param default_value: Gets or sets the default value of parameter. + :type default_value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'int'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscConfigurationParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.is_mandatory = kwargs.get('is_mandatory', None) + self.position = kwargs.get('position', None) + self.default_value = kwargs.get('default_value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter_py3.py new file mode 100644 index 000000000000..bcf23c5be99d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_parameter_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationParameter(Model): + """Definition of the configuration parameter type. + + :param type: Gets or sets the type of the parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value to indicate whether the + parameter is madatory or not. + :type is_mandatory: bool + :param position: Get or sets the position of the parameter. + :type position: int + :param default_value: Gets or sets the default value of parameter. + :type default_value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'int'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, is_mandatory: bool=None, position: int=None, default_value: str=None, **kwargs) -> None: + super(DscConfigurationParameter, self).__init__(**kwargs) + self.type = type + self.is_mandatory = is_mandatory + self.position = position + self.default_value = default_value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_py3.py new file mode 100644 index 000000000000..9d49e8166e1b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_py3.py @@ -0,0 +1,97 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class DscConfiguration(TrackedResource): + """Definition of the configuration type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param provisioning_state: Gets or sets the provisioning state of the + configuration. Possible values include: 'Succeeded' + :type provisioning_state: str or + ~azure.mgmt.automation.models.DscConfigurationProvisioningState + :param job_count: Gets or sets the job count of the configuration. + :type job_count: int + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param source: Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param state: Gets or sets the state of the configuration. Possible values + include: 'New', 'Edit', 'Published' + :type state: str or ~azure.mgmt.automation.models.DscConfigurationState + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param node_configuration_count: Gets the number of compiled node + configurations. + :type node_configuration_count: int + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DscConfigurationProvisioningState'}, + 'job_count': {'key': 'properties.jobCount', 'type': 'int'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'node_configuration_count': {'key': 'properties.nodeConfigurationCount', 'type': 'int'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, provisioning_state=None, job_count: int=None, parameters=None, source=None, state=None, log_verbose: bool=None, creation_time=None, last_modified_time=None, node_configuration_count: int=None, description: str=None, etag: str=None, **kwargs) -> None: + super(DscConfiguration, self).__init__(tags=tags, location=location, **kwargs) + self.provisioning_state = provisioning_state + self.job_count = job_count + self.parameters = parameters + self.source = source + self.state = state + self.log_verbose = log_verbose + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.node_configuration_count = node_configuration_count + self.description = description + self.etag = etag diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters.py new file mode 100644 index 000000000000..f08262a4cef2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationUpdateParameters(Model): + """The parameters supplied to the create or update configuration operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param description: Gets or sets the description of the configuration. + :type description: str + :param name: Gets or sets name of the resource. + :type name: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DscConfigurationUpdateParameters, self).__init__(**kwargs) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.source = kwargs.get('source', None) + self.parameters = kwargs.get('parameters', None) + self.description = kwargs.get('description', None) + self.name = kwargs.get('name', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters_py3.py new file mode 100644 index 000000000000..aef0b805aedf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_configuration_update_parameters_py3.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class DscConfigurationUpdateParameters(Model): + """The parameters supplied to the create or update configuration operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param parameters: Gets or sets the configuration parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.DscConfigurationParameter] + :param description: Gets or sets the description of the configuration. + :type description: str + :param name: Gets or sets name of the resource. + :type name: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '{DscConfigurationParameter}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, source, log_verbose: bool=None, log_progress: bool=None, parameters=None, description: str=None, name: str=None, tags=None, **kwargs) -> None: + super(DscConfigurationUpdateParameters, self).__init__(**kwargs) + self.log_verbose = log_verbose + self.log_progress = log_progress + self.source = source + self.parameters = parameters + self.description = description + self.name = name + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration.py new file mode 100644 index 000000000000..b47748f4082b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class DscMetaConfiguration(Model): + """Definition of the DSC Meta Configuration. + + :param configuration_mode_frequency_mins: Gets or sets the + ConfigurationModeFrequencyMins value of the meta configuration. + :type configuration_mode_frequency_mins: int + :param reboot_node_if_needed: Gets or sets the RebootNodeIfNeeded value of + the meta configuration. + :type reboot_node_if_needed: bool + :param configuration_mode: Gets or sets the ConfigurationMode value of the + meta configuration. + :type configuration_mode: str + :param action_after_reboot: Gets or sets the ActionAfterReboot value of + the meta configuration. + :type action_after_reboot: str + :param certificate_id: Gets or sets the CertificateId value of the meta + configuration. + :type certificate_id: str + :param refresh_frequency_mins: Gets or sets the RefreshFrequencyMins value + of the meta configuration. + :type refresh_frequency_mins: int + :param allow_module_overwrite: Gets or sets the AllowModuleOverwrite value + of the meta configuration. + :type allow_module_overwrite: bool + """ + + _attribute_map = { + 'configuration_mode_frequency_mins': {'key': 'configurationModeFrequencyMins', 'type': 'int'}, + 'reboot_node_if_needed': {'key': 'rebootNodeIfNeeded', 'type': 'bool'}, + 'configuration_mode': {'key': 'configurationMode', 'type': 'str'}, + 'action_after_reboot': {'key': 'actionAfterReboot', 'type': 'str'}, + 'certificate_id': {'key': 'certificateId', 'type': 'str'}, + 'refresh_frequency_mins': {'key': 'refreshFrequencyMins', 'type': 'int'}, + 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DscMetaConfiguration, self).__init__(**kwargs) + self.configuration_mode_frequency_mins = kwargs.get('configuration_mode_frequency_mins', None) + self.reboot_node_if_needed = kwargs.get('reboot_node_if_needed', None) + self.configuration_mode = kwargs.get('configuration_mode', None) + self.action_after_reboot = kwargs.get('action_after_reboot', None) + self.certificate_id = kwargs.get('certificate_id', None) + self.refresh_frequency_mins = kwargs.get('refresh_frequency_mins', None) + self.allow_module_overwrite = kwargs.get('allow_module_overwrite', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration_py3.py new file mode 100644 index 000000000000..2a0260494f5c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_meta_configuration_py3.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class DscMetaConfiguration(Model): + """Definition of the DSC Meta Configuration. + + :param configuration_mode_frequency_mins: Gets or sets the + ConfigurationModeFrequencyMins value of the meta configuration. + :type configuration_mode_frequency_mins: int + :param reboot_node_if_needed: Gets or sets the RebootNodeIfNeeded value of + the meta configuration. + :type reboot_node_if_needed: bool + :param configuration_mode: Gets or sets the ConfigurationMode value of the + meta configuration. + :type configuration_mode: str + :param action_after_reboot: Gets or sets the ActionAfterReboot value of + the meta configuration. + :type action_after_reboot: str + :param certificate_id: Gets or sets the CertificateId value of the meta + configuration. + :type certificate_id: str + :param refresh_frequency_mins: Gets or sets the RefreshFrequencyMins value + of the meta configuration. + :type refresh_frequency_mins: int + :param allow_module_overwrite: Gets or sets the AllowModuleOverwrite value + of the meta configuration. + :type allow_module_overwrite: bool + """ + + _attribute_map = { + 'configuration_mode_frequency_mins': {'key': 'configurationModeFrequencyMins', 'type': 'int'}, + 'reboot_node_if_needed': {'key': 'rebootNodeIfNeeded', 'type': 'bool'}, + 'configuration_mode': {'key': 'configurationMode', 'type': 'str'}, + 'action_after_reboot': {'key': 'actionAfterReboot', 'type': 'str'}, + 'certificate_id': {'key': 'certificateId', 'type': 'str'}, + 'refresh_frequency_mins': {'key': 'refreshFrequencyMins', 'type': 'int'}, + 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'bool'}, + } + + def __init__(self, *, configuration_mode_frequency_mins: int=None, reboot_node_if_needed: bool=None, configuration_mode: str=None, action_after_reboot: str=None, certificate_id: str=None, refresh_frequency_mins: int=None, allow_module_overwrite: bool=None, **kwargs) -> None: + super(DscMetaConfiguration, self).__init__(**kwargs) + self.configuration_mode_frequency_mins = configuration_mode_frequency_mins + self.reboot_node_if_needed = reboot_node_if_needed + self.configuration_mode = configuration_mode + self.action_after_reboot = action_after_reboot + self.certificate_id = certificate_id + self.refresh_frequency_mins = refresh_frequency_mins + self.allow_module_overwrite = allow_module_overwrite diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node.py new file mode 100644 index 000000000000..eacf8caf56f5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node.py @@ -0,0 +1,85 @@ +# 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 .proxy_resource import ProxyResource + + +class DscNode(ProxyResource): + """Definition of a DscNode. + + 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 last_seen: Gets or sets the last seen time of the node. + :type last_seen: datetime + :param registration_time: Gets or sets the registration time of the node. + :type registration_time: datetime + :param ip: Gets or sets the ip of the node. + :type ip: str + :param account_id: Gets or sets the account id of the node. + :type account_id: str + :param dsc_node_name: Gets or sets the name of the dsc nodeconfiguration. + :type dsc_node_name: str + :param status: Gets or sets the status of the node. + :type status: str + :param node_id: Gets or sets the node id. + :type node_id: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + :param total_count: Gets the total number of records matching filter + criteria. + :type total_count: int + :param extension_handler: Gets or sets the list of extensionHandler + properties for a Node. + :type extension_handler: + list[~azure.mgmt.automation.models.DscNodeExtensionHandlerAssociationProperty] + """ + + _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'}, + 'last_seen': {'key': 'properties.lastSeen', 'type': 'iso-8601'}, + 'registration_time': {'key': 'properties.registrationTime', 'type': 'iso-8601'}, + 'ip': {'key': 'properties.ip', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'dsc_node_name': {'key': 'properties.nodeConfiguration.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'node_id': {'key': 'properties.nodeId', 'type': 'str'}, + 'etag': {'key': 'properties.etag', 'type': 'str'}, + 'total_count': {'key': 'properties.totalCount', 'type': 'int'}, + 'extension_handler': {'key': 'properties.extensionHandler', 'type': '[DscNodeExtensionHandlerAssociationProperty]'}, + } + + def __init__(self, **kwargs): + super(DscNode, self).__init__(**kwargs) + self.last_seen = kwargs.get('last_seen', None) + self.registration_time = kwargs.get('registration_time', None) + self.ip = kwargs.get('ip', None) + self.account_id = kwargs.get('account_id', None) + self.dsc_node_name = kwargs.get('dsc_node_name', None) + self.status = kwargs.get('status', None) + self.node_id = kwargs.get('node_id', None) + self.etag = kwargs.get('etag', None) + self.total_count = kwargs.get('total_count', None) + self.extension_handler = kwargs.get('extension_handler', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration.py new file mode 100644 index 000000000000..5e5a0c936c3d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration.py @@ -0,0 +1,68 @@ +# 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 .proxy_resource import ProxyResource + + +class DscNodeConfiguration(ProxyResource): + """Definition of the dsc node configuration. + + 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 last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param creation_time: Gets or sets creation time. + :type creation_time: datetime + :param configuration: Gets or sets the configuration of the node. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param source: Source of node configuration. + :type source: str + :param node_count: Number of nodes with this nodeconfiguration assigned + :type node_count: long + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + """ + + _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'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'long'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DscNodeConfiguration, self).__init__(**kwargs) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.creation_time = kwargs.get('creation_time', None) + self.configuration = kwargs.get('configuration', None) + self.source = kwargs.get('source', None) + self.node_count = kwargs.get('node_count', None) + self.increment_node_configuration_build = kwargs.get('increment_node_configuration_build', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters.py new file mode 100644 index 000000000000..afdd8af700ed --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class DscNodeConfigurationCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update node configuration + operation. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param configuration: Required. Gets or sets the configuration of the + node. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + :param name: Name of the node configuration. + :type name: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + 'configuration': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DscNodeConfigurationCreateOrUpdateParameters, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.configuration = kwargs.get('configuration', None) + self.increment_node_configuration_build = kwargs.get('increment_node_configuration_build', None) + self.name = kwargs.get('name', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..090ae510da51 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_create_or_update_parameters_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class DscNodeConfigurationCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update node configuration + operation. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Gets or sets the source. + :type source: ~azure.mgmt.automation.models.ContentSource + :param configuration: Required. Gets or sets the configuration of the + node. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + :param name: Name of the node configuration. + :type name: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'source': {'required': True}, + 'configuration': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'properties.source', 'type': 'ContentSource'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, source, configuration, increment_node_configuration_build: bool=None, name: str=None, tags=None, **kwargs) -> None: + super(DscNodeConfigurationCreateOrUpdateParameters, self).__init__(**kwargs) + self.source = source + self.configuration = configuration + self.increment_node_configuration_build = increment_node_configuration_build + self.name = name + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_paged.py new file mode 100644 index 000000000000..049da571883a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DscNodeConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DscNodeConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DscNodeConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(DscNodeConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_py3.py new file mode 100644 index 000000000000..8ac9b60e1908 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_configuration_py3.py @@ -0,0 +1,68 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class DscNodeConfiguration(ProxyResource): + """Definition of the dsc node configuration. + + 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 last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param creation_time: Gets or sets creation time. + :type creation_time: datetime + :param configuration: Gets or sets the configuration of the node. + :type configuration: + ~azure.mgmt.automation.models.DscConfigurationAssociationProperty + :param source: Source of node configuration. + :type source: str + :param node_count: Number of nodes with this nodeconfiguration assigned + :type node_count: long + :param increment_node_configuration_build: If a new build version of + NodeConfiguration is required. + :type increment_node_configuration_build: bool + """ + + _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'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'configuration': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'long'}, + 'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'}, + } + + def __init__(self, *, last_modified_time=None, creation_time=None, configuration=None, source: str=None, node_count: int=None, increment_node_configuration_build: bool=None, **kwargs) -> None: + super(DscNodeConfiguration, self).__init__(**kwargs) + self.last_modified_time = last_modified_time + self.creation_time = creation_time + self.configuration = configuration + self.source = source + self.node_count = node_count + self.increment_node_configuration_build = increment_node_configuration_build diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property.py new file mode 100644 index 000000000000..0079ffde252b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DscNodeExtensionHandlerAssociationProperty(Model): + """The dsc extensionHandler property associated with the node. + + :param name: Gets or sets the name of the extension handler. + :type name: str + :param version: Gets or sets the version of the extension handler. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscNodeExtensionHandlerAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property_py3.py new file mode 100644 index 000000000000..65185703429b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_extension_handler_association_property_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DscNodeExtensionHandlerAssociationProperty(Model): + """The dsc extensionHandler property associated with the node. + + :param name: Gets or sets the name of the extension handler. + :type name: str + :param version: Gets or sets the version of the extension handler. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, **kwargs) -> None: + super(DscNodeExtensionHandlerAssociationProperty, self).__init__(**kwargs) + self.name = name + self.version = version diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_paged.py new file mode 100644 index 000000000000..0a53a4874719 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DscNodePaged(Paged): + """ + A paging container for iterating over a list of :class:`DscNode ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DscNode]'} + } + + def __init__(self, *args, **kwargs): + + super(DscNodePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_py3.py new file mode 100644 index 000000000000..206e77ab3023 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_py3.py @@ -0,0 +1,85 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class DscNode(ProxyResource): + """Definition of a DscNode. + + 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 last_seen: Gets or sets the last seen time of the node. + :type last_seen: datetime + :param registration_time: Gets or sets the registration time of the node. + :type registration_time: datetime + :param ip: Gets or sets the ip of the node. + :type ip: str + :param account_id: Gets or sets the account id of the node. + :type account_id: str + :param dsc_node_name: Gets or sets the name of the dsc nodeconfiguration. + :type dsc_node_name: str + :param status: Gets or sets the status of the node. + :type status: str + :param node_id: Gets or sets the node id. + :type node_id: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + :param total_count: Gets the total number of records matching filter + criteria. + :type total_count: int + :param extension_handler: Gets or sets the list of extensionHandler + properties for a Node. + :type extension_handler: + list[~azure.mgmt.automation.models.DscNodeExtensionHandlerAssociationProperty] + """ + + _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'}, + 'last_seen': {'key': 'properties.lastSeen', 'type': 'iso-8601'}, + 'registration_time': {'key': 'properties.registrationTime', 'type': 'iso-8601'}, + 'ip': {'key': 'properties.ip', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'dsc_node_name': {'key': 'properties.nodeConfiguration.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'node_id': {'key': 'properties.nodeId', 'type': 'str'}, + 'etag': {'key': 'properties.etag', 'type': 'str'}, + 'total_count': {'key': 'properties.totalCount', 'type': 'int'}, + 'extension_handler': {'key': 'properties.extensionHandler', 'type': '[DscNodeExtensionHandlerAssociationProperty]'}, + } + + def __init__(self, *, last_seen=None, registration_time=None, ip: str=None, account_id: str=None, dsc_node_name: str=None, status: str=None, node_id: str=None, etag: str=None, total_count: int=None, extension_handler=None, **kwargs) -> None: + super(DscNode, self).__init__(**kwargs) + self.last_seen = last_seen + self.registration_time = registration_time + self.ip = ip + self.account_id = account_id + self.dsc_node_name = dsc_node_name + self.status = status + self.node_id = node_id + self.etag = etag + self.total_count = total_count + self.extension_handler = extension_handler diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report.py new file mode 100644 index 000000000000..84f633296c58 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report.py @@ -0,0 +1,110 @@ +# 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 msrest.serialization import Model + + +class DscNodeReport(Model): + """Definition of the dsc node report type. + + :param end_time: Gets or sets the end time of the node report. + :type end_time: datetime + :param last_modified_time: Gets or sets the lastModifiedTime of the node + report. + :type last_modified_time: datetime + :param start_time: Gets or sets the start time of the node report. + :type start_time: datetime + :param type: Gets or sets the type of the node report. + :type type: str + :param report_id: Gets or sets the id of the node report. + :type report_id: str + :param status: Gets or sets the status of the node report. + :type status: str + :param refresh_mode: Gets or sets the refreshMode of the node report. + :type refresh_mode: str + :param reboot_requested: Gets or sets the rebootRequested of the node + report. + :type reboot_requested: str + :param report_format_version: Gets or sets the reportFormatVersion of the + node report. + :type report_format_version: str + :param configuration_version: Gets or sets the configurationVersion of the + node report. + :type configuration_version: str + :param id: Gets or sets the id. + :type id: str + :param errors: Gets or sets the errors for the node report. + :type errors: list[~azure.mgmt.automation.models.DscReportError] + :param resources: Gets or sets the resource for the node report. + :type resources: list[~azure.mgmt.automation.models.DscReportResource] + :param meta_configuration: Gets or sets the metaConfiguration of the node + at the time of the report. + :type meta_configuration: + ~azure.mgmt.automation.models.DscMetaConfiguration + :param host_name: Gets or sets the hostname of the node that sent the + report. + :type host_name: str + :param i_pv4_addresses: Gets or sets the IPv4 address of the node that + sent the report. + :type i_pv4_addresses: list[str] + :param i_pv6_addresses: Gets or sets the IPv6 address of the node that + sent the report. + :type i_pv6_addresses: list[str] + :param number_of_resources: Gets or sets the number of resource in the + node report. + :type number_of_resources: int + :param raw_errors: Gets or sets the unparsed errors for the node report. + :type raw_errors: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'report_id': {'key': 'reportId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'refresh_mode': {'key': 'refreshMode', 'type': 'str'}, + 'reboot_requested': {'key': 'rebootRequested', 'type': 'str'}, + 'report_format_version': {'key': 'reportFormatVersion', 'type': 'str'}, + 'configuration_version': {'key': 'configurationVersion', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[DscReportError]'}, + 'resources': {'key': 'resources', 'type': '[DscReportResource]'}, + 'meta_configuration': {'key': 'metaConfiguration', 'type': 'DscMetaConfiguration'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'i_pv4_addresses': {'key': 'iPV4Addresses', 'type': '[str]'}, + 'i_pv6_addresses': {'key': 'iPV6Addresses', 'type': '[str]'}, + 'number_of_resources': {'key': 'numberOfResources', 'type': 'int'}, + 'raw_errors': {'key': 'rawErrors', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscNodeReport, self).__init__(**kwargs) + self.end_time = kwargs.get('end_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.start_time = kwargs.get('start_time', None) + self.type = kwargs.get('type', None) + self.report_id = kwargs.get('report_id', None) + self.status = kwargs.get('status', None) + self.refresh_mode = kwargs.get('refresh_mode', None) + self.reboot_requested = kwargs.get('reboot_requested', None) + self.report_format_version = kwargs.get('report_format_version', None) + self.configuration_version = kwargs.get('configuration_version', None) + self.id = kwargs.get('id', None) + self.errors = kwargs.get('errors', None) + self.resources = kwargs.get('resources', None) + self.meta_configuration = kwargs.get('meta_configuration', None) + self.host_name = kwargs.get('host_name', None) + self.i_pv4_addresses = kwargs.get('i_pv4_addresses', None) + self.i_pv6_addresses = kwargs.get('i_pv6_addresses', None) + self.number_of_resources = kwargs.get('number_of_resources', None) + self.raw_errors = kwargs.get('raw_errors', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_paged.py new file mode 100644 index 000000000000..81a95f0c15a2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DscNodeReportPaged(Paged): + """ + A paging container for iterating over a list of :class:`DscNodeReport ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DscNodeReport]'} + } + + def __init__(self, *args, **kwargs): + + super(DscNodeReportPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_py3.py new file mode 100644 index 000000000000..3f9845190be5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_report_py3.py @@ -0,0 +1,110 @@ +# 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 msrest.serialization import Model + + +class DscNodeReport(Model): + """Definition of the dsc node report type. + + :param end_time: Gets or sets the end time of the node report. + :type end_time: datetime + :param last_modified_time: Gets or sets the lastModifiedTime of the node + report. + :type last_modified_time: datetime + :param start_time: Gets or sets the start time of the node report. + :type start_time: datetime + :param type: Gets or sets the type of the node report. + :type type: str + :param report_id: Gets or sets the id of the node report. + :type report_id: str + :param status: Gets or sets the status of the node report. + :type status: str + :param refresh_mode: Gets or sets the refreshMode of the node report. + :type refresh_mode: str + :param reboot_requested: Gets or sets the rebootRequested of the node + report. + :type reboot_requested: str + :param report_format_version: Gets or sets the reportFormatVersion of the + node report. + :type report_format_version: str + :param configuration_version: Gets or sets the configurationVersion of the + node report. + :type configuration_version: str + :param id: Gets or sets the id. + :type id: str + :param errors: Gets or sets the errors for the node report. + :type errors: list[~azure.mgmt.automation.models.DscReportError] + :param resources: Gets or sets the resource for the node report. + :type resources: list[~azure.mgmt.automation.models.DscReportResource] + :param meta_configuration: Gets or sets the metaConfiguration of the node + at the time of the report. + :type meta_configuration: + ~azure.mgmt.automation.models.DscMetaConfiguration + :param host_name: Gets or sets the hostname of the node that sent the + report. + :type host_name: str + :param i_pv4_addresses: Gets or sets the IPv4 address of the node that + sent the report. + :type i_pv4_addresses: list[str] + :param i_pv6_addresses: Gets or sets the IPv6 address of the node that + sent the report. + :type i_pv6_addresses: list[str] + :param number_of_resources: Gets or sets the number of resource in the + node report. + :type number_of_resources: int + :param raw_errors: Gets or sets the unparsed errors for the node report. + :type raw_errors: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'report_id': {'key': 'reportId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'refresh_mode': {'key': 'refreshMode', 'type': 'str'}, + 'reboot_requested': {'key': 'rebootRequested', 'type': 'str'}, + 'report_format_version': {'key': 'reportFormatVersion', 'type': 'str'}, + 'configuration_version': {'key': 'configurationVersion', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[DscReportError]'}, + 'resources': {'key': 'resources', 'type': '[DscReportResource]'}, + 'meta_configuration': {'key': 'metaConfiguration', 'type': 'DscMetaConfiguration'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'i_pv4_addresses': {'key': 'iPV4Addresses', 'type': '[str]'}, + 'i_pv6_addresses': {'key': 'iPV6Addresses', 'type': '[str]'}, + 'number_of_resources': {'key': 'numberOfResources', 'type': 'int'}, + 'raw_errors': {'key': 'rawErrors', 'type': 'str'}, + } + + def __init__(self, *, end_time=None, last_modified_time=None, start_time=None, type: str=None, report_id: str=None, status: str=None, refresh_mode: str=None, reboot_requested: str=None, report_format_version: str=None, configuration_version: str=None, id: str=None, errors=None, resources=None, meta_configuration=None, host_name: str=None, i_pv4_addresses=None, i_pv6_addresses=None, number_of_resources: int=None, raw_errors: str=None, **kwargs) -> None: + super(DscNodeReport, self).__init__(**kwargs) + self.end_time = end_time + self.last_modified_time = last_modified_time + self.start_time = start_time + self.type = type + self.report_id = report_id + self.status = status + self.refresh_mode = refresh_mode + self.reboot_requested = reboot_requested + self.report_format_version = report_format_version + self.configuration_version = configuration_version + self.id = id + self.errors = errors + self.resources = resources + self.meta_configuration = meta_configuration + self.host_name = host_name + self.i_pv4_addresses = i_pv4_addresses + self.i_pv6_addresses = i_pv6_addresses + self.number_of_resources = number_of_resources + self.raw_errors = raw_errors diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters.py new file mode 100644 index 000000000000..e90e061909f5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class DscNodeUpdateParameters(Model): + """The parameters supplied to the update dsc node operation. + + :param node_id: Gets or sets the id of the dsc node. + :type node_id: str + :param properties: + :type properties: + ~azure.mgmt.automation.models.DscNodeUpdateParametersProperties + """ + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DscNodeUpdateParametersProperties'}, + } + + def __init__(self, **kwargs): + super(DscNodeUpdateParameters, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties.py new file mode 100644 index 000000000000..8029a4ffd947 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscNodeUpdateParametersProperties(Model): + """DscNodeUpdateParametersProperties. + + :param name: Gets or sets the name of the dsc nodeconfiguration. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'nodeConfiguration.name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscNodeUpdateParametersProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties_py3.py new file mode 100644 index 000000000000..c14c070386eb --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_properties_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscNodeUpdateParametersProperties(Model): + """DscNodeUpdateParametersProperties. + + :param name: Gets or sets the name of the dsc nodeconfiguration. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'nodeConfiguration.name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(DscNodeUpdateParametersProperties, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_py3.py new file mode 100644 index 000000000000..66545979f675 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_node_update_parameters_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class DscNodeUpdateParameters(Model): + """The parameters supplied to the update dsc node operation. + + :param node_id: Gets or sets the id of the dsc node. + :type node_id: str + :param properties: + :type properties: + ~azure.mgmt.automation.models.DscNodeUpdateParametersProperties + """ + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DscNodeUpdateParametersProperties'}, + } + + def __init__(self, *, node_id: str=None, properties=None, **kwargs) -> None: + super(DscNodeUpdateParameters, self).__init__(**kwargs) + self.node_id = node_id + self.properties = properties diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error.py new file mode 100644 index 000000000000..faa250470e4a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class DscReportError(Model): + """Definition of the dsc node report error type. + + :param error_source: Gets or sets the source of the error. + :type error_source: str + :param resource_id: Gets or sets the resource ID which generated the + error. + :type resource_id: str + :param error_code: Gets or sets the error code. + :type error_code: str + :param error_message: Gets or sets the error message. + :type error_message: str + :param locale: Gets or sets the locale of the error. + :type locale: str + :param error_details: Gets or sets the error details. + :type error_details: str + """ + + _attribute_map = { + 'error_source': {'key': 'errorSource', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'locale': {'key': 'locale', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscReportError, self).__init__(**kwargs) + self.error_source = kwargs.get('error_source', None) + self.resource_id = kwargs.get('resource_id', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.locale = kwargs.get('locale', None) + self.error_details = kwargs.get('error_details', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error_py3.py new file mode 100644 index 000000000000..2e172458b5db --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_error_py3.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class DscReportError(Model): + """Definition of the dsc node report error type. + + :param error_source: Gets or sets the source of the error. + :type error_source: str + :param resource_id: Gets or sets the resource ID which generated the + error. + :type resource_id: str + :param error_code: Gets or sets the error code. + :type error_code: str + :param error_message: Gets or sets the error message. + :type error_message: str + :param locale: Gets or sets the locale of the error. + :type locale: str + :param error_details: Gets or sets the error details. + :type error_details: str + """ + + _attribute_map = { + 'error_source': {'key': 'errorSource', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'locale': {'key': 'locale', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'str'}, + } + + def __init__(self, *, error_source: str=None, resource_id: str=None, error_code: str=None, error_message: str=None, locale: str=None, error_details: str=None, **kwargs) -> None: + super(DscReportError, self).__init__(**kwargs) + self.error_source = error_source + self.resource_id = resource_id + self.error_code = error_code + self.error_message = error_message + self.locale = locale + self.error_details = error_details diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource.py new file mode 100644 index 000000000000..8984d3791618 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class DscReportResource(Model): + """Definition of the DSC Report Resource. + + :param resource_id: Gets or sets the ID of the resource. + :type resource_id: str + :param source_info: Gets or sets the source info of the resource. + :type source_info: str + :param depends_on: Gets or sets the Resource Navigation values for + resources the resource depends on. + :type depends_on: + list[~azure.mgmt.automation.models.DscReportResourceNavigation] + :param module_name: Gets or sets the module name of the resource. + :type module_name: str + :param module_version: Gets or sets the module version of the resource. + :type module_version: str + :param resource_name: Gets or sets the name of the resource. + :type resource_name: str + :param error: Gets or sets the error of the resource. + :type error: str + :param status: Gets or sets the status of the resource. + :type status: str + :param duration_in_seconds: Gets or sets the duration in seconds for the + resource. + :type duration_in_seconds: float + :param start_date: Gets or sets the start date of the resource. + :type start_date: datetime + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'source_info': {'key': 'sourceInfo', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[DscReportResourceNavigation]'}, + 'module_name': {'key': 'moduleName', 'type': 'str'}, + 'module_version': {'key': 'moduleVersion', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'float'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DscReportResource, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.source_info = kwargs.get('source_info', None) + self.depends_on = kwargs.get('depends_on', None) + self.module_name = kwargs.get('module_name', None) + self.module_version = kwargs.get('module_version', None) + self.resource_name = kwargs.get('resource_name', None) + self.error = kwargs.get('error', None) + self.status = kwargs.get('status', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + self.start_date = kwargs.get('start_date', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation.py new file mode 100644 index 000000000000..bdf666fb506e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscReportResourceNavigation(Model): + """Navigation for DSC Report Resource. + + :param resource_id: Gets or sets the ID of the resource to navigate to. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DscReportResourceNavigation, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation_py3.py new file mode 100644 index 000000000000..e18a0696050f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_navigation_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class DscReportResourceNavigation(Model): + """Navigation for DSC Report Resource. + + :param resource_id: Gets or sets the ID of the resource to navigate to. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, **kwargs) -> None: + super(DscReportResourceNavigation, self).__init__(**kwargs) + self.resource_id = resource_id diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_py3.py new file mode 100644 index 000000000000..b81afaa497ac --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/dsc_report_resource_py3.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class DscReportResource(Model): + """Definition of the DSC Report Resource. + + :param resource_id: Gets or sets the ID of the resource. + :type resource_id: str + :param source_info: Gets or sets the source info of the resource. + :type source_info: str + :param depends_on: Gets or sets the Resource Navigation values for + resources the resource depends on. + :type depends_on: + list[~azure.mgmt.automation.models.DscReportResourceNavigation] + :param module_name: Gets or sets the module name of the resource. + :type module_name: str + :param module_version: Gets or sets the module version of the resource. + :type module_version: str + :param resource_name: Gets or sets the name of the resource. + :type resource_name: str + :param error: Gets or sets the error of the resource. + :type error: str + :param status: Gets or sets the status of the resource. + :type status: str + :param duration_in_seconds: Gets or sets the duration in seconds for the + resource. + :type duration_in_seconds: float + :param start_date: Gets or sets the start date of the resource. + :type start_date: datetime + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'source_info': {'key': 'sourceInfo', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[DscReportResourceNavigation]'}, + 'module_name': {'key': 'moduleName', 'type': 'str'}, + 'module_version': {'key': 'moduleVersion', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'float'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, resource_id: str=None, source_info: str=None, depends_on=None, module_name: str=None, module_version: str=None, resource_name: str=None, error: str=None, status: str=None, duration_in_seconds: float=None, start_date=None, **kwargs) -> None: + super(DscReportResource, self).__init__(**kwargs) + self.resource_id = resource_id + self.source_info = source_info + self.depends_on = depends_on + self.module_name = module_name + self.module_version = module_version + self.resource_name = resource_name + self.error = error + self.status = status + self.duration_in_seconds = duration_in_seconds + self.start_date = start_date diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/error_response.py b/azure-mgmt-automation/azure/mgmt/automation/models/error_response.py new file mode 100644 index 000000000000..58d5423a976c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/error_response.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response of an operation failure. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/error_response_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/error_response_py3.py new file mode 100644 index 000000000000..eb5e6375b725 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/error_response_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response of an operation failure. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/field_definition.py b/azure-mgmt-automation/azure/mgmt/automation/models/field_definition.py new file mode 100644 index 000000000000..812533832150 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/field_definition.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class FieldDefinition(Model): + """Definition of the connection fields. + + All required parameters must be populated in order to send to Azure. + + :param is_encrypted: Gets or sets the isEncrypted flag of the connection + field definition. + :type is_encrypted: bool + :param is_optional: Gets or sets the isOptional flag of the connection + field definition. + :type is_optional: bool + :param type: Required. Gets or sets the type of the connection field + definition. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'is_encrypted': {'key': 'isEncrypted', 'type': 'bool'}, + 'is_optional': {'key': 'isOptional', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FieldDefinition, self).__init__(**kwargs) + self.is_encrypted = kwargs.get('is_encrypted', None) + self.is_optional = kwargs.get('is_optional', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/field_definition_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/field_definition_py3.py new file mode 100644 index 000000000000..c6db74afb691 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/field_definition_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class FieldDefinition(Model): + """Definition of the connection fields. + + All required parameters must be populated in order to send to Azure. + + :param is_encrypted: Gets or sets the isEncrypted flag of the connection + field definition. + :type is_encrypted: bool + :param is_optional: Gets or sets the isOptional flag of the connection + field definition. + :type is_optional: bool + :param type: Required. Gets or sets the type of the connection field + definition. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'is_encrypted': {'key': 'isEncrypted', 'type': 'bool'}, + 'is_optional': {'key': 'isOptional', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type: str, is_encrypted: bool=None, is_optional: bool=None, **kwargs) -> None: + super(FieldDefinition, self).__init__(**kwargs) + self.is_encrypted = is_encrypted + self.is_optional = is_optional + self.type = type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker.py new file mode 100644 index 000000000000..36ef182d60c9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorker(Model): + """Definition of hybrid runbook worker. + + :param name: Gets or sets the worker machine name. + :type name: str + :param ip: Gets or sets the assigned machine IP address. + :type ip: str + :param registration_time: Gets or sets the registration time of the worker + machine. + :type registration_time: datetime + :param last_seen_date_time: Last Heartbeat from the Worker + :type last_seen_date_time: datetime + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + 'registration_time': {'key': 'registrationTime', 'type': 'iso-8601'}, + 'last_seen_date_time': {'key': 'lastSeenDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(HybridRunbookWorker, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.ip = kwargs.get('ip', None) + self.registration_time = kwargs.get('registration_time', None) + self.last_seen_date_time = kwargs.get('last_seen_date_time', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group.py new file mode 100644 index 000000000000..1351ba422af3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorkerGroup(Model): + """Definition of hybrid runbook worker group. + + :param id: Gets or sets the id of the resource. + :type id: str + :param name: Gets or sets the name of the group. + :type name: str + :param hybrid_runbook_workers: Gets or sets the list of hybrid runbook + workers. + :type hybrid_runbook_workers: + list[~azure.mgmt.automation.models.HybridRunbookWorker] + :param credential: Sets the credential of a worker group. + :type credential: + ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty + :param group_type: Type of the HybridWorkerGroup. Possible values include: + 'User', 'System' + :type group_type: str or ~azure.mgmt.automation.models.GroupTypeEnum + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'hybrid_runbook_workers': {'key': 'hybridRunbookWorkers', 'type': '[HybridRunbookWorker]'}, + 'credential': {'key': 'credential', 'type': 'RunAsCredentialAssociationProperty'}, + 'group_type': {'key': 'groupType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HybridRunbookWorkerGroup, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.hybrid_runbook_workers = kwargs.get('hybrid_runbook_workers', None) + self.credential = kwargs.get('credential', None) + self.group_type = kwargs.get('group_type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_paged.py new file mode 100644 index 000000000000..0e13e4babe3b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class HybridRunbookWorkerGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridRunbookWorkerGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridRunbookWorkerGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridRunbookWorkerGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_py3.py new file mode 100644 index 000000000000..267147ddfeb8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorkerGroup(Model): + """Definition of hybrid runbook worker group. + + :param id: Gets or sets the id of the resource. + :type id: str + :param name: Gets or sets the name of the group. + :type name: str + :param hybrid_runbook_workers: Gets or sets the list of hybrid runbook + workers. + :type hybrid_runbook_workers: + list[~azure.mgmt.automation.models.HybridRunbookWorker] + :param credential: Sets the credential of a worker group. + :type credential: + ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty + :param group_type: Type of the HybridWorkerGroup. Possible values include: + 'User', 'System' + :type group_type: str or ~azure.mgmt.automation.models.GroupTypeEnum + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'hybrid_runbook_workers': {'key': 'hybridRunbookWorkers', 'type': '[HybridRunbookWorker]'}, + 'credential': {'key': 'credential', 'type': 'RunAsCredentialAssociationProperty'}, + 'group_type': {'key': 'groupType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, hybrid_runbook_workers=None, credential=None, group_type=None, **kwargs) -> None: + super(HybridRunbookWorkerGroup, self).__init__(**kwargs) + self.id = id + self.name = name + self.hybrid_runbook_workers = hybrid_runbook_workers + self.credential = credential + self.group_type = group_type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters.py new file mode 100644 index 000000000000..8bc120a8afc4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorkerGroupUpdateParameters(Model): + """Parameters supplied to the update operation. + + :param credential: Sets the credential of a worker group. + :type credential: + ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty + """ + + _attribute_map = { + 'credential': {'key': 'credential', 'type': 'RunAsCredentialAssociationProperty'}, + } + + def __init__(self, **kwargs): + super(HybridRunbookWorkerGroupUpdateParameters, self).__init__(**kwargs) + self.credential = kwargs.get('credential', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters_py3.py new file mode 100644 index 000000000000..58d73108099c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_group_update_parameters_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorkerGroupUpdateParameters(Model): + """Parameters supplied to the update operation. + + :param credential: Sets the credential of a worker group. + :type credential: + ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty + """ + + _attribute_map = { + 'credential': {'key': 'credential', 'type': 'RunAsCredentialAssociationProperty'}, + } + + def __init__(self, *, credential=None, **kwargs) -> None: + super(HybridRunbookWorkerGroupUpdateParameters, self).__init__(**kwargs) + self.credential = credential diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_py3.py new file mode 100644 index 000000000000..7193ee92f7ae --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/hybrid_runbook_worker_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class HybridRunbookWorker(Model): + """Definition of hybrid runbook worker. + + :param name: Gets or sets the worker machine name. + :type name: str + :param ip: Gets or sets the assigned machine IP address. + :type ip: str + :param registration_time: Gets or sets the registration time of the worker + machine. + :type registration_time: datetime + :param last_seen_date_time: Last Heartbeat from the Worker + :type last_seen_date_time: datetime + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + 'registration_time': {'key': 'registrationTime', 'type': 'iso-8601'}, + 'last_seen_date_time': {'key': 'lastSeenDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str=None, ip: str=None, registration_time=None, last_seen_date_time=None, **kwargs) -> None: + super(HybridRunbookWorker, self).__init__(**kwargs) + self.name = name + self.ip = ip + self.registration_time = registration_time + self.last_seen_date_time = last_seen_date_time diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job.py b/azure-mgmt-automation/azure/mgmt/automation/models/job.py new file mode 100644 index 000000000000..7979f53bd29d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job.py @@ -0,0 +1,105 @@ +# 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 .proxy_resource import ProxyResource + + +class Job(ProxyResource): + """Definition of the job. + + 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 runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param started_by: Gets or sets the job started by. + :type started_by: str + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param job_id: Gets or sets the id of the job. + :type job_id: str + :param creation_time: Gets or sets the creation time of the job. + :type creation_time: datetime + :param status: Gets or sets the status of the job. Possible values + include: 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', + 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', + 'Resuming', 'Removing' + :type status: str or ~azure.mgmt.automation.models.JobStatus + :param status_details: Gets or sets the status details of the job. + :type status_details: str + :param start_time: Gets or sets the start time of the job. + :type start_time: datetime + :param end_time: Gets or sets the end time of the job. + :type end_time: datetime + :param exception: Gets or sets the exception of the job. + :type exception: str + :param last_modified_time: Gets or sets the last modified time of the job. + :type last_modified_time: datetime + :param last_status_modified_time: Gets or sets the last status modified + time of the job. + :type last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param provisioning_state: The current provisioning state of the job. + Possible values include: 'Failed', 'Succeeded', 'Suspended', 'Processing' + :type provisioning_state: str or + ~azure.mgmt.automation.models.JobProvisioningState + """ + + _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'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'started_by': {'key': 'properties.startedBy', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'properties.lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.runbook = kwargs.get('runbook', None) + self.started_by = kwargs.get('started_by', None) + self.run_on = kwargs.get('run_on', None) + self.job_id = kwargs.get('job_id', None) + self.creation_time = kwargs.get('creation_time', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.exception = kwargs.get('exception', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.last_status_modified_time = kwargs.get('last_status_modified_time', None) + self.parameters = kwargs.get('parameters', None) + self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item.py new file mode 100644 index 000000000000..a69e5fea6db3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item.py @@ -0,0 +1,89 @@ +# 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 .proxy_resource import ProxyResource + + +class JobCollectionItem(ProxyResource): + """Job collection item properties. + + 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 runbook: The runbook association. + :vartype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :ivar job_id: The id of the job. + :vartype job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :ivar status: The status of the job. Possible values include: 'New', + 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', 'Blocked', + 'Suspended', 'Disconnected', 'Suspending', 'Stopping', 'Resuming', + 'Removing' + :vartype status: str or ~azure.mgmt.automation.models.JobStatus + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :ivar last_modified_time: The last modified time of the job. + :vartype last_modified_time: datetime + :ivar provisioning_state: The provisioning state of a resource. + :vartype provisioning_state: str + :param run_on: Specifies the runOn group name where the job was executed. + :type run_on: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'runbook': {'readonly': True}, + 'job_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCollectionItem, self).__init__(**kwargs) + self.runbook = None + self.job_id = None + self.creation_time = None + self.status = None + self.start_time = None + self.end_time = None + self.last_modified_time = None + self.provisioning_state = None + self.run_on = kwargs.get('run_on', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_paged.py new file mode 100644 index 000000000000..caa9d0b73f80 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class JobCollectionItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCollectionItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCollectionItem]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCollectionItemPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_py3.py new file mode 100644 index 000000000000..b45e7d924510 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_collection_item_py3.py @@ -0,0 +1,89 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class JobCollectionItem(ProxyResource): + """Job collection item properties. + + 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 runbook: The runbook association. + :vartype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :ivar job_id: The id of the job. + :vartype job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :ivar status: The status of the job. Possible values include: 'New', + 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', 'Blocked', + 'Suspended', 'Disconnected', 'Suspending', 'Stopping', 'Resuming', + 'Removing' + :vartype status: str or ~azure.mgmt.automation.models.JobStatus + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :ivar last_modified_time: The last modified time of the job. + :vartype last_modified_time: datetime + :ivar provisioning_state: The provisioning state of a resource. + :vartype provisioning_state: str + :param run_on: Specifies the runOn group name where the job was executed. + :type run_on: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'runbook': {'readonly': True}, + 'job_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, *, run_on: str=None, **kwargs) -> None: + super(JobCollectionItem, self).__init__(**kwargs) + self.runbook = None + self.job_id = None + self.creation_time = None + self.status = None + self.start_time = None + self.end_time = None + self.last_modified_time = None + self.provisioning_state = None + self.run_on = run_on diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters.py new file mode 100644 index 000000000000..0a0a78a46c00 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class JobCreateParameters(Model): + """The parameters supplied to the create job operation. + + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + """ + + _attribute_map = { + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCreateParameters, self).__init__(**kwargs) + self.runbook = kwargs.get('runbook', None) + self.parameters = kwargs.get('parameters', None) + self.run_on = kwargs.get('run_on', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters_py3.py new file mode 100644 index 000000000000..0baeaae640ed --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_create_parameters_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class JobCreateParameters(Model): + """The parameters supplied to the create job operation. + + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + """ + + _attribute_map = { + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, *, runbook=None, parameters=None, run_on: str=None, **kwargs) -> None: + super(JobCreateParameters, self).__init__(**kwargs) + self.runbook = runbook + self.parameters = parameters + self.run_on = run_on diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation.py new file mode 100644 index 000000000000..775212e082f9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class JobNavigation(Model): + """Software update configuration machine run job navigation properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id of the job associated with the software update configuration + run + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobNavigation, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation_py3.py new file mode 100644 index 000000000000..bdd663359578 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_navigation_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class JobNavigation(Model): + """Software update configuration machine run job navigation properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id of the job associated with the software update configuration + run + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobNavigation, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_py3.py new file mode 100644 index 000000000000..09975b7bca09 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_py3.py @@ -0,0 +1,105 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Job(ProxyResource): + """Definition of the job. + + 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 runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param started_by: Gets or sets the job started by. + :type started_by: str + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param job_id: Gets or sets the id of the job. + :type job_id: str + :param creation_time: Gets or sets the creation time of the job. + :type creation_time: datetime + :param status: Gets or sets the status of the job. Possible values + include: 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', + 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', + 'Resuming', 'Removing' + :type status: str or ~azure.mgmt.automation.models.JobStatus + :param status_details: Gets or sets the status details of the job. + :type status_details: str + :param start_time: Gets or sets the start time of the job. + :type start_time: datetime + :param end_time: Gets or sets the end time of the job. + :type end_time: datetime + :param exception: Gets or sets the exception of the job. + :type exception: str + :param last_modified_time: Gets or sets the last modified time of the job. + :type last_modified_time: datetime + :param last_status_modified_time: Gets or sets the last status modified + time of the job. + :type last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param provisioning_state: The current provisioning state of the job. + Possible values include: 'Failed', 'Succeeded', 'Suspended', 'Processing' + :type provisioning_state: str or + ~azure.mgmt.automation.models.JobProvisioningState + """ + + _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'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'started_by': {'key': 'properties.startedBy', 'type': 'str'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'job_id': {'key': 'properties.jobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'properties.lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, runbook=None, started_by: str=None, run_on: str=None, job_id: str=None, creation_time=None, status=None, status_details: str=None, start_time=None, end_time=None, exception: str=None, last_modified_time=None, last_status_modified_time=None, parameters=None, provisioning_state=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.runbook = runbook + self.started_by = started_by + self.run_on = run_on + self.job_id = job_id + self.creation_time = creation_time + self.status = status + self.status_details = status_details + self.start_time = start_time + self.end_time = end_time + self.exception = exception + self.last_modified_time = last_modified_time + self.last_status_modified_time = last_status_modified_time + self.parameters = parameters + self.provisioning_state = provisioning_state diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule.py new file mode 100644 index 000000000000..d7efbd4e2471 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class JobSchedule(Model): + """Definition of the job schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the resource. + :vartype id: str + :ivar name: Gets the name of the variable. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param job_schedule_id: Gets or sets the id of job schedule. + :type job_schedule_id: str + :param schedule: Gets or sets the schedule. + :type schedule: ~azure.mgmt.automation.models.ScheduleAssociationProperty + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the hybrid worker group that the scheduled job + should run on. + :type run_on: str + :param parameters: Gets or sets the parameters of the job schedule. + :type parameters: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_schedule_id': {'key': 'properties.jobScheduleId', 'type': 'str'}, + 'schedule': {'key': 'properties.schedule', 'type': 'ScheduleAssociationProperty'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.job_schedule_id = kwargs.get('job_schedule_id', None) + self.schedule = kwargs.get('schedule', None) + self.runbook = kwargs.get('runbook', None) + self.run_on = kwargs.get('run_on', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters.py new file mode 100644 index 000000000000..3100820f4de8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class JobScheduleCreateParameters(Model): + """The parameters supplied to the create job schedule operation. + + All required parameters must be populated in order to send to Azure. + + :param schedule: Required. Gets or sets the schedule. + :type schedule: ~azure.mgmt.automation.models.ScheduleAssociationProperty + :param runbook: Required. Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the hybrid worker group that the scheduled job + should run on. + :type run_on: str + :param parameters: Gets or sets a list of job properties. + :type parameters: dict[str, str] + """ + + _validation = { + 'schedule': {'required': True}, + 'runbook': {'required': True}, + } + + _attribute_map = { + 'schedule': {'key': 'properties.schedule', 'type': 'ScheduleAssociationProperty'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobScheduleCreateParameters, self).__init__(**kwargs) + self.schedule = kwargs.get('schedule', None) + self.runbook = kwargs.get('runbook', None) + self.run_on = kwargs.get('run_on', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters_py3.py new file mode 100644 index 000000000000..d1c71c503f71 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_create_parameters_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class JobScheduleCreateParameters(Model): + """The parameters supplied to the create job schedule operation. + + All required parameters must be populated in order to send to Azure. + + :param schedule: Required. Gets or sets the schedule. + :type schedule: ~azure.mgmt.automation.models.ScheduleAssociationProperty + :param runbook: Required. Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the hybrid worker group that the scheduled job + should run on. + :type run_on: str + :param parameters: Gets or sets a list of job properties. + :type parameters: dict[str, str] + """ + + _validation = { + 'schedule': {'required': True}, + 'runbook': {'required': True}, + } + + _attribute_map = { + 'schedule': {'key': 'properties.schedule', 'type': 'ScheduleAssociationProperty'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, *, schedule, runbook, run_on: str=None, parameters=None, **kwargs) -> None: + super(JobScheduleCreateParameters, self).__init__(**kwargs) + self.schedule = schedule + self.runbook = runbook + self.run_on = run_on + self.parameters = parameters diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_paged.py new file mode 100644 index 000000000000..67dffa06782f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class JobSchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobSchedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobSchedule]'} + } + + def __init__(self, *args, **kwargs): + + super(JobSchedulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_py3.py new file mode 100644 index 000000000000..846dd103735f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_schedule_py3.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class JobSchedule(Model): + """Definition of the job schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the resource. + :vartype id: str + :ivar name: Gets the name of the variable. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param job_schedule_id: Gets or sets the id of job schedule. + :type job_schedule_id: str + :param schedule: Gets or sets the schedule. + :type schedule: ~azure.mgmt.automation.models.ScheduleAssociationProperty + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the hybrid worker group that the scheduled job + should run on. + :type run_on: str + :param parameters: Gets or sets the parameters of the job schedule. + :type parameters: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_schedule_id': {'key': 'properties.jobScheduleId', 'type': 'str'}, + 'schedule': {'key': 'properties.schedule', 'type': 'ScheduleAssociationProperty'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + } + + def __init__(self, *, job_schedule_id: str=None, schedule=None, runbook=None, run_on: str=None, parameters=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.job_schedule_id = job_schedule_id + self.schedule = schedule + self.runbook = runbook + self.run_on = run_on + self.parameters = parameters diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_stream.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream.py new file mode 100644 index 000000000000..2e763d476ce3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class JobStream(Model): + """Definition of the job stream. + + :param id: Gets or sets the id of the resource. + :type id: str + :param job_stream_id: Gets or sets the id of the job stream. + :type job_stream_id: str + :param time: Gets or sets the creation time of the job. + :type time: datetime + :param stream_type: Gets or sets the stream type. Possible values include: + 'Progress', 'Output', 'Warning', 'Error', 'Debug', 'Verbose', 'Any' + :type stream_type: str or ~azure.mgmt.automation.models.JobStreamType + :param stream_text: Gets or sets the stream text. + :type stream_text: str + :param summary: Gets or sets the summary. + :type summary: str + :param value: Gets or sets the values of the job stream. + :type value: dict[str, object] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'job_stream_id': {'key': 'properties.jobStreamId', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + 'stream_text': {'key': 'properties.streamText', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(JobStream, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.job_stream_id = kwargs.get('job_stream_id', None) + self.time = kwargs.get('time', None) + self.stream_type = kwargs.get('stream_type', None) + self.stream_text = kwargs.get('stream_text', None) + self.summary = kwargs.get('summary', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result.py new file mode 100644 index 000000000000..283d1517032b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class JobStreamListResult(Model): + """The response model for the list job stream operation. + + :param value: A list of job streams. + :type value: list[~azure.mgmt.automation.models.JobStream] + :param next_link: Gets or sets the next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobStream]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStreamListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result_py3.py new file mode 100644 index 000000000000..a71178a0e339 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_list_result_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class JobStreamListResult(Model): + """The response model for the list job stream operation. + + :param value: A list of job streams. + :type value: list[~azure.mgmt.automation.models.JobStream] + :param next_link: Gets or sets the next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobStream]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(JobStreamListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_paged.py new file mode 100644 index 000000000000..23a2b0883111 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class JobStreamPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStream ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStream]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStreamPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_py3.py new file mode 100644 index 000000000000..aa08cdc94a1e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/job_stream_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class JobStream(Model): + """Definition of the job stream. + + :param id: Gets or sets the id of the resource. + :type id: str + :param job_stream_id: Gets or sets the id of the job stream. + :type job_stream_id: str + :param time: Gets or sets the creation time of the job. + :type time: datetime + :param stream_type: Gets or sets the stream type. Possible values include: + 'Progress', 'Output', 'Warning', 'Error', 'Debug', 'Verbose', 'Any' + :type stream_type: str or ~azure.mgmt.automation.models.JobStreamType + :param stream_text: Gets or sets the stream text. + :type stream_text: str + :param summary: Gets or sets the summary. + :type summary: str + :param value: Gets or sets the values of the job stream. + :type value: dict[str, object] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'job_stream_id': {'key': 'properties.jobStreamId', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + 'stream_text': {'key': 'properties.streamText', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': '{object}'}, + } + + def __init__(self, *, id: str=None, job_stream_id: str=None, time=None, stream_type=None, stream_text: str=None, summary: str=None, value=None, **kwargs) -> None: + super(JobStream, self).__init__(**kwargs) + self.id = id + self.job_stream_id = job_stream_id + self.time = time + self.stream_type = stream_type + self.stream_text = stream_text + self.summary = summary + self.value = value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/key.py b/azure-mgmt-automation/azure/mgmt/automation/models/key.py new file mode 100644 index 000000000000..1584abd57451 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/key.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class Key(Model): + """Automation key which is used to register a DSC Node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Automation key name. Possible values include: 'Primary', + 'Secondary' + :vartype key_name: str or ~azure.mgmt.automation.models.AutomationKeyName + :ivar permissions: Automation key permissions. Possible values include: + 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.automation.models.AutomationKeyPermissions + :ivar value: Value of the Automation Key used for registration. + :vartype value: str + """ + + _validation = { + 'key_name': {'readonly': True}, + 'permissions': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'KeyName', 'type': 'str'}, + 'permissions': {'key': 'Permissions', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Key, self).__init__(**kwargs) + self.key_name = None + self.permissions = None + self.value = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result.py new file mode 100644 index 000000000000..6f50457cc29c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class KeyListResult(Model): + """KeyListResult. + + :param keys: Lists the automation keys. + :type keys: list[~azure.mgmt.automation.models.Key] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[Key]'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.keys = kwargs.get('keys', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result_py3.py new file mode 100644 index 000000000000..87c2ea62cbf7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/key_list_result_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class KeyListResult(Model): + """KeyListResult. + + :param keys: Lists the automation keys. + :type keys: list[~azure.mgmt.automation.models.Key] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[Key]'}, + } + + def __init__(self, *, keys=None, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.keys = keys diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/key_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/key_py3.py new file mode 100644 index 000000000000..581ea930aa7f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/key_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class Key(Model): + """Automation key which is used to register a DSC Node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Automation key name. Possible values include: 'Primary', + 'Secondary' + :vartype key_name: str or ~azure.mgmt.automation.models.AutomationKeyName + :ivar permissions: Automation key permissions. Possible values include: + 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.automation.models.AutomationKeyPermissions + :ivar value: Value of the Automation Key used for registration. + :vartype value: str + """ + + _validation = { + 'key_name': {'readonly': True}, + 'permissions': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'KeyName', 'type': 'str'}, + 'permissions': {'key': 'Permissions', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Key, self).__init__(**kwargs) + self.key_name = None + self.permissions = None + self.value = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace.py b/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace.py new file mode 100644 index 000000000000..733c46fef8a9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class LinkedWorkspace(Model): + """Definition of the linked workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the linked workspace. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinkedWorkspace, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace_py3.py new file mode 100644 index 000000000000..2c43c6ee01e6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/linked_workspace_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class LinkedWorkspace(Model): + """Definition of the linked workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the id of the linked workspace. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LinkedWorkspace, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties.py new file mode 100644 index 000000000000..9a868b587318 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class LinuxProperties(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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties_py3.py new file mode 100644 index 000000000000..8c259d55ff08 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/linux_properties_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class LinuxProperties(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=None, excluded_package_name_masks=None, included_package_name_masks=None, reboot_setting: str=None, **kwargs) -> None: + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module.py b/azure-mgmt-automation/azure/mgmt/automation/models/module.py new file mode 100644 index 000000000000..8a999c266b1d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module.py @@ -0,0 +1,103 @@ +# 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 .tracked_resource import TrackedResource + + +class Module(TrackedResource): + """Definition of the module type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param is_global: Gets or sets the isGlobal flag of the module. + :type is_global: bool + :param version: Gets or sets the version of the module. + :type version: str + :param size_in_bytes: Gets or sets the size in bytes of the module. + :type size_in_bytes: long + :param activity_count: Gets or sets the activity count of the module. + :type activity_count: int + :param provisioning_state: Gets or sets the provisioning state of the + module. Possible values include: 'Created', 'Creating', + 'StartingImportModuleRunbook', 'RunningImportModuleRunbook', + 'ContentRetrieved', 'ContentDownloaded', 'ContentValidated', + 'ConnectionTypeImported', 'ContentStored', 'ModuleDataStored', + 'ActivitiesStored', 'ModuleImportRunbookComplete', 'Succeeded', 'Failed', + 'Cancelled', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ModuleProvisioningState + :param content_link: Gets or sets the contentLink of the module. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param error: Gets or sets the error info of the module. + :type error: ~azure.mgmt.automation.models.ModuleErrorInfo + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param is_composite: Gets or sets type of module, if its composite or not. + :type is_composite: bool + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'activity_count': {'key': 'properties.activityCount', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ModuleProvisioningState'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'error': {'key': 'properties.error', 'type': 'ModuleErrorInfo'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_composite': {'key': 'properties.isComposite', 'type': 'bool'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Module, self).__init__(**kwargs) + self.is_global = kwargs.get('is_global', None) + self.version = kwargs.get('version', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.activity_count = kwargs.get('activity_count', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.content_link = kwargs.get('content_link', None) + self.error = kwargs.get('error', 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) + self.is_composite = kwargs.get('is_composite', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters.py new file mode 100644 index 000000000000..577e599cc3d4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ModuleCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update module operation. + + All required parameters must be populated in order to send to Azure. + + :param content_link: Required. Gets or sets the module content link. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'content_link': {'required': True}, + } + + _attribute_map = { + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ModuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.content_link = kwargs.get('content_link', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..24d88d21738e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_create_or_update_parameters_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ModuleCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update module operation. + + All required parameters must be populated in order to send to Azure. + + :param content_link: Required. Gets or sets the module content link. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'content_link': {'required': True}, + } + + _attribute_map = { + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, content_link, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ModuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.content_link = content_link + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info.py new file mode 100644 index 000000000000..c6a71afae26f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ModuleErrorInfo(Model): + """Definition of the module error info type. + + :param code: Gets or sets the error code. + :type code: str + :param message: Gets or sets the error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModuleErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info_py3.py new file mode 100644 index 000000000000..d6fef006260f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_error_info_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ModuleErrorInfo(Model): + """Definition of the module error info type. + + :param code: Gets or sets the error code. + :type code: str + :param message: Gets or sets the error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ModuleErrorInfo, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_paged.py new file mode 100644 index 000000000000..f0ef5b2596c3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ModulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Module ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Module]'} + } + + def __init__(self, *args, **kwargs): + + super(ModulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_py3.py new file mode 100644 index 000000000000..b3f1137e5f4d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_py3.py @@ -0,0 +1,103 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Module(TrackedResource): + """Definition of the module type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param is_global: Gets or sets the isGlobal flag of the module. + :type is_global: bool + :param version: Gets or sets the version of the module. + :type version: str + :param size_in_bytes: Gets or sets the size in bytes of the module. + :type size_in_bytes: long + :param activity_count: Gets or sets the activity count of the module. + :type activity_count: int + :param provisioning_state: Gets or sets the provisioning state of the + module. Possible values include: 'Created', 'Creating', + 'StartingImportModuleRunbook', 'RunningImportModuleRunbook', + 'ContentRetrieved', 'ContentDownloaded', 'ContentValidated', + 'ConnectionTypeImported', 'ContentStored', 'ModuleDataStored', + 'ActivitiesStored', 'ModuleImportRunbookComplete', 'Succeeded', 'Failed', + 'Cancelled', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ModuleProvisioningState + :param content_link: Gets or sets the contentLink of the module. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param error: Gets or sets the error info of the module. + :type error: ~azure.mgmt.automation.models.ModuleErrorInfo + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param is_composite: Gets or sets type of module, if its composite or not. + :type is_composite: bool + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'activity_count': {'key': 'properties.activityCount', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ModuleProvisioningState'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'error': {'key': 'properties.error', 'type': 'ModuleErrorInfo'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_composite': {'key': 'properties.isComposite', 'type': 'bool'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, is_global: bool=None, version: str=None, size_in_bytes: int=None, activity_count: int=None, provisioning_state=None, content_link=None, error=None, creation_time=None, last_modified_time=None, description: str=None, is_composite: bool=None, etag: str=None, **kwargs) -> None: + super(Module, self).__init__(tags=tags, location=location, **kwargs) + self.is_global = is_global + self.version = version + self.size_in_bytes = size_in_bytes + self.activity_count = activity_count + self.provisioning_state = provisioning_state + self.content_link = content_link + self.error = error + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.description = description + self.is_composite = is_composite + self.etag = etag diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters.py new file mode 100644 index 000000000000..26c150f96d18 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ModuleUpdateParameters(Model): + """The parameters supplied to the update module operation. + + :param content_link: Gets or sets the module content link. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ModuleUpdateParameters, self).__init__(**kwargs) + self.content_link = kwargs.get('content_link', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters_py3.py new file mode 100644 index 000000000000..2fc647d7a4a0 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/module_update_parameters_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ModuleUpdateParameters(Model): + """The parameters supplied to the update module operation. + + :param content_link: Gets or sets the module content link. + :type content_link: ~azure.mgmt.automation.models.ContentLink + :param name: Gets or sets name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, content_link=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ModuleUpdateParameters, self).__init__(**kwargs) + self.content_link = content_link + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_count.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_count.py new file mode 100644 index 000000000000..aaa9cc07b99f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_count.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class NodeCount(Model): + """Number of nodes based on the Filter. + + :param name: Gets the name of a count type + :type name: str + :param properties: + :type properties: ~azure.mgmt.automation.models.NodeCountProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NodeCountProperties'}, + } + + def __init__(self, **kwargs): + super(NodeCount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties.py new file mode 100644 index 000000000000..dc42d049d555 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class NodeCountProperties(Model): + """NodeCountProperties. + + :param count: Gets the count for the name + :type count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeCountProperties, self).__init__(**kwargs) + self.count = kwargs.get('count', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties_py3.py new file mode 100644 index 000000000000..f1d4c326f679 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_properties_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class NodeCountProperties(Model): + """NodeCountProperties. + + :param count: Gets the count for the name + :type count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, count: int=None, **kwargs) -> None: + super(NodeCountProperties, self).__init__(**kwargs) + self.count = count diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_count_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_py3.py new file mode 100644 index 000000000000..9f4527598b91 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_count_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class NodeCount(Model): + """Number of nodes based on the Filter. + + :param name: Gets the name of a count type + :type name: str + :param properties: + :type properties: ~azure.mgmt.automation.models.NodeCountProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NodeCountProperties'}, + } + + def __init__(self, *, name: str=None, properties=None, **kwargs) -> None: + super(NodeCount, self).__init__(**kwargs) + self.name = name + self.properties = properties diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_counts.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_counts.py new file mode 100644 index 000000000000..471ae7047a1e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_counts.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NodeCounts(Model): + """Gets the count of nodes by count type. + + :param value: Gets an array of counts + :type value: list[~azure.mgmt.automation.models.NodeCount] + :param total_count: Gets the total number of records matching countType + criteria. + :type total_count: int + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NodeCount]'}, + 'total_count': {'key': 'totalCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeCounts, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.total_count = kwargs.get('total_count', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/node_counts_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/node_counts_py3.py new file mode 100644 index 000000000000..766f4e54ea28 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/node_counts_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NodeCounts(Model): + """Gets the count of nodes by count type. + + :param value: Gets an array of counts + :type value: list[~azure.mgmt.automation.models.NodeCount] + :param total_count: Gets the total number of records matching countType + criteria. + :type total_count: int + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NodeCount]'}, + 'total_count': {'key': 'totalCount', 'type': 'int'}, + } + + def __init__(self, *, value=None, total_count: int=None, **kwargs) -> None: + super(NodeCounts, self).__init__(**kwargs) + self.value = value + self.total_count = total_count diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/operation.py b/azure-mgmt-automation/azure/mgmt/automation/models/operation.py new file mode 100644 index 000000000000..0ca40f3d1f3c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/operation.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class Operation(Model): + """Automation REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Provider, Resource and Operation values + :type display: ~azure.mgmt.automation.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/operation_display.py b/azure-mgmt-automation/azure/mgmt/automation/models/operation_display.py new file mode 100644 index 000000000000..0ee4b0326a86 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/operation_display.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class OperationDisplay(Model): + """Provider, Resource and Operation values. + + :param provider: Service provider: Microsoft.Automation + :type provider: str + :param resource: Resource on which the operation is performed: Runbooks, + Jobs etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/operation_display_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/operation_display_py3.py new file mode 100644 index 000000000000..a62509ae366a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class OperationDisplay(Model): + """Provider, Resource and Operation values. + + :param provider: Service provider: Microsoft.Automation + :type provider: str + :param resource: Resource on which the operation is performed: Runbooks, + Jobs etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/operation_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/operation_paged.py new file mode 100644 index 000000000000..54f994c4bc4c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/operation_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/operation_py3.py new file mode 100644 index 000000000000..7a2cf5bf6945 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/operation_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class Operation(Model): + """Automation REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Provider, Resource and Operation values + :type display: ~azure.mgmt.automation.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource.py b/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource.py new file mode 100644 index 000000000000..89299605bcfa --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource.py @@ -0,0 +1,42 @@ +# 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 .resource import Resource + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource_py3.py new file mode 100644 index 000000000000..f5b836dcc3ee --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/proxy_resource_py3.py @@ -0,0 +1,42 @@ +# 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 .resource_py3 import Resource + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/resource.py b/azure-mgmt-automation/azure/mgmt/automation/models/resource.py new file mode 100644 index 000000000000..a5db7e68c972 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/resource.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/resource_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/resource_py3.py new file mode 100644 index 000000000000..4504e2610512 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/resource_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property.py new file mode 100644 index 000000000000..924bbddb85b9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class RunAsCredentialAssociationProperty(Model): + """Definition of runas credential to use for hybrid worker. + + :param name: Gets or sets the name of the credential. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunAsCredentialAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property_py3.py new file mode 100644 index 000000000000..8ce6418f8fb2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/run_as_credential_association_property_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class RunAsCredentialAssociationProperty(Model): + """Definition of runas credential to use for hybrid worker. + + :param name: Gets or sets the name of the credential. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(RunAsCredentialAssociationProperty, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook.py new file mode 100644 index 000000000000..2b67486ad7e9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook.py @@ -0,0 +1,120 @@ +# 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 .tracked_resource import TrackedResource + + +class Runbook(TrackedResource): + """Definition of the runbook type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param runbook_type: Gets or sets the type of the runbook. Possible values + include: 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell', + 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param publish_content_link: Gets or sets the published runbook content + link. + :type publish_content_link: ~azure.mgmt.automation.models.ContentLink + :param state: Gets or sets the state of the runbook. Possible values + include: 'New', 'Edit', 'Published' + :type state: str or ~azure.mgmt.automation.models.RunbookState + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param log_activity_trace: Gets or sets the option to log activity trace + of the runbook. + :type log_activity_trace: int + :param job_count: Gets or sets the job count of the runbook. + :type job_count: int + :param parameters: Gets or sets the runbook parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.RunbookParameter] + :param output_types: Gets or sets the runbook output types. + :type output_types: list[str] + :param draft: Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param provisioning_state: Gets or sets the provisioning state of the + runbook. Possible values include: 'Succeeded' + :type provisioning_state: str or + ~azure.mgmt.automation.models.RunbookProvisioningState + :param last_modified_by: Gets or sets the last modified by. + :type last_modified_by: str + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'runbook_type': {'key': 'properties.runbookType', 'type': 'str'}, + 'publish_content_link': {'key': 'properties.publishContentLink', 'type': 'ContentLink'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'job_count': {'key': 'properties.jobCount', 'type': 'int'}, + 'parameters': {'key': 'properties.parameters', 'type': '{RunbookParameter}'}, + 'output_types': {'key': 'properties.outputTypes', 'type': '[str]'}, + 'draft': {'key': 'properties.draft', 'type': 'RunbookDraft'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'RunbookProvisioningState'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', '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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Runbook, self).__init__(**kwargs) + self.runbook_type = kwargs.get('runbook_type', None) + self.publish_content_link = kwargs.get('publish_content_link', None) + self.state = kwargs.get('state', None) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.log_activity_trace = kwargs.get('log_activity_trace', None) + self.job_count = kwargs.get('job_count', None) + self.parameters = kwargs.get('parameters', None) + self.output_types = kwargs.get('output_types', None) + self.draft = kwargs.get('draft', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.creation_time = kwargs.get('creation_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.description = kwargs.get('description', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property.py new file mode 100644 index 000000000000..a08dec1d2eff --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class RunbookAssociationProperty(Model): + """The runbook property associated with the entity. + + :param name: Gets or sets the name of the runbook. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunbookAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property_py3.py new file mode 100644 index 000000000000..c151e85a9ae0 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_association_property_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class RunbookAssociationProperty(Model): + """The runbook property associated with the entity. + + :param name: Gets or sets the name of the runbook. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(RunbookAssociationProperty, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters.py new file mode 100644 index 000000000000..b40bb2b725cc --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateDraftParameters(Model): + """The parameters supplied to the create or update runbook operation. + + All required parameters must be populated in order to send to Azure. + + :param runbook_content: Required. Content of the Runbook. + :type runbook_content: str + """ + + _validation = { + 'runbook_content': {'required': True}, + } + + _attribute_map = { + 'runbook_content': {'key': 'runbookContent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunbookCreateOrUpdateDraftParameters, self).__init__(**kwargs) + self.runbook_content = kwargs.get('runbook_content', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters_py3.py new file mode 100644 index 000000000000..66e30d01df63 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_parameters_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateDraftParameters(Model): + """The parameters supplied to the create or update runbook operation. + + All required parameters must be populated in order to send to Azure. + + :param runbook_content: Required. Content of the Runbook. + :type runbook_content: str + """ + + _validation = { + 'runbook_content': {'required': True}, + } + + _attribute_map = { + 'runbook_content': {'key': 'runbookContent', 'type': 'str'}, + } + + def __init__(self, *, runbook_content: str, **kwargs) -> None: + super(RunbookCreateOrUpdateDraftParameters, self).__init__(**kwargs) + self.runbook_content = runbook_content diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties.py new file mode 100644 index 000000000000..837d4e52578b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateDraftProperties(Model): + """The parameters supplied to the create or update dratft runbook properties. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param runbook_type: Required. Gets or sets the type of the runbook. + Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param draft: Required. Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + """ + + _validation = { + 'runbook_type': {'required': True}, + 'draft': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'logProgress', 'type': 'bool'}, + 'runbook_type': {'key': 'runbookType', 'type': 'str'}, + 'draft': {'key': 'draft', 'type': 'RunbookDraft'}, + 'description': {'key': 'description', 'type': 'str'}, + 'log_activity_trace': {'key': 'logActivityTrace', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RunbookCreateOrUpdateDraftProperties, self).__init__(**kwargs) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.runbook_type = kwargs.get('runbook_type', None) + self.draft = kwargs.get('draft', None) + self.description = kwargs.get('description', None) + self.log_activity_trace = kwargs.get('log_activity_trace', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties_py3.py new file mode 100644 index 000000000000..ab14a99076e7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_draft_properties_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateDraftProperties(Model): + """The parameters supplied to the create or update dratft runbook properties. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param runbook_type: Required. Gets or sets the type of the runbook. + Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param draft: Required. Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + """ + + _validation = { + 'runbook_type': {'required': True}, + 'draft': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'logProgress', 'type': 'bool'}, + 'runbook_type': {'key': 'runbookType', 'type': 'str'}, + 'draft': {'key': 'draft', 'type': 'RunbookDraft'}, + 'description': {'key': 'description', 'type': 'str'}, + 'log_activity_trace': {'key': 'logActivityTrace', 'type': 'int'}, + } + + def __init__(self, *, runbook_type, draft, log_verbose: bool=None, log_progress: bool=None, description: str=None, log_activity_trace: int=None, **kwargs) -> None: + super(RunbookCreateOrUpdateDraftProperties, self).__init__(**kwargs) + self.log_verbose = log_verbose + self.log_progress = log_progress + self.runbook_type = runbook_type + self.draft = draft + self.description = description + self.log_activity_trace = log_activity_trace diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters.py new file mode 100644 index 000000000000..0b92104234a1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters.py @@ -0,0 +1,74 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update runbook operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param runbook_type: Required. Gets or sets the type of the runbook. + Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param draft: Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param publish_content_link: Gets or sets the published runbook content + link. + :type publish_content_link: ~azure.mgmt.automation.models.ContentLink + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'runbook_type': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'runbook_type': {'key': 'properties.runbookType', 'type': 'str'}, + 'draft': {'key': 'properties.draft', 'type': 'RunbookDraft'}, + 'publish_content_link': {'key': 'properties.publishContentLink', 'type': 'ContentLink'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RunbookCreateOrUpdateParameters, self).__init__(**kwargs) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.runbook_type = kwargs.get('runbook_type', None) + self.draft = kwargs.get('draft', None) + self.publish_content_link = kwargs.get('publish_content_link', None) + self.description = kwargs.get('description', None) + self.log_activity_trace = kwargs.get('log_activity_trace', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..bb46adf42cad --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_create_or_update_parameters_py3.py @@ -0,0 +1,74 @@ +# 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 msrest.serialization import Model + + +class RunbookCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update runbook operation. + + All required parameters must be populated in order to send to Azure. + + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param runbook_type: Required. Gets or sets the type of the runbook. + Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param draft: Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param publish_content_link: Gets or sets the published runbook content + link. + :type publish_content_link: ~azure.mgmt.automation.models.ContentLink + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'runbook_type': {'required': True}, + } + + _attribute_map = { + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'runbook_type': {'key': 'properties.runbookType', 'type': 'str'}, + 'draft': {'key': 'properties.draft', 'type': 'RunbookDraft'}, + 'publish_content_link': {'key': 'properties.publishContentLink', 'type': 'ContentLink'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, runbook_type, log_verbose: bool=None, log_progress: bool=None, draft=None, publish_content_link=None, description: str=None, log_activity_trace: int=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(RunbookCreateOrUpdateParameters, self).__init__(**kwargs) + self.log_verbose = log_verbose + self.log_progress = log_progress + self.runbook_type = runbook_type + self.draft = draft + self.publish_content_link = publish_content_link + self.description = description + self.log_activity_trace = log_activity_trace + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft.py new file mode 100644 index 000000000000..b064c283a4f8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class RunbookDraft(Model): + """RunbookDraft. + + :param in_edit: Gets or sets whether runbook is in edit mode. + :type in_edit: bool + :param draft_content_link: Gets or sets the draft runbook content link. + :type draft_content_link: ~azure.mgmt.automation.models.ContentLink + :param creation_time: Gets or sets the creation time of the runbook draft. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time of the + runbook draft. + :type last_modified_time: datetime + :param parameters: Gets or sets the runbook draft parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.RunbookParameter] + :param output_types: Gets or sets the runbook output types. + :type output_types: list[str] + """ + + _attribute_map = { + 'in_edit': {'key': 'inEdit', 'type': 'bool'}, + 'draft_content_link': {'key': 'draftContentLink', 'type': 'ContentLink'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'parameters', 'type': '{RunbookParameter}'}, + 'output_types': {'key': 'outputTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RunbookDraft, self).__init__(**kwargs) + self.in_edit = kwargs.get('in_edit', None) + self.draft_content_link = kwargs.get('draft_content_link', None) + self.creation_time = kwargs.get('creation_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.parameters = kwargs.get('parameters', None) + self.output_types = kwargs.get('output_types', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_py3.py new file mode 100644 index 000000000000..56bf73c11578 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class RunbookDraft(Model): + """RunbookDraft. + + :param in_edit: Gets or sets whether runbook is in edit mode. + :type in_edit: bool + :param draft_content_link: Gets or sets the draft runbook content link. + :type draft_content_link: ~azure.mgmt.automation.models.ContentLink + :param creation_time: Gets or sets the creation time of the runbook draft. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time of the + runbook draft. + :type last_modified_time: datetime + :param parameters: Gets or sets the runbook draft parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.RunbookParameter] + :param output_types: Gets or sets the runbook output types. + :type output_types: list[str] + """ + + _attribute_map = { + 'in_edit': {'key': 'inEdit', 'type': 'bool'}, + 'draft_content_link': {'key': 'draftContentLink', 'type': 'ContentLink'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'parameters', 'type': '{RunbookParameter}'}, + 'output_types': {'key': 'outputTypes', 'type': '[str]'}, + } + + def __init__(self, *, in_edit: bool=None, draft_content_link=None, creation_time=None, last_modified_time=None, parameters=None, output_types=None, **kwargs) -> None: + super(RunbookDraft, self).__init__(**kwargs) + self.in_edit = in_edit + self.draft_content_link = draft_content_link + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.parameters = parameters + self.output_types = output_types diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result.py new file mode 100644 index 000000000000..ceab272b7b23 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class RunbookDraftUndoEditResult(Model): + """The response model for the undoedit runbook operation. + + :param status_code: Possible values include: 'Continue', + 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.automation.models.HttpStatusCode + :param request_id: + :type request_id: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunbookDraftUndoEditResult, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.request_id = kwargs.get('request_id', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result_py3.py new file mode 100644 index 000000000000..5ad27eb0cfdd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_draft_undo_edit_result_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class RunbookDraftUndoEditResult(Model): + """The response model for the undoedit runbook operation. + + :param status_code: Possible values include: 'Continue', + 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.automation.models.HttpStatusCode + :param request_id: + :type request_id: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + } + + def __init__(self, *, status_code=None, request_id: str=None, **kwargs) -> None: + super(RunbookDraftUndoEditResult, self).__init__(**kwargs) + self.status_code = status_code + self.request_id = request_id diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_paged.py new file mode 100644 index 000000000000..d17b5bda87ba --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class RunbookPaged(Paged): + """ + A paging container for iterating over a list of :class:`Runbook ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Runbook]'} + } + + def __init__(self, *args, **kwargs): + + super(RunbookPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter.py new file mode 100644 index 000000000000..7158fbb2efbd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class RunbookParameter(Model): + """Definition of the runbook parameter type. + + :param type: Gets or sets the type of the parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value to indicate whether the + parameter is madatory or not. + :type is_mandatory: bool + :param position: Get or sets the position of the parameter. + :type position: int + :param default_value: Gets or sets the default value of parameter. + :type default_value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'int'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunbookParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.is_mandatory = kwargs.get('is_mandatory', None) + self.position = kwargs.get('position', None) + self.default_value = kwargs.get('default_value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter_py3.py new file mode 100644 index 000000000000..78f9f5b22bb6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_parameter_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class RunbookParameter(Model): + """Definition of the runbook parameter type. + + :param type: Gets or sets the type of the parameter. + :type type: str + :param is_mandatory: Gets or sets a Boolean value to indicate whether the + parameter is madatory or not. + :type is_mandatory: bool + :param position: Get or sets the position of the parameter. + :type position: int + :param default_value: Gets or sets the default value of parameter. + :type default_value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'is_mandatory': {'key': 'isMandatory', 'type': 'bool'}, + 'position': {'key': 'position', 'type': 'int'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, is_mandatory: bool=None, position: int=None, default_value: str=None, **kwargs) -> None: + super(RunbookParameter, self).__init__(**kwargs) + self.type = type + self.is_mandatory = is_mandatory + self.position = position + self.default_value = default_value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_py3.py new file mode 100644 index 000000000000..54ec196f580f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_py3.py @@ -0,0 +1,120 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Runbook(TrackedResource): + """Definition of the runbook type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param runbook_type: Gets or sets the type of the runbook. Possible values + include: 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell', + 'GraphPowerShellWorkflow', 'GraphPowerShell' + :type runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum + :param publish_content_link: Gets or sets the published runbook content + link. + :type publish_content_link: ~azure.mgmt.automation.models.ContentLink + :param state: Gets or sets the state of the runbook. Possible values + include: 'New', 'Edit', 'Published' + :type state: str or ~azure.mgmt.automation.models.RunbookState + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param log_activity_trace: Gets or sets the option to log activity trace + of the runbook. + :type log_activity_trace: int + :param job_count: Gets or sets the job count of the runbook. + :type job_count: int + :param parameters: Gets or sets the runbook parameters. + :type parameters: dict[str, + ~azure.mgmt.automation.models.RunbookParameter] + :param output_types: Gets or sets the runbook output types. + :type output_types: list[str] + :param draft: Gets or sets the draft runbook properties. + :type draft: ~azure.mgmt.automation.models.RunbookDraft + :param provisioning_state: Gets or sets the provisioning state of the + runbook. Possible values include: 'Succeeded' + :type provisioning_state: str or + ~azure.mgmt.automation.models.RunbookProvisioningState + :param last_modified_by: Gets or sets the last modified by. + :type last_modified_by: str + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'runbook_type': {'key': 'properties.runbookType', 'type': 'str'}, + 'publish_content_link': {'key': 'properties.publishContentLink', 'type': 'ContentLink'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'job_count': {'key': 'properties.jobCount', 'type': 'int'}, + 'parameters': {'key': 'properties.parameters', 'type': '{RunbookParameter}'}, + 'output_types': {'key': 'properties.outputTypes', 'type': '[str]'}, + 'draft': {'key': 'properties.draft', 'type': 'RunbookDraft'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'RunbookProvisioningState'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', '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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, runbook_type=None, publish_content_link=None, state=None, log_verbose: bool=None, log_progress: bool=None, log_activity_trace: int=None, job_count: int=None, parameters=None, output_types=None, draft=None, provisioning_state=None, last_modified_by: str=None, creation_time=None, last_modified_time=None, description: str=None, etag: str=None, **kwargs) -> None: + super(Runbook, self).__init__(tags=tags, location=location, **kwargs) + self.runbook_type = runbook_type + self.publish_content_link = publish_content_link + self.state = state + self.log_verbose = log_verbose + self.log_progress = log_progress + self.log_activity_trace = log_activity_trace + self.job_count = job_count + self.parameters = parameters + self.output_types = output_types + self.draft = draft + self.provisioning_state = provisioning_state + self.last_modified_by = last_modified_by + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.description = description + self.etag = etag diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters.py new file mode 100644 index 000000000000..89c309654d1a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class RunbookUpdateParameters(Model): + """The parameters supplied to the update runbook operation. + + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RunbookUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.log_verbose = kwargs.get('log_verbose', None) + self.log_progress = kwargs.get('log_progress', None) + self.log_activity_trace = kwargs.get('log_activity_trace', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters_py3.py new file mode 100644 index 000000000000..2a94a4d6b297 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/runbook_update_parameters_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class RunbookUpdateParameters(Model): + """The parameters supplied to the update runbook operation. + + :param description: Gets or sets the description of the runbook. + :type description: str + :param log_verbose: Gets or sets verbose log option. + :type log_verbose: bool + :param log_progress: Gets or sets progress log option. + :type log_progress: bool + :param log_activity_trace: Gets or sets the activity-level tracing options + of the runbook. + :type log_activity_trace: int + :param name: Gets or sets the name of the resource. + :type name: str + :param location: Gets or sets the location of the resource. + :type location: str + :param tags: Gets or sets the tags attached to the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'log_verbose': {'key': 'properties.logVerbose', 'type': 'bool'}, + 'log_progress': {'key': 'properties.logProgress', 'type': 'bool'}, + 'log_activity_trace': {'key': 'properties.logActivityTrace', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, description: str=None, log_verbose: bool=None, log_progress: bool=None, log_activity_trace: int=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(RunbookUpdateParameters, self).__init__(**kwargs) + self.description = description + self.log_verbose = log_verbose + self.log_progress = log_progress + self.log_activity_trace = log_activity_trace + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule.py new file mode 100644 index 000000000000..23f520118c7c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule.py @@ -0,0 +1,103 @@ +# 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 .proxy_resource import ProxyResource + + +class Schedule(ProxyResource): + """Definition of the schedule. + + 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 start_time: Gets or sets the start time of the schedule. + :type start_time: 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 + :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. Default value: False . + :type is_enabled: bool + :param next_run: Gets or sets the next run time of the schedule. + :type next_run: 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' + :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 + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_time_offset_minutes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'start_time_offset_minutes': {'key': 'properties.startTimeOffsetMinutes', 'type': 'float'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'expiry_time_offset_minutes': {'key': 'properties.expiryTimeOffsetMinutes', 'type': 'float'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'next_run': {'key': 'properties.nextRun', 'type': 'iso-8601'}, + 'next_run_offset_minutes': {'key': 'properties.nextRunOffsetMinutes', 'type': 'float'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'advanced_schedule': {'key': 'properties.advancedSchedule', 'type': 'AdvancedSchedule'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property.py new file mode 100644 index 000000000000..2b8604fef632 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ScheduleAssociationProperty(Model): + """The schedule property associated with the entity. + + :param name: Gets or sets the name of the Schedule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleAssociationProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property_py3.py new file mode 100644 index 000000000000..bc6f01710cde --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_association_property_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ScheduleAssociationProperty(Model): + """The schedule property associated with the entity. + + :param name: Gets or sets the name of the Schedule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ScheduleAssociationProperty, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters.py new file mode 100644 index 000000000000..4661aa9f92ad --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ScheduleCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update schedule operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. 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 start_time: Required. Gets or sets the start time of the schedule. + :type start_time: datetime + :param expiry_time: Gets or sets the end time of the schedule. + :type expiry_time: datetime + :param interval: Gets or sets the interval of the schedule. + :type interval: object + :param frequency: Required. Possible values include: 'OneTime', 'Day', + 'Hour', 'Week', 'Month' + :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 AdvancedSchedule. + :type advanced_schedule: ~azure.mgmt.automation.models.AdvancedSchedule + """ + + _validation = { + 'name': {'required': True}, + 'start_time': {'required': True}, + 'frequency': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'interval': {'key': 'properties.interval', 'type': 'object'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'advanced_schedule': {'key': 'properties.advancedSchedule', 'type': 'AdvancedSchedule'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.start_time = kwargs.get('start_time', None) + self.expiry_time = kwargs.get('expiry_time', 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..ef62544e2d7c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_create_or_update_parameters_py3.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ScheduleCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update schedule operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. 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 start_time: Required. Gets or sets the start time of the schedule. + :type start_time: datetime + :param expiry_time: Gets or sets the end time of the schedule. + :type expiry_time: datetime + :param interval: Gets or sets the interval of the schedule. + :type interval: object + :param frequency: Required. Possible values include: 'OneTime', 'Day', + 'Hour', 'Week', 'Month' + :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 AdvancedSchedule. + :type advanced_schedule: ~azure.mgmt.automation.models.AdvancedSchedule + """ + + _validation = { + 'name': {'required': True}, + 'start_time': {'required': True}, + 'frequency': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'interval': {'key': 'properties.interval', 'type': 'object'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'advanced_schedule': {'key': 'properties.advancedSchedule', 'type': 'AdvancedSchedule'}, + } + + def __init__(self, *, name: str, start_time, frequency, description: str=None, expiry_time=None, interval=None, time_zone: str=None, advanced_schedule=None, **kwargs) -> None: + super(ScheduleCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.description = description + self.start_time = start_time + self.expiry_time = expiry_time + self.interval = interval + self.frequency = frequency + self.time_zone = time_zone + self.advanced_schedule = advanced_schedule diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_paged.py new file mode 100644 index 000000000000..a19b966390c9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties.py new file mode 100644 index 000000000000..ca5388ed8a67 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties.py @@ -0,0 +1,91 @@ +# 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 msrest.serialization import Model + + +class ScheduleProperties(Model): + """Definition of schedule parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the start time of the schedule. + :type start_time: 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 + :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. Default value: False . + :type is_enabled: bool + :param next_run: Gets or sets the next run time of the schedule. + :type next_run: 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' + :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 + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties_py3.py new file mode 100644 index 000000000000..a1482c6fbe53 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_properties_py3.py @@ -0,0 +1,91 @@ +# 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 msrest.serialization import Model + + +class ScheduleProperties(Model): + """Definition of schedule parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the start time of the schedule. + :type start_time: 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 + :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. Default value: False . + :type is_enabled: bool + :param next_run: Gets or sets the next run time of the schedule. + :type next_run: 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' + :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 + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: 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=None, expiry_time=None, expiry_time_offset_minutes: float=None, is_enabled: bool=False, next_run=None, next_run_offset_minutes: float=None, interval: int=None, frequency=None, time_zone: str=None, advanced_schedule=None, creation_time=None, last_modified_time=None, description: str=None, **kwargs) -> None: + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_py3.py new file mode 100644 index 000000000000..e36b5b66a4f6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_py3.py @@ -0,0 +1,103 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Schedule(ProxyResource): + """Definition of the schedule. + + 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 start_time: Gets or sets the start time of the schedule. + :type start_time: 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 + :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. Default value: False . + :type is_enabled: bool + :param next_run: Gets or sets the next run time of the schedule. + :type next_run: 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' + :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 + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_time_offset_minutes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'start_time_offset_minutes': {'key': 'properties.startTimeOffsetMinutes', 'type': 'float'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'expiry_time_offset_minutes': {'key': 'properties.expiryTimeOffsetMinutes', 'type': 'float'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'next_run': {'key': 'properties.nextRun', 'type': 'iso-8601'}, + 'next_run_offset_minutes': {'key': 'properties.nextRunOffsetMinutes', 'type': 'float'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'advanced_schedule': {'key': 'properties.advancedSchedule', 'type': 'AdvancedSchedule'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, start_time=None, expiry_time=None, expiry_time_offset_minutes: float=None, is_enabled: bool=False, next_run=None, next_run_offset_minutes: float=None, interval: int=None, frequency=None, time_zone: str=None, advanced_schedule=None, creation_time=None, last_modified_time=None, description: str=None, **kwargs) -> None: + super(Schedule, 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters.py new file mode 100644 index 000000000000..d6118c189eda --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ScheduleUpdateParameters(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 is_enabled: Gets or sets a value indicating whether this schedule + is enabled. + :type is_enabled: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ScheduleUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters_py3.py new file mode 100644 index 000000000000..3ee23e7d436e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/schedule_update_parameters_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ScheduleUpdateParameters(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 is_enabled: Gets or sets a value indicating whether this schedule + is enabled. + :type is_enabled: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, description: str=None, is_enabled: bool=None, **kwargs) -> None: + super(ScheduleUpdateParameters, self).__init__(**kwargs) + self.name = name + self.description = description + self.is_enabled = is_enabled diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/sku.py b/azure-mgmt-automation/azure/mgmt/automation/models/sku.py new file mode 100644 index 000000000000..b60d75249ad5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/sku.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class Sku(Model): + """The account SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name of the account. Possible + values include: 'Free', 'Basic' + :type name: str or ~azure.mgmt.automation.models.SkuNameEnum + :param family: Gets or sets the SKU family. + :type family: str + :param capacity: Gets or sets the SKU capacity. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/sku_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/sku_py3.py new file mode 100644 index 000000000000..49cba7f14588 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/sku_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class Sku(Model): + """The account SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name of the account. Possible + values include: 'Free', 'Basic' + :type name: str or ~azure.mgmt.automation.models.SkuNameEnum + :param family: Gets or sets the SKU family. + :type family: str + :param capacity: Gets or sets the SKU capacity. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.family = family + self.capacity = capacity diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration.py new file mode 100644 index 000000000000..b2e5eec93568 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration.py @@ -0,0 +1,93 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfiguration(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: detailes of provisioning error + :type error: ~azure.mgmt.automation.models.ErrorResponse + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(SoftwareUpdateConfiguration, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.update_configuration = kwargs.get('update_configuration', None) + self.schedule_info = kwargs.get('schedule_info', None) + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item.py new file mode 100644 index 000000000000..0f97f991cb86 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationCollectionItem(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' + :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency + :param start_time: the start time of the update. + :type start_time: datetime + :ivar creation_time: Creation time of the software update configuration, + which only appears in the response. + :vartype creation_time: datetime + :ivar last_modified_time: Last time software update configuration was + modified, which only appears in the response. + :vartype last_modified_time: 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 + """ + + _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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item_py3.py new file mode 100644 index 000000000000..62cb1f0d1ea9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_collection_item_py3.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationCollectionItem(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' + :type frequency: str or ~azure.mgmt.automation.models.ScheduleFrequency + :param start_time: the start time of the update. + :type start_time: datetime + :ivar creation_time: Creation time of the software update configuration, + which only appears in the response. + :vartype creation_time: datetime + :ivar last_modified_time: Last time software update configuration was + modified, which only appears in the response. + :vartype last_modified_time: 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 + """ + + _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=None, frequency=None, start_time=None, next_run=None, **kwargs) -> None: + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result.py new file mode 100644 index 000000000000..e29160d8b3df --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationListResult(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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result_py3.py new file mode 100644 index 000000000000..e8775fae90f7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_list_result_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationListResult(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=None, **kwargs) -> None: + super(SoftwareUpdateConfigurationListResult, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run.py new file mode 100644 index 000000000000..5307f22d1d3c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run.py @@ -0,0 +1,124 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationMachineRun(Model): + """Software update configuration machine run model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration machine run + :vartype name: str + :ivar id: Resource Id of the software update configuration machine run + :vartype id: str + :ivar target_computer: name of the updated computer + :vartype target_computer: str + :ivar target_computer_type: type of the updated computer. + :vartype target_computer_type: str + :param software_update_configuration: software update configuration + triggered this run + :type software_update_configuration: + ~azure.mgmt.automation.models.UpdateConfigurationNavigation + :ivar status: Status of the software update configuration machine run. + :vartype status: str + :ivar os_type: Operating system target of the software update + configuration triggered this run + :vartype os_type: str + :ivar correlation_id: correlation id of the software update configuration + machine run + :vartype correlation_id: str + :ivar source_computer_id: source computer id of the software update + configuration machine run + :vartype source_computer_id: str + :ivar start_time: Start time of the software update configuration machine + run. + :vartype start_time: datetime + :ivar end_time: End time of the software update configuration machine run. + :vartype end_time: datetime + :ivar configured_duration: configured duration for the software update + configuration run. + :vartype configured_duration: str + :param job: Job associated with the software update configuration machine + run + :type job: ~azure.mgmt.automation.models.JobNavigation + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'target_computer': {'readonly': True}, + 'target_computer_type': {'readonly': True}, + 'status': {'readonly': True}, + 'os_type': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'source_computer_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'configured_duration': {'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'}, + 'target_computer': {'key': 'properties.targetComputer', 'type': 'str'}, + 'target_computer_type': {'key': 'properties.targetComputerType', 'type': 'str'}, + 'software_update_configuration': {'key': 'properties.softwareUpdateConfiguration', 'type': 'UpdateConfigurationNavigation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'source_computer_id': {'key': 'properties.sourceComputerId', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'configured_duration': {'key': 'properties.configuredDuration', 'type': 'str'}, + 'job': {'key': 'properties.job', 'type': 'JobNavigation'}, + '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'}, + } + + def __init__(self, **kwargs): + super(SoftwareUpdateConfigurationMachineRun, self).__init__(**kwargs) + self.name = None + self.id = None + self.target_computer = None + self.target_computer_type = None + self.software_update_configuration = kwargs.get('software_update_configuration', None) + self.status = None + self.os_type = None + self.correlation_id = None + self.source_computer_id = None + self.start_time = None + self.end_time = None + self.configured_duration = None + self.job = kwargs.get('job', None) + self.creation_time = None + self.created_by = None + self.last_modified_time = None + self.last_modified_by = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result.py new file mode 100644 index 000000000000..1b86f66bd4ed --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationMachineRunListResult(Model): + """result of listing all software update configuration machine runs. + + :param value: outer object returned when listing all software update + configuration machine runs + :type value: + list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRun] + :param next_link: link to next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationMachineRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SoftwareUpdateConfigurationMachineRunListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result_py3.py new file mode 100644 index 000000000000..5e5294543df2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_list_result_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationMachineRunListResult(Model): + """result of listing all software update configuration machine runs. + + :param value: outer object returned when listing all software update + configuration machine runs + :type value: + list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRun] + :param next_link: link to next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationMachineRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SoftwareUpdateConfigurationMachineRunListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_py3.py new file mode 100644 index 000000000000..55927e6f7590 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_machine_run_py3.py @@ -0,0 +1,124 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationMachineRun(Model): + """Software update configuration machine run model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration machine run + :vartype name: str + :ivar id: Resource Id of the software update configuration machine run + :vartype id: str + :ivar target_computer: name of the updated computer + :vartype target_computer: str + :ivar target_computer_type: type of the updated computer. + :vartype target_computer_type: str + :param software_update_configuration: software update configuration + triggered this run + :type software_update_configuration: + ~azure.mgmt.automation.models.UpdateConfigurationNavigation + :ivar status: Status of the software update configuration machine run. + :vartype status: str + :ivar os_type: Operating system target of the software update + configuration triggered this run + :vartype os_type: str + :ivar correlation_id: correlation id of the software update configuration + machine run + :vartype correlation_id: str + :ivar source_computer_id: source computer id of the software update + configuration machine run + :vartype source_computer_id: str + :ivar start_time: Start time of the software update configuration machine + run. + :vartype start_time: datetime + :ivar end_time: End time of the software update configuration machine run. + :vartype end_time: datetime + :ivar configured_duration: configured duration for the software update + configuration run. + :vartype configured_duration: str + :param job: Job associated with the software update configuration machine + run + :type job: ~azure.mgmt.automation.models.JobNavigation + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'target_computer': {'readonly': True}, + 'target_computer_type': {'readonly': True}, + 'status': {'readonly': True}, + 'os_type': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'source_computer_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'configured_duration': {'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'}, + 'target_computer': {'key': 'properties.targetComputer', 'type': 'str'}, + 'target_computer_type': {'key': 'properties.targetComputerType', 'type': 'str'}, + 'software_update_configuration': {'key': 'properties.softwareUpdateConfiguration', 'type': 'UpdateConfigurationNavigation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'source_computer_id': {'key': 'properties.sourceComputerId', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'configured_duration': {'key': 'properties.configuredDuration', 'type': 'str'}, + 'job': {'key': 'properties.job', 'type': 'JobNavigation'}, + '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'}, + } + + def __init__(self, *, software_update_configuration=None, job=None, **kwargs) -> None: + super(SoftwareUpdateConfigurationMachineRun, self).__init__(**kwargs) + self.name = None + self.id = None + self.target_computer = None + self.target_computer_type = None + self.software_update_configuration = software_update_configuration + self.status = None + self.os_type = None + self.correlation_id = None + self.source_computer_id = None + self.start_time = None + self.end_time = None + self.configured_duration = None + self.job = job + self.creation_time = None + self.created_by = None + self.last_modified_time = None + self.last_modified_by = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_py3.py new file mode 100644 index 000000000000..9c5b28ff2cb5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_py3.py @@ -0,0 +1,93 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfiguration(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: detailes of provisioning error + :type error: ~azure.mgmt.automation.models.ErrorResponse + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _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'}, + } + + def __init__(self, *, update_configuration, schedule_info, error=None, **kwargs) -> None: + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run.py new file mode 100644 index 000000000000..71c188478ea2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run.py @@ -0,0 +1,107 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationRun(Model): + """Software update configuration Run properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration run. + :vartype name: str + :ivar id: Resource Id of the software update configuration run + :vartype id: str + :param software_update_configuration: software update configuration + triggered this run + :type software_update_configuration: + ~azure.mgmt.automation.models.UpdateConfigurationNavigation + :ivar status: Status of the software update configuration run. + :vartype status: str + :ivar configured_duration: configured duration for the software update + configuration run. + :vartype configured_duration: str + :ivar os_type: Operating system target of the software update + configuration triggered this run + :vartype os_type: str + :ivar start_time: Etart time of the software update configuration run. + :vartype start_time: datetime + :ivar end_time: End time of the software update configuration run. + :vartype end_time: datetime + :ivar computer_count: Number of computers in the software update + configuration run. + :vartype computer_count: int + :ivar failed_count: Number of computers with failed status. + :vartype failed_count: int + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'configured_duration': {'readonly': True}, + 'os_type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'computer_count': {'readonly': True}, + 'failed_count': {'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'}, + 'software_update_configuration': {'key': 'properties.softwareUpdateConfiguration', 'type': 'UpdateConfigurationNavigation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'configured_duration': {'key': 'properties.configuredDuration', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'computer_count': {'key': 'properties.computerCount', 'type': 'int'}, + 'failed_count': {'key': 'properties.failedCount', 'type': 'int'}, + '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'}, + } + + def __init__(self, **kwargs): + super(SoftwareUpdateConfigurationRun, self).__init__(**kwargs) + self.name = None + self.id = None + self.software_update_configuration = kwargs.get('software_update_configuration', None) + self.status = None + self.configured_duration = None + self.os_type = None + self.start_time = None + self.end_time = None + self.computer_count = None + self.failed_count = None + self.creation_time = None + self.created_by = None + self.last_modified_time = None + self.last_modified_by = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result.py new file mode 100644 index 000000000000..4aaac9712199 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationRunListResult(Model): + """result of listing all software update configuration runs. + + :param value: outer object returned when listing all software update + configuration runs + :type value: + list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun] + :param next_link: link to next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SoftwareUpdateConfigurationRunListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result_py3.py new file mode 100644 index 000000000000..340328d63fe7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_list_result_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationRunListResult(Model): + """result of listing all software update configuration runs. + + :param value: outer object returned when listing all software update + configuration runs + :type value: + list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun] + :param next_link: link to next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SoftwareUpdateConfigurationRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SoftwareUpdateConfigurationRunListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_py3.py new file mode 100644 index 000000000000..e2ed13d8cc76 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/software_update_configuration_run_py3.py @@ -0,0 +1,107 @@ +# 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 msrest.serialization import Model + + +class SoftwareUpdateConfigurationRun(Model): + """Software update configuration Run properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration run. + :vartype name: str + :ivar id: Resource Id of the software update configuration run + :vartype id: str + :param software_update_configuration: software update configuration + triggered this run + :type software_update_configuration: + ~azure.mgmt.automation.models.UpdateConfigurationNavigation + :ivar status: Status of the software update configuration run. + :vartype status: str + :ivar configured_duration: configured duration for the software update + configuration run. + :vartype configured_duration: str + :ivar os_type: Operating system target of the software update + configuration triggered this run + :vartype os_type: str + :ivar start_time: Etart time of the software update configuration run. + :vartype start_time: datetime + :ivar end_time: End time of the software update configuration run. + :vartype end_time: datetime + :ivar computer_count: Number of computers in the software update + configuration run. + :vartype computer_count: int + :ivar failed_count: Number of computers with failed status. + :vartype failed_count: int + :ivar creation_time: Creation time of theresource, which only appears in + the response. + :vartype creation_time: 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 + :ivar last_modified_by: lastModifiedBy property, which only appears in the + response. + :vartype last_modified_by: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'configured_duration': {'readonly': True}, + 'os_type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'computer_count': {'readonly': True}, + 'failed_count': {'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'}, + 'software_update_configuration': {'key': 'properties.softwareUpdateConfiguration', 'type': 'UpdateConfigurationNavigation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'configured_duration': {'key': 'properties.configuredDuration', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'computer_count': {'key': 'properties.computerCount', 'type': 'int'}, + 'failed_count': {'key': 'properties.failedCount', 'type': 'int'}, + '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'}, + } + + def __init__(self, *, software_update_configuration=None, **kwargs) -> None: + super(SoftwareUpdateConfigurationRun, self).__init__(**kwargs) + self.name = None + self.id = None + self.software_update_configuration = software_update_configuration + self.status = None + self.configured_duration = None + self.os_type = None + self.start_time = None + self.end_time = None + self.computer_count = None + self.failed_count = None + self.creation_time = None + self.created_by = None + self.last_modified_time = None + self.last_modified_by = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py new file mode 100644 index 000000000000..23ca2e977cec --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py @@ -0,0 +1,81 @@ +# 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 .proxy_resource import ProxyResource + + +class SourceControl(ProxyResource): + """Definition of the source control. + + 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 repo_url: The repo url of the source control. + :type repo_url: str + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. + :type branch: str + :param folder_path: The folder path of the source control. + :type folder_path: str + :param auto_sync: The auto sync of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param source_type: The source type. Must be one of VsoGit, VsoTfvc, + GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' + :type source_type: str or ~azure.mgmt.automation.models.SourceType + :param description: The description. + :type description: str + :param creation_time: The creation time. + :type creation_time: datetime + :param last_modified_time: The last modified time. + :type last_modified_time: datetime + """ + + _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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SourceControl, self).__init__(**kwargs) + self.repo_url = kwargs.get('repo_url', None) + self.branch = kwargs.get('branch', None) + self.folder_path = kwargs.get('folder_path', None) + self.auto_sync = kwargs.get('auto_sync', None) + self.publish_runbook = kwargs.get('publish_runbook', None) + self.source_type = kwargs.get('source_type', None) + self.description = kwargs.get('description', None) + self.creation_time = kwargs.get('creation_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py new file mode 100644 index 000000000000..3d1e33aa2faa --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class SourceControlCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update source control operation. + + :param repo_url: The repo url of the source control. + :type repo_url: str + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. + :type branch: str + :param folder_path: The folder path of the source control. Path must be + relative. + :type folder_path: str + :param auto_sync: The auto async of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param source_type: The source type. Must be one of VsoGit, VsoTfvc, + GitHub, case sensitive. Possible values include: 'VsoGit', 'VsoTfvc', + 'GitHub' + :type source_type: str or ~azure.mgmt.automation.models.SourceType + :param security_token: The authorization token for the repo of the source + control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. + :type description: str + """ + + _validation = { + 'repo_url': {'max_length': 2000}, + 'branch': {'max_length': 255}, + 'folder_path': {'max_length': 255}, + 'description': {'max_length': 512}, + } + + _attribute_map = { + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlCreateOrUpdateParameters, self).__init__(**kwargs) + self.repo_url = kwargs.get('repo_url', None) + self.branch = kwargs.get('branch', None) + self.folder_path = kwargs.get('folder_path', None) + self.auto_sync = kwargs.get('auto_sync', None) + self.publish_runbook = kwargs.get('publish_runbook', None) + self.source_type = kwargs.get('source_type', None) + self.security_token = kwargs.get('security_token', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..f5e5ab760f0c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters_py3.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class SourceControlCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update source control operation. + + :param repo_url: The repo url of the source control. + :type repo_url: str + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. + :type branch: str + :param folder_path: The folder path of the source control. Path must be + relative. + :type folder_path: str + :param auto_sync: The auto async of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param source_type: The source type. Must be one of VsoGit, VsoTfvc, + GitHub, case sensitive. Possible values include: 'VsoGit', 'VsoTfvc', + 'GitHub' + :type source_type: str or ~azure.mgmt.automation.models.SourceType + :param security_token: The authorization token for the repo of the source + control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. + :type description: str + """ + + _validation = { + 'repo_url': {'max_length': 2000}, + 'branch': {'max_length': 255}, + 'folder_path': {'max_length': 255}, + 'description': {'max_length': 512}, + } + + _attribute_map = { + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, repo_url: str=None, branch: str=None, folder_path: str=None, auto_sync: bool=None, publish_runbook: bool=None, source_type=None, security_token=None, description: str=None, **kwargs) -> None: + super(SourceControlCreateOrUpdateParameters, self).__init__(**kwargs) + self.repo_url = repo_url + self.branch = branch + self.folder_path = folder_path + self.auto_sync = auto_sync + self.publish_runbook = publish_runbook + self.source_type = source_type + self.security_token = security_token + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_paged.py new file mode 100644 index 000000000000..bf214640dd4e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_py3.py new file mode 100644 index 000000000000..a6c78322c09c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_py3.py @@ -0,0 +1,81 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class SourceControl(ProxyResource): + """Definition of the source control. + + 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 repo_url: The repo url of the source control. + :type repo_url: str + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. + :type branch: str + :param folder_path: The folder path of the source control. + :type folder_path: str + :param auto_sync: The auto sync of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param source_type: The source type. Must be one of VsoGit, VsoTfvc, + GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' + :type source_type: str or ~azure.mgmt.automation.models.SourceType + :param description: The description. + :type description: str + :param creation_time: The creation time. + :type creation_time: datetime + :param last_modified_time: The last modified time. + :type last_modified_time: datetime + """ + + _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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, repo_url: str=None, branch: str=None, folder_path: str=None, auto_sync: bool=None, publish_runbook: bool=None, source_type=None, description: str=None, creation_time=None, last_modified_time=None, **kwargs) -> None: + super(SourceControl, self).__init__(**kwargs) + self.repo_url = repo_url + self.branch = branch + self.folder_path = folder_path + self.auto_sync = auto_sync + self.publish_runbook = publish_runbook + self.source_type = source_type + self.description = description + self.creation_time = creation_time + self.last_modified_time = last_modified_time diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py new file mode 100644 index 000000000000..0afe78bbfe23 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class SourceControlSecurityTokenProperties(Model): + """SourceControlSecurityTokenProperties. + + :param access_token: The access token. + :type access_token: str + :param refresh_token: The refresh token. + :type refresh_token: str + :param token_type: The token type. Must be either PersonalAccessToken or + Oauth. Possible values include: 'PersonalAccessToken', 'Oauth' + :type token_type: str or ~azure.mgmt.automation.models.TokenType + """ + + _validation = { + 'access_token': {'max_length': 1024}, + 'refresh_token': {'max_length': 1024}, + } + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlSecurityTokenProperties, self).__init__(**kwargs) + self.access_token = kwargs.get('access_token', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.token_type = kwargs.get('token_type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties_py3.py new file mode 100644 index 000000000000..9022bf66ed72 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class SourceControlSecurityTokenProperties(Model): + """SourceControlSecurityTokenProperties. + + :param access_token: The access token. + :type access_token: str + :param refresh_token: The refresh token. + :type refresh_token: str + :param token_type: The token type. Must be either PersonalAccessToken or + Oauth. Possible values include: 'PersonalAccessToken', 'Oauth' + :type token_type: str or ~azure.mgmt.automation.models.TokenType + """ + + _validation = { + 'access_token': {'max_length': 1024}, + 'refresh_token': {'max_length': 1024}, + } + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + } + + def __init__(self, *, access_token: str=None, refresh_token: str=None, token_type=None, **kwargs) -> None: + super(SourceControlSecurityTokenProperties, self).__init__(**kwargs) + self.access_token = access_token + self.refresh_token = refresh_token + self.token_type = token_type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py new file mode 100644 index 000000000000..a4687eb011e2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py @@ -0,0 +1,75 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJob(Model): + """Definition of the source control sync job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ProvisioningState + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :param sync_type: The sync type. Possible values include: 'PartialSync', + 'FullSync' + :type sync_type: str or ~azure.mgmt.automation.models.SyncType + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'sync_type': {'key': 'properties.syncType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlSyncJob, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.source_control_sync_job_id = kwargs.get('source_control_sync_job_id', None) + self.creation_time = None + self.provisioning_state = kwargs.get('provisioning_state', None) + self.start_time = None + self.end_time = None + self.sync_type = kwargs.get('sync_type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py new file mode 100644 index 000000000000..69408bee1c21 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py @@ -0,0 +1,68 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobById(Model): + """Definition of the source control sync job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The id of the job. + :type id: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ProvisioningState + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :param sync_type: The sync type. Possible values include: 'PartialSync', + 'FullSync' + :type sync_type: str or ~azure.mgmt.automation.models.SyncType + :param exception: The exceptions that occured while running the sync job. + :type exception: str + """ + + _validation = { + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'sync_type': {'key': 'properties.syncType', 'type': 'str'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlSyncJobById, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.source_control_sync_job_id = kwargs.get('source_control_sync_job_id', None) + self.creation_time = None + self.provisioning_state = kwargs.get('provisioning_state', None) + self.start_time = None + self.end_time = None + self.sync_type = kwargs.get('sync_type', None) + self.exception = kwargs.get('exception', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id_py3.py new file mode 100644 index 000000000000..04a74360f6d4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id_py3.py @@ -0,0 +1,68 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobById(Model): + """Definition of the source control sync job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The id of the job. + :type id: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ProvisioningState + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :param sync_type: The sync type. Possible values include: 'PartialSync', + 'FullSync' + :type sync_type: str or ~azure.mgmt.automation.models.SyncType + :param exception: The exceptions that occured while running the sync job. + :type exception: str + """ + + _validation = { + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'sync_type': {'key': 'properties.syncType', 'type': 'str'}, + 'exception': {'key': 'properties.exception', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, source_control_sync_job_id: str=None, provisioning_state=None, sync_type=None, exception: str=None, **kwargs) -> None: + super(SourceControlSyncJobById, self).__init__(**kwargs) + self.id = id + self.source_control_sync_job_id = source_control_sync_job_id + self.creation_time = None + self.provisioning_state = provisioning_state + self.start_time = None + self.end_time = None + self.sync_type = sync_type + self.exception = exception diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py new file mode 100644 index 000000000000..71f015274976 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobCreateParameters(Model): + """The parameters supplied to the create source control sync job operation. + + All required parameters must be populated in order to send to Azure. + + :param commit_id: Required. The commit id of the source control sync job. + If not syncing to a commitId, enter an empty string. + :type commit_id: str + """ + + _validation = { + 'commit_id': {'required': True, 'min_length': 0}, + } + + _attribute_map = { + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlSyncJobCreateParameters, self).__init__(**kwargs) + self.commit_id = kwargs.get('commit_id', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters_py3.py new file mode 100644 index 000000000000..611e971e6f89 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobCreateParameters(Model): + """The parameters supplied to the create source control sync job operation. + + All required parameters must be populated in order to send to Azure. + + :param commit_id: Required. The commit id of the source control sync job. + If not syncing to a commitId, enter an empty string. + :type commit_id: str + """ + + _validation = { + 'commit_id': {'required': True, 'min_length': 0}, + } + + _attribute_map = { + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + } + + def __init__(self, *, commit_id: str, **kwargs) -> None: + super(SourceControlSyncJobCreateParameters, self).__init__(**kwargs) + self.commit_id = commit_id diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_paged.py new file mode 100644 index 000000000000..db7622ff89a7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class SourceControlSyncJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControlSyncJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControlSyncJob]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlSyncJobPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_py3.py new file mode 100644 index 000000000000..c6a4cd4ac6ca --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_py3.py @@ -0,0 +1,75 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJob(Model): + """Definition of the source control sync job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. + :vartype creation_time: datetime + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' + :type provisioning_state: str or + ~azure.mgmt.automation.models.ProvisioningState + :ivar start_time: The start time of the job. + :vartype start_time: datetime + :ivar end_time: The end time of the job. + :vartype end_time: datetime + :param sync_type: The sync type. Possible values include: 'PartialSync', + 'FullSync' + :type sync_type: str or ~azure.mgmt.automation.models.SyncType + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'sync_type': {'key': 'properties.syncType', 'type': 'str'}, + } + + def __init__(self, *, source_control_sync_job_id: str=None, provisioning_state=None, sync_type=None, **kwargs) -> None: + super(SourceControlSyncJob, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.source_control_sync_job_id = source_control_sync_job_id + self.creation_time = None + self.provisioning_state = provisioning_state + self.start_time = None + self.end_time = None + self.sync_type = sync_type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py new file mode 100644 index 000000000000..8ab2c480e8e2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobStream(Model): + """Definition of the source control sync job stream. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_stream_id: The sync job stream id. + :type source_control_sync_job_stream_id: str + :param summary: The summary of the sync job stream. + :type summary: str + :ivar time: The time of the sync job stream. + :vartype time: datetime + :param stream_type: The type of the sync job stream. Possible values + include: 'Error', 'Output' + :type stream_type: str or ~azure.mgmt.automation.models.StreamType + """ + + _validation = { + 'id': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_stream_id': {'key': 'properties.sourceControlSyncJobStreamId', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlSyncJobStream, self).__init__(**kwargs) + self.id = None + self.source_control_sync_job_stream_id = kwargs.get('source_control_sync_job_stream_id', None) + self.summary = kwargs.get('summary', None) + self.time = None + self.stream_type = kwargs.get('stream_type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py new file mode 100644 index 000000000000..2d53c871904b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobStreamById(Model): + """Definition of the source control sync job stream by id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_stream_id: The sync job stream id. + :type source_control_sync_job_stream_id: str + :param summary: The summary of the sync job stream. + :type summary: str + :ivar time: The time of the sync job stream. + :vartype time: datetime + :param stream_type: The type of the sync job stream. Possible values + include: 'Error', 'Output' + :type stream_type: str or ~azure.mgmt.automation.models.StreamType + :param stream_text: The text of the sync job stream. + :type stream_text: str + :param value: The values of the job stream. + :type value: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_stream_id': {'key': 'properties.sourceControlSyncJobStreamId', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + 'stream_text': {'key': 'properties.streamText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(SourceControlSyncJobStreamById, self).__init__(**kwargs) + self.id = None + self.source_control_sync_job_stream_id = kwargs.get('source_control_sync_job_stream_id', None) + self.summary = kwargs.get('summary', None) + self.time = None + self.stream_type = kwargs.get('stream_type', None) + self.stream_text = kwargs.get('stream_text', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id_py3.py new file mode 100644 index 000000000000..c7f15a69bf50 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id_py3.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobStreamById(Model): + """Definition of the source control sync job stream by id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_stream_id: The sync job stream id. + :type source_control_sync_job_stream_id: str + :param summary: The summary of the sync job stream. + :type summary: str + :ivar time: The time of the sync job stream. + :vartype time: datetime + :param stream_type: The type of the sync job stream. Possible values + include: 'Error', 'Output' + :type stream_type: str or ~azure.mgmt.automation.models.StreamType + :param stream_text: The text of the sync job stream. + :type stream_text: str + :param value: The values of the job stream. + :type value: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_stream_id': {'key': 'properties.sourceControlSyncJobStreamId', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + 'stream_text': {'key': 'properties.streamText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': '{object}'}, + } + + def __init__(self, *, source_control_sync_job_stream_id: str=None, summary: str=None, stream_type=None, stream_text: str=None, value=None, **kwargs) -> None: + super(SourceControlSyncJobStreamById, self).__init__(**kwargs) + self.id = None + self.source_control_sync_job_stream_id = source_control_sync_job_stream_id + self.summary = summary + self.time = None + self.stream_type = stream_type + self.stream_text = stream_text + self.value = value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_paged.py new file mode 100644 index 000000000000..9f5ed80415e0 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class SourceControlSyncJobStreamPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControlSyncJobStream ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControlSyncJobStream]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlSyncJobStreamPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_py3.py new file mode 100644 index 000000000000..3c0a2634f68f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class SourceControlSyncJobStream(Model): + """Definition of the source control sync job stream. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource id. + :vartype id: str + :param source_control_sync_job_stream_id: The sync job stream id. + :type source_control_sync_job_stream_id: str + :param summary: The summary of the sync job stream. + :type summary: str + :ivar time: The time of the sync job stream. + :vartype time: datetime + :param stream_type: The type of the sync job stream. Possible values + include: 'Error', 'Output' + :type stream_type: str or ~azure.mgmt.automation.models.StreamType + """ + + _validation = { + 'id': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_control_sync_job_stream_id': {'key': 'properties.sourceControlSyncJobStreamId', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, + } + + def __init__(self, *, source_control_sync_job_stream_id: str=None, summary: str=None, stream_type=None, **kwargs) -> None: + super(SourceControlSyncJobStream, self).__init__(**kwargs) + self.id = None + self.source_control_sync_job_stream_id = source_control_sync_job_stream_id + self.summary = summary + self.time = None + self.stream_type = stream_type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py new file mode 100644 index 000000000000..16510ecca527 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class SourceControlUpdateParameters(Model): + """The parameters supplied to the update source control operation. + + :param branch: The repo branch of the source control. + :type branch: str + :param folder_path: The folder path of the source control. Path must be + relative. + :type folder_path: str + :param auto_sync: The auto sync of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param security_token: The authorization token for the repo of the source + control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. + :type description: str + """ + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceControlUpdateParameters, self).__init__(**kwargs) + self.branch = kwargs.get('branch', None) + self.folder_path = kwargs.get('folder_path', None) + self.auto_sync = kwargs.get('auto_sync', None) + self.publish_runbook = kwargs.get('publish_runbook', None) + self.security_token = kwargs.get('security_token', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters_py3.py new file mode 100644 index 000000000000..0000d547b02f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters_py3.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class SourceControlUpdateParameters(Model): + """The parameters supplied to the update source control operation. + + :param branch: The repo branch of the source control. + :type branch: str + :param folder_path: The folder path of the source control. Path must be + relative. + :type folder_path: str + :param auto_sync: The auto sync of the source control. Default is false. + :type auto_sync: bool + :param publish_runbook: The auto publish of the source control. Default is + true. + :type publish_runbook: bool + :param security_token: The authorization token for the repo of the source + control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. + :type description: str + """ + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, + 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, branch: str=None, folder_path: str=None, auto_sync: bool=None, publish_runbook: bool=None, security_token=None, description: str=None, **kwargs) -> None: + super(SourceControlUpdateParameters, self).__init__(**kwargs) + self.branch = branch + self.folder_path = folder_path + self.auto_sync = auto_sync + self.publish_runbook = publish_runbook + self.security_token = security_token + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/statistics.py b/azure-mgmt-automation/azure/mgmt/automation/models/statistics.py new file mode 100644 index 000000000000..6c27f5c61b6f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/statistics.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class Statistics(Model): + """Definition of the statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar counter_property: Gets the property value of the statistic. + :vartype counter_property: str + :ivar counter_value: Gets the value of the statistic. + :vartype counter_value: long + :ivar start_time: Gets the startTime of the statistic. + :vartype start_time: datetime + :ivar end_time: Gets the endTime of the statistic. + :vartype end_time: datetime + :ivar id: Gets the id. + :vartype id: str + """ + + _validation = { + 'counter_property': {'readonly': True}, + 'counter_value': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'counter_property': {'key': 'counterProperty', 'type': 'str'}, + 'counter_value': {'key': 'counterValue', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Statistics, self).__init__(**kwargs) + self.counter_property = None + self.counter_value = None + self.start_time = None + self.end_time = None + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/statistics_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/statistics_paged.py new file mode 100644 index 000000000000..64b736569df9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/statistics_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class StatisticsPaged(Paged): + """ + A paging container for iterating over a list of :class:`Statistics ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Statistics]'} + } + + def __init__(self, *args, **kwargs): + + super(StatisticsPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/statistics_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/statistics_py3.py new file mode 100644 index 000000000000..5a505fe552c8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/statistics_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class Statistics(Model): + """Definition of the statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar counter_property: Gets the property value of the statistic. + :vartype counter_property: str + :ivar counter_value: Gets the value of the statistic. + :vartype counter_value: long + :ivar start_time: Gets the startTime of the statistic. + :vartype start_time: datetime + :ivar end_time: Gets the endTime of the statistic. + :vartype end_time: datetime + :ivar id: Gets the id. + :vartype id: str + """ + + _validation = { + 'counter_property': {'readonly': True}, + 'counter_value': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'counter_property': {'key': 'counterProperty', 'type': 'str'}, + 'counter_value': {'key': 'counterValue', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Statistics, self).__init__(**kwargs) + self.counter_property = None + self.counter_value = None + self.start_time = None + self.end_time = None + self.id = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/test_job.py b/azure-mgmt-automation/azure/mgmt/automation/models/test_job.py new file mode 100644 index 000000000000..33980835c7d2 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/test_job.py @@ -0,0 +1,72 @@ +# 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 msrest.serialization import Model + + +class TestJob(Model): + """Definition of the test job. + + :param creation_time: Gets or sets the creation time of the test job. + :type creation_time: datetime + :param status: Gets or sets the status of the test job. + :type status: str + :param status_details: Gets or sets the status details of the test job. + :type status_details: str + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param start_time: Gets or sets the start time of the test job. + :type start_time: datetime + :param end_time: Gets or sets the end time of the test job. + :type end_time: datetime + :param exception: Gets or sets the exception of the test job. + :type exception: str + :param last_modified_time: Gets or sets the last modified time of the test + job. + :type last_modified_time: datetime + :param last_status_modified_time: Gets or sets the last status modified + time of the test job. + :type last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the test job. + :type parameters: dict[str, str] + :param log_activity_trace: The activity-level tracing options of the + runbook. + :type log_activity_trace: int + """ + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'run_on': {'key': 'runOn', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'exception', 'type': 'str'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'log_activity_trace': {'key': 'logActivityTrace', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(TestJob, self).__init__(**kwargs) + self.creation_time = kwargs.get('creation_time', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.run_on = kwargs.get('run_on', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.exception = kwargs.get('exception', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.last_status_modified_time = kwargs.get('last_status_modified_time', None) + self.parameters = kwargs.get('parameters', None) + self.log_activity_trace = kwargs.get('log_activity_trace', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters.py new file mode 100644 index 000000000000..c1715600596a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class TestJobCreateParameters(Model): + """The parameters supplied to the create test job operation. + + :param parameters: Gets or sets the parameters of the test job. + :type parameters: dict[str, str] + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'run_on': {'key': 'runOn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TestJobCreateParameters, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.run_on = kwargs.get('run_on', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters_py3.py new file mode 100644 index 000000000000..f52032b6b7d8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_create_parameters_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class TestJobCreateParameters(Model): + """The parameters supplied to the create test job operation. + + :param parameters: Gets or sets the parameters of the test job. + :type parameters: dict[str, str] + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'run_on': {'key': 'runOn', 'type': 'str'}, + } + + def __init__(self, *, parameters=None, run_on: str=None, **kwargs) -> None: + super(TestJobCreateParameters, self).__init__(**kwargs) + self.parameters = parameters + self.run_on = run_on diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/test_job_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_py3.py new file mode 100644 index 000000000000..9660c6fd58a1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/test_job_py3.py @@ -0,0 +1,72 @@ +# 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 msrest.serialization import Model + + +class TestJob(Model): + """Definition of the test job. + + :param creation_time: Gets or sets the creation time of the test job. + :type creation_time: datetime + :param status: Gets or sets the status of the test job. + :type status: str + :param status_details: Gets or sets the status details of the test job. + :type status_details: str + :param run_on: Gets or sets the runOn which specifies the group name where + the job is to be executed. + :type run_on: str + :param start_time: Gets or sets the start time of the test job. + :type start_time: datetime + :param end_time: Gets or sets the end time of the test job. + :type end_time: datetime + :param exception: Gets or sets the exception of the test job. + :type exception: str + :param last_modified_time: Gets or sets the last modified time of the test + job. + :type last_modified_time: datetime + :param last_status_modified_time: Gets or sets the last status modified + time of the test job. + :type last_status_modified_time: datetime + :param parameters: Gets or sets the parameters of the test job. + :type parameters: dict[str, str] + :param log_activity_trace: The activity-level tracing options of the + runbook. + :type log_activity_trace: int + """ + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'run_on': {'key': 'runOn', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'exception': {'key': 'exception', 'type': 'str'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'last_status_modified_time': {'key': 'lastStatusModifiedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'log_activity_trace': {'key': 'logActivityTrace', 'type': 'int'}, + } + + def __init__(self, *, creation_time=None, status: str=None, status_details: str=None, run_on: str=None, start_time=None, end_time=None, exception: str=None, last_modified_time=None, last_status_modified_time=None, parameters=None, log_activity_trace: int=None, **kwargs) -> None: + super(TestJob, self).__init__(**kwargs) + self.creation_time = creation_time + self.status = status + self.status_details = status_details + self.run_on = run_on + self.start_time = start_time + self.end_time = end_time + self.exception = exception + self.last_modified_time = last_modified_time + self.last_status_modified_time = last_status_modified_time + self.parameters = parameters + self.log_activity_trace = log_activity_trace diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource.py b/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource.py new file mode 100644 index 000000000000..924351890e0e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource.py @@ -0,0 +1,50 @@ +# 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 .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource_py3.py new file mode 100644 index 000000000000..3391859fd550 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/tracked_resource_py3.py @@ -0,0 +1,50 @@ +# 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 .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/type_field.py b/azure-mgmt-automation/azure/mgmt/automation/models/type_field.py new file mode 100644 index 000000000000..2c64397d6000 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/type_field.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class TypeField(Model): + """Information about a field of a type. + + :param name: Gets or sets the name of the field. + :type name: str + :param type: Gets or sets the type of the field. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TypeField, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/type_field_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/type_field_paged.py new file mode 100644 index 000000000000..70c9702982e5 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/type_field_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class TypeFieldPaged(Paged): + """ + A paging container for iterating over a list of :class:`TypeField ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TypeField]'} + } + + def __init__(self, *args, **kwargs): + + super(TypeFieldPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/type_field_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/type_field_py3.py new file mode 100644 index 000000000000..d522b7658ebd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/type_field_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class TypeField(Model): + """Information about a field of a type. + + :param name: Gets or sets the name of the field. + :type name: str + :param type: Gets or sets the type of the field. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(TypeField, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py new file mode 100644 index 000000000000..0f8336bba09c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class UpdateConfiguration(Model): + """Update specifc 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: 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] + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemType'}, + '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]'}, + } + + def __init__(self, **kwargs): + super(UpdateConfiguration, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation.py new file mode 100644 index 000000000000..a130e8b5afd0 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class UpdateConfigurationNavigation(Model): + """Software update configuration Run Navigation model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration triggered the + software update configuration run + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateConfigurationNavigation, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation_py3.py new file mode 100644 index 000000000000..6eb6f542f17c --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_navigation_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class UpdateConfigurationNavigation(Model): + """Software update configuration Run Navigation model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the software update configuration triggered the + software update configuration run + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateConfigurationNavigation, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py new file mode 100644 index 000000000000..05c73897ed11 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class UpdateConfiguration(Model): + """Update specifc 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: 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] + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemType'}, + '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]'}, + } + + def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, **kwargs) -> None: + 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 diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/usage.py b/azure-mgmt-automation/azure/mgmt/automation/models/usage.py new file mode 100644 index 000000000000..4d0acc13cf85 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/usage.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class Usage(Model): + """Definition of Usage. + + :param id: Gets or sets the id of the resource. + :type id: str + :param name: Gets or sets the usage counter name. + :type name: ~azure.mgmt.automation.models.UsageCounterName + :param unit: Gets or sets the usage unit name. + :type unit: str + :param current_value: Gets or sets the current usage value. + :type current_value: float + :param limit: Gets or sets max limit. -1 for unlimited + :type limit: long + :param throttle_status: Gets or sets the throttle status. + :type throttle_status: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'UsageCounterName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'throttle_status': {'key': 'throttleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.throttle_status = kwargs.get('throttle_status', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name.py b/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name.py new file mode 100644 index 000000000000..c5a6c69093f9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class UsageCounterName(Model): + """Definition of usage counter name. + + :param value: Gets or sets the usage counter name. + :type value: str + :param localized_value: Gets or sets the localized usage counter name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageCounterName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name_py3.py new file mode 100644 index 000000000000..6fa02857189b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/usage_counter_name_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class UsageCounterName(Model): + """Definition of usage counter name. + + :param value: Gets or sets the usage counter name. + :type value: str + :param localized_value: Gets or sets the localized usage counter name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageCounterName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/usage_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/usage_paged.py new file mode 100644 index 000000000000..72d2f0a2d170 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/usage_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/usage_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/usage_py3.py new file mode 100644 index 000000000000..107f38f6fae3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/usage_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class Usage(Model): + """Definition of Usage. + + :param id: Gets or sets the id of the resource. + :type id: str + :param name: Gets or sets the usage counter name. + :type name: ~azure.mgmt.automation.models.UsageCounterName + :param unit: Gets or sets the usage unit name. + :type unit: str + :param current_value: Gets or sets the current usage value. + :type current_value: float + :param limit: Gets or sets max limit. -1 for unlimited + :type limit: long + :param throttle_status: Gets or sets the throttle status. + :type throttle_status: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'UsageCounterName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'throttle_status': {'key': 'throttleStatus', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name=None, unit: str=None, current_value: float=None, limit: int=None, throttle_status: str=None, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = id + self.name = name + self.unit = unit + self.current_value = current_value + self.limit = limit + self.throttle_status = throttle_status diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable.py new file mode 100644 index 000000000000..bcf7f9816f65 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable.py @@ -0,0 +1,62 @@ +# 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 .proxy_resource import ProxyResource + + +class Variable(ProxyResource): + """Definition of the varible. + + 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 value: Gets or sets the value of the variable. + :type value: str + :param is_encrypted: Gets or sets the encrypted flag of the variable. + :type is_encrypted: bool + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'is_encrypted': {'key': 'properties.isEncrypted', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Variable, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.is_encrypted = kwargs.get('is_encrypted', 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) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters.py new file mode 100644 index 000000000000..c847a873ff1d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class VariableCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update variable operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the variable. + :type name: str + :param value: Gets or sets the value of the variable. + :type value: str + :param description: Gets or sets the description of the variable. + :type description: str + :param is_encrypted: Gets or sets the encrypted flag of the variable. + :type is_encrypted: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_encrypted': {'key': 'properties.isEncrypted', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VariableCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.description = kwargs.get('description', None) + self.is_encrypted = kwargs.get('is_encrypted', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..b9ba8f691aec --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_create_or_update_parameters_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class VariableCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update variable operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the variable. + :type name: str + :param value: Gets or sets the value of the variable. + :type value: str + :param description: Gets or sets the description of the variable. + :type description: str + :param is_encrypted: Gets or sets the encrypted flag of the variable. + :type is_encrypted: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_encrypted': {'key': 'properties.isEncrypted', 'type': 'bool'}, + } + + def __init__(self, *, name: str, value: str=None, description: str=None, is_encrypted: bool=None, **kwargs) -> None: + super(VariableCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.value = value + self.description = description + self.is_encrypted = is_encrypted diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_paged.py new file mode 100644 index 000000000000..8e3f82c98cba --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class VariablePaged(Paged): + """ + A paging container for iterating over a list of :class:`Variable ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Variable]'} + } + + def __init__(self, *args, **kwargs): + + super(VariablePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_py3.py new file mode 100644 index 000000000000..94916b980830 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_py3.py @@ -0,0 +1,62 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Variable(ProxyResource): + """Definition of the varible. + + 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 value: Gets or sets the value of the variable. + :type value: str + :param is_encrypted: Gets or sets the encrypted flag of the variable. + :type is_encrypted: bool + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'is_encrypted': {'key': 'properties.isEncrypted', 'type': 'bool'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, is_encrypted: bool=None, creation_time=None, last_modified_time=None, description: str=None, **kwargs) -> None: + super(Variable, self).__init__(**kwargs) + self.value = value + self.is_encrypted = is_encrypted + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters.py new file mode 100644 index 000000000000..fee6bda9c3f6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class VariableUpdateParameters(Model): + """The parameters supplied to the update variable operation. + + :param name: Gets or sets the name of the variable. + :type name: str + :param value: Gets or sets the value of the variable. + :type value: str + :param description: Gets or sets the description of the variable. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VariableUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters_py3.py new file mode 100644 index 000000000000..0f8ac764918f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/variable_update_parameters_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class VariableUpdateParameters(Model): + """The parameters supplied to the update variable operation. + + :param name: Gets or sets the name of the variable. + :type name: str + :param value: Gets or sets the value of the variable. + :type value: str + :param description: Gets or sets the description of the variable. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, description: str=None, **kwargs) -> None: + super(VariableUpdateParameters, self).__init__(**kwargs) + self.name = name + self.value = value + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/watcher.py b/azure-mgmt-automation/azure/mgmt/automation/models/watcher.py new file mode 100644 index 000000000000..62254105499e --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/watcher.py @@ -0,0 +1,95 @@ +# 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 .tracked_resource import TrackedResource + + +class Watcher(TrackedResource): + """Definition of the watcher type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param execution_frequency_in_seconds: Gets or sets the frequency at which + the watcher is invoked. + :type execution_frequency_in_seconds: long + :param script_name: Gets or sets the name of the script the watcher is + attached to, i.e. the name of an existing runbook. + :type script_name: str + :param script_parameters: Gets or sets the parameters of the script. + :type script_parameters: dict[str, str] + :param script_run_on: Gets or sets the name of the hybrid worker group the + watcher will run on. + :type script_run_on: str + :ivar status: Gets the current status of the watcher. + :vartype status: str + :ivar creation_time: Gets or sets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets or sets the last modified time. + :vartype last_modified_time: datetime + :ivar last_modified_by: Details of the user who last modified the watcher. + :vartype last_modified_by: str + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', '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}'}, + 'script_run_on': {'key': 'properties.scriptRunOn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Watcher, self).__init__(**kwargs) + 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) + self.script_run_on = kwargs.get('script_run_on', None) + self.status = None + self.creation_time = None + self.last_modified_time = None + self.last_modified_by = None + self.description = kwargs.get('description', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/watcher_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_paged.py new file mode 100644 index 000000000000..0006d246f358 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class WatcherPaged(Paged): + """ + A paging container for iterating over a list of :class:`Watcher ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Watcher]'} + } + + def __init__(self, *args, **kwargs): + + super(WatcherPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/watcher_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_py3.py new file mode 100644 index 000000000000..5be214f247bf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_py3.py @@ -0,0 +1,95 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Watcher(TrackedResource): + """Definition of the watcher type. + + 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param execution_frequency_in_seconds: Gets or sets the frequency at which + the watcher is invoked. + :type execution_frequency_in_seconds: long + :param script_name: Gets or sets the name of the script the watcher is + attached to, i.e. the name of an existing runbook. + :type script_name: str + :param script_parameters: Gets or sets the parameters of the script. + :type script_parameters: dict[str, str] + :param script_run_on: Gets or sets the name of the hybrid worker group the + watcher will run on. + :type script_run_on: str + :ivar status: Gets the current status of the watcher. + :vartype status: str + :ivar creation_time: Gets or sets the creation time. + :vartype creation_time: datetime + :ivar last_modified_time: Gets or sets the last modified time. + :vartype last_modified_time: datetime + :ivar last_modified_by: Details of the user who last modified the watcher. + :vartype last_modified_by: str + :param description: Gets or sets the description. + :type description: str + :param etag: Gets or sets the etag of the resource. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', '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}'}, + 'script_run_on': {'key': 'properties.scriptRunOn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, execution_frequency_in_seconds: int=None, script_name: str=None, script_parameters=None, script_run_on: str=None, description: str=None, etag: str=None, **kwargs) -> None: + super(Watcher, self).__init__(tags=tags, location=location, **kwargs) + self.execution_frequency_in_seconds = execution_frequency_in_seconds + self.script_name = script_name + self.script_parameters = script_parameters + self.script_run_on = script_run_on + self.status = None + self.creation_time = None + self.last_modified_time = None + self.last_modified_by = None + self.description = description + self.etag = etag diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters.py new file mode 100644 index 000000000000..e75490e5ffe8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class WatcherUpdateParameters(Model): + """WatcherUpdateParameters. + + :param execution_frequency_in_seconds: Gets or sets the frequency at which + the watcher is invoked. + :type execution_frequency_in_seconds: long + :param name: Gets or sets the name of the resource. + :type name: str + """ + + _attribute_map = { + 'execution_frequency_in_seconds': {'key': 'properties.executionFrequencyInSeconds', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WatcherUpdateParameters, self).__init__(**kwargs) + self.execution_frequency_in_seconds = kwargs.get('execution_frequency_in_seconds', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters_py3.py new file mode 100644 index 000000000000..c4119df01aa9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/watcher_update_parameters_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class WatcherUpdateParameters(Model): + """WatcherUpdateParameters. + + :param execution_frequency_in_seconds: Gets or sets the frequency at which + the watcher is invoked. + :type execution_frequency_in_seconds: long + :param name: Gets or sets the name of the resource. + :type name: str + """ + + _attribute_map = { + 'execution_frequency_in_seconds': {'key': 'properties.executionFrequencyInSeconds', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, execution_frequency_in_seconds: int=None, name: str=None, **kwargs) -> None: + super(WatcherUpdateParameters, self).__init__(**kwargs) + self.execution_frequency_in_seconds = execution_frequency_in_seconds + self.name = name diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook.py new file mode 100644 index 000000000000..47a06ef47821 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook.py @@ -0,0 +1,89 @@ +# 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 .proxy_resource import ProxyResource + + +class Webhook(ProxyResource): + """Definition of the webhook type. + + 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 is_enabled: Gets or sets the value of the enabled flag of the + webhook. Default value: False . + :type is_enabled: bool + :param uri: Gets or sets the webhook uri. + :type uri: str + :param expiry_time: Gets or sets the expiry time. + :type expiry_time: datetime + :param last_invoked_time: Gets or sets the last invoked time. + :type last_invoked_time: datetime + :param parameters: Gets or sets the parameters of the job that is created + when the webhook calls the runbook it is associated with. + :type parameters: dict[str, str] + :param runbook: Gets or sets the runbook the webhook is associated with. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param last_modified_by: Details of the user who last modified the Webhook + :type last_modified_by: str + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'last_invoked_time': {'key': 'properties.lastInvokedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Webhook, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', False) + self.uri = kwargs.get('uri', None) + self.expiry_time = kwargs.get('expiry_time', None) + self.last_invoked_time = kwargs.get('last_invoked_time', None) + self.parameters = kwargs.get('parameters', None) + self.runbook = kwargs.get('runbook', None) + self.run_on = kwargs.get('run_on', None) + self.creation_time = kwargs.get('creation_time', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters.py new file mode 100644 index 000000000000..bf3aa1d7875a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class WebhookCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update webhook operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the webhook. + :type name: str + :param is_enabled: Gets or sets the value of the enabled flag of webhook. + :type is_enabled: bool + :param uri: Gets or sets the uri. + :type uri: str + :param expiry_time: Gets or sets the expiry time. + :type expiry_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebhookCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.uri = kwargs.get('uri', None) + self.expiry_time = kwargs.get('expiry_time', None) + self.parameters = kwargs.get('parameters', None) + self.runbook = kwargs.get('runbook', None) + self.run_on = kwargs.get('run_on', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..7396bfb36a8f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_create_or_update_parameters_py3.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class WebhookCreateOrUpdateParameters(Model): + """The parameters supplied to the create or update webhook operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the name of the webhook. + :type name: str + :param is_enabled: Gets or sets the value of the enabled flag of webhook. + :type is_enabled: bool + :param uri: Gets or sets the uri. + :type uri: str + :param expiry_time: Gets or sets the expiry time. + :type expiry_time: datetime + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param runbook: Gets or sets the runbook. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + } + + def __init__(self, *, name: str, is_enabled: bool=None, uri: str=None, expiry_time=None, parameters=None, runbook=None, run_on: str=None, **kwargs) -> None: + super(WebhookCreateOrUpdateParameters, self).__init__(**kwargs) + self.name = name + self.is_enabled = is_enabled + self.uri = uri + self.expiry_time = expiry_time + self.parameters = parameters + self.runbook = runbook + self.run_on = run_on diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_paged.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_paged.py new file mode 100644 index 000000000000..40429a9dd160 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class WebhookPaged(Paged): + """ + A paging container for iterating over a list of :class:`Webhook ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Webhook]'} + } + + def __init__(self, *args, **kwargs): + + super(WebhookPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_py3.py new file mode 100644 index 000000000000..7688899ed357 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_py3.py @@ -0,0 +1,89 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Webhook(ProxyResource): + """Definition of the webhook type. + + 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 is_enabled: Gets or sets the value of the enabled flag of the + webhook. Default value: False . + :type is_enabled: bool + :param uri: Gets or sets the webhook uri. + :type uri: str + :param expiry_time: Gets or sets the expiry time. + :type expiry_time: datetime + :param last_invoked_time: Gets or sets the last invoked time. + :type last_invoked_time: datetime + :param parameters: Gets or sets the parameters of the job that is created + when the webhook calls the runbook it is associated with. + :type parameters: dict[str, str] + :param runbook: Gets or sets the runbook the webhook is associated with. + :type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + :param creation_time: Gets or sets the creation time. + :type creation_time: datetime + :param last_modified_time: Gets or sets the last modified time. + :type last_modified_time: datetime + :param last_modified_by: Details of the user who last modified the Webhook + :type last_modified_by: str + :param description: Gets or sets the description. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'last_invoked_time': {'key': 'properties.lastInvokedTime', 'type': 'iso-8601'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, is_enabled: bool=False, uri: str=None, expiry_time=None, last_invoked_time=None, parameters=None, runbook=None, run_on: str=None, creation_time=None, last_modified_time=None, last_modified_by: str=None, description: str=None, **kwargs) -> None: + super(Webhook, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.uri = uri + self.expiry_time = expiry_time + self.last_invoked_time = last_invoked_time + self.parameters = parameters + self.runbook = runbook + self.run_on = run_on + self.creation_time = creation_time + self.last_modified_time = last_modified_time + self.last_modified_by = last_modified_by + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters.py new file mode 100644 index 000000000000..aaf3100b5caf --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class WebhookUpdateParameters(Model): + """The parameters supplied to the update webhook operation. + + :param name: Gets or sets the name of the webhook. + :type name: str + :param is_enabled: Gets or sets the value of the enabled flag of webhook. + :type is_enabled: bool + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param description: Gets or sets the description of the webhook. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.run_on = kwargs.get('run_on', None) + self.parameters = kwargs.get('parameters', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters_py3.py new file mode 100644 index 000000000000..0d1514b01349 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/webhook_update_parameters_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class WebhookUpdateParameters(Model): + """The parameters supplied to the update webhook operation. + + :param name: Gets or sets the name of the webhook. + :type name: str + :param is_enabled: Gets or sets the value of the enabled flag of webhook. + :type is_enabled: bool + :param run_on: Gets or sets the name of the hybrid worker group the + webhook job will run on. + :type run_on: str + :param parameters: Gets or sets the parameters of the job. + :type parameters: dict[str, str] + :param description: Gets or sets the description of the webhook. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'run_on': {'key': 'properties.runOn', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, is_enabled: bool=None, run_on: str=None, parameters=None, description: str=None, **kwargs) -> None: + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.name = name + self.is_enabled = is_enabled + self.run_on = run_on + self.parameters = parameters + self.description = description diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties.py new file mode 100644 index 000000000000..ce33cdbf74d1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class WindowsProperties(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/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties_py3.py new file mode 100644 index 000000000000..fdbaa16ef64d --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/windows_properties_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class WindowsProperties(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=None, excluded_kb_numbers=None, included_kb_numbers=None, reboot_setting: str=None, **kwargs) -> None: + 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/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py b/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py new file mode 100644 index 000000000000..89b6b666b52b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py @@ -0,0 +1,94 @@ +# 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 .automation_account_operations import AutomationAccountOperations +from .operations import Operations +from .statistics_operations import StatisticsOperations +from .usages_operations import UsagesOperations +from .keys_operations import KeysOperations +from .certificate_operations import CertificateOperations +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 +from .activity_operations import ActivityOperations +from .module_operations import ModuleOperations +from .object_data_types_operations import ObjectDataTypesOperations +from .fields_operations import FieldsOperations +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 .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 .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 + +__all__ = [ + 'AutomationAccountOperations', + 'Operations', + 'StatisticsOperations', + 'UsagesOperations', + 'KeysOperations', + 'CertificateOperations', + 'ConnectionOperations', + 'ConnectionTypeOperations', + 'CredentialOperations', + 'DscConfigurationOperations', + 'HybridRunbookWorkerGroupOperations', + 'JobScheduleOperations', + 'LinkedWorkspaceOperations', + 'ActivityOperations', + 'ModuleOperations', + 'ObjectDataTypesOperations', + 'FieldsOperations', + 'RunbookDraftOperations', + 'RunbookOperations', + 'TestJobStreamsOperations', + 'TestJobOperations', + 'ScheduleOperations', + 'VariableOperations', + 'WebhookOperations', + 'WatcherOperations', + 'SoftwareUpdateConfigurationsOperations', + 'SoftwareUpdateConfigurationRunsOperations', + 'SoftwareUpdateConfigurationMachineRunsOperations', + 'SourceControlOperations', + 'SourceControlSyncJobOperations', + 'SourceControlSyncJobStreamsOperations', + 'JobOperations', + 'JobStreamOperations', + 'AgentRegistrationInformationOperations', + 'DscNodeOperations', + 'NodeReportsOperations', + 'DscCompilationJobOperations', + 'DscCompilationJobStreamOperations', + 'DscNodeConfigurationOperations', + 'NodeCountInformationOperations', +] diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/activity_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/activity_operations.py new file mode 100644 index 000000000000..c31d50d36191 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/activity_operations.py @@ -0,0 +1,177 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ActivityOperations(object): + """ActivityOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, module_name, activity_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the activity in the module identified by module name and + activity 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 module_name: The name of module. + :type module_name: str + :param activity_name: The name of activity. + :type activity_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Activity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Activity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'activityName': self._serialize.url("activity_name", activity_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Activity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities/{activityName}'} + + def list_by_module( + self, resource_group_name, automation_account_name, module_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of activities in the module identified by module 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 module_name: The name of module. + :type module_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Activity + :rtype: + ~azure.mgmt.automation.models.ActivityPaged[~azure.mgmt.automation.models.Activity] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_module.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ActivityPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/agent_registration_information_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/agent_registration_information_operations.py new file mode 100644 index 000000000000..6b8264580ffd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/agent_registration_information_operations.py @@ -0,0 +1,169 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AgentRegistrationInformationOperations(object): + """AgentRegistrationInformationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the automation agent registration information. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AgentRegistration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.AgentRegistration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AgentRegistration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation'} + + def regenerate_key( + self, resource_group_name, automation_account_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerate a primary or secondary agent registration key. + + :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 key_name: Gets or sets the agent registration key name - + primary or secondary. Possible values include: 'primary', 'secondary' + :type key_name: str or + ~azure.mgmt.automation.models.AgentRegistrationKeyName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AgentRegistration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.AgentRegistration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.AgentRegistrationRegenerateKeyParameter(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AgentRegistrationRegenerateKeyParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AgentRegistration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/automation_account_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/automation_account_operations.py new file mode 100644 index 000000000000..972e63206f53 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/automation_account_operations.py @@ -0,0 +1,421 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AutomationAccountOperations(object): + """AutomationAccountOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def update( + self, resource_group_name, automation_account_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an 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 + :param parameters: Parameters supplied to the update automation + account. + :type parameters: + ~azure.mgmt.automation.models.AutomationAccountUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AutomationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.AutomationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AutomationAccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AutomationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update 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 + :param parameters: Parameters supplied to the create or update + automation account. + :type parameters: + ~azure.mgmt.automation.models.AutomationAccountCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AutomationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.AutomationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AutomationAccountCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AutomationAccount', response) + if response.status_code == 201: + deserialized = self._deserialize('AutomationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}'} + + def delete( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Delete an 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}'} + + def get( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Get information about an 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AutomationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.AutomationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AutomationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of accounts within a given resource group. + + :param resource_group_name: Name of an Azure Resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AutomationAccount + :rtype: + ~azure.mgmt.automation.models.AutomationAccountPaged[~azure.mgmt.automation.models.AutomationAccount] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AutomationAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AutomationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the Automation Accounts within an Azure subscription. + + Retrieve a list of accounts within a given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AutomationAccount + :rtype: + ~azure.mgmt.automation.models.AutomationAccountPaged[~azure.mgmt.automation.models.AutomationAccount] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AutomationAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AutomationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/certificate_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/certificate_operations.py new file mode 100644 index 000000000000..c9e7729893d9 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/certificate_operations.py @@ -0,0 +1,375 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateOperations(object): + """CertificateOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Delete the certificate. + + :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 certificate_name: The name of certificate. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'} + + def get( + self, resource_group_name, automation_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the certificate identified by certificate 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 certificate_name: The name of certificate. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, certificate_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a certificate. + + :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 certificate_name: The parameters supplied to the create or + update certificate operation. + :type certificate_name: str + :param parameters: The parameters supplied to the create or update + certificate operation. + :type parameters: + ~azure.mgmt.automation.models.CertificateCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + if response.status_code == 201: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'} + + def update( + self, resource_group_name, automation_account_name, certificate_name, name=None, description=None, custom_headers=None, raw=False, **operation_config): + """Update a certificate. + + :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 certificate_name: The parameters supplied to the update + certificate operation. + :type certificate_name: str + :param name: Gets or sets the name of the certificate. + :type name: str + :param description: Gets or sets the description of the certificate. + :type description: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.CertificateUpdateParameters(name=name, description=description) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of certificates. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.automation.models.CertificatePaged[~azure.mgmt.automation.models.Certificate] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/connection_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/connection_operations.py new file mode 100644 index 000000000000..74a17d353f21 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/connection_operations.py @@ -0,0 +1,382 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ConnectionOperations(object): + """ConnectionOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Delete the 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 connection_name: The name of connection. + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Connection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Connection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Connection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} + + def get( + self, resource_group_name, automation_account_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the connection identified by connection 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 connection_name: The name of connection. + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Connection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Connection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Connection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a 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 connection_name: The parameters supplied to the create or + update connection operation. + :type connection_name: str + :param parameters: The parameters supplied to the create or update + connection operation. + :type parameters: + ~azure.mgmt.automation.models.ConnectionCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Connection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Connection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConnectionCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Connection', response) + if response.status_code == 201: + deserialized = self._deserialize('Connection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} + + def update( + self, resource_group_name, automation_account_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update a 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 connection_name: The parameters supplied to the update a + connection operation. + :type connection_name: str + :param parameters: The parameters supplied to the update a connection + operation. + :type parameters: + ~azure.mgmt.automation.models.ConnectionUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Connection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Connection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConnectionUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Connection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of connections. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Connection + :rtype: + ~azure.mgmt.automation.models.ConnectionPaged[~azure.mgmt.automation.models.Connection] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ConnectionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/connection_type_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/connection_type_operations.py new file mode 100644 index 000000000000..cfce0f2f08ab --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/connection_type_operations.py @@ -0,0 +1,300 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ConnectionTypeOperations(object): + """ConnectionTypeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, connection_type_name, custom_headers=None, raw=False, **operation_config): + """Delete the connectiontype. + + :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 connection_type_name: The name of connectiontype. + :type connection_type_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'connectionTypeName': self._serialize.url("connection_type_name", connection_type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'} + + def get( + self, resource_group_name, automation_account_name, connection_type_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the connectiontype identified by connectiontype 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 connection_type_name: The name of connectiontype. + :type connection_type_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionType or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.ConnectionType or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'connectionTypeName': self._serialize.url("connection_type_name", connection_type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionType', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a connectiontype. + + :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 connection_type_name: The parameters supplied to the create or + update connectiontype operation. + :type connection_type_name: str + :param parameters: The parameters supplied to the create or update + connectiontype operation. + :type parameters: + ~azure.mgmt.automation.models.ConnectionTypeCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionType or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.ConnectionType or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'connectionTypeName': self._serialize.url("connection_type_name", connection_type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConnectionTypeCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionType', response) + if response.status_code == 409: + deserialized = self._deserialize('ConnectionType', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of connectiontypes. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ConnectionType + :rtype: + ~azure.mgmt.automation.models.ConnectionTypePaged[~azure.mgmt.automation.models.ConnectionType] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ConnectionTypePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectionTypePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/credential_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/credential_operations.py new file mode 100644 index 000000000000..0110ff683dd3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/credential_operations.py @@ -0,0 +1,375 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CredentialOperations(object): + """CredentialOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Delete the credential. + + :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 credential_name: The name of credential. + :type credential_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'} + + def get( + self, resource_group_name, automation_account_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the credential identified by credential 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 credential_name: The name of credential. + :type credential_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Credential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Credential or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Credential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, credential_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a credential. + + :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 credential_name: The parameters supplied to the create or + update credential operation. + :type credential_name: str + :param parameters: The parameters supplied to the create or update + credential operation. + :type parameters: + ~azure.mgmt.automation.models.CredentialCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Credential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Credential or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CredentialCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Credential', response) + if response.status_code == 201: + deserialized = self._deserialize('Credential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'} + + def update( + self, resource_group_name, automation_account_name, credential_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update a credential. + + :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 credential_name: The parameters supplied to the Update + credential operation. + :type credential_name: str + :param parameters: The parameters supplied to the Update credential + operation. + :type parameters: + ~azure.mgmt.automation.models.CredentialUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Credential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Credential or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'credentialName': self._serialize.url("credential_name", credential_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CredentialUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Credential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of credentials. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Credential + :rtype: + ~azure.mgmt.automation.models.CredentialPaged[~azure.mgmt.automation.models.Credential] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.CredentialPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_operations.py new file mode 100644 index 000000000000..77900f838e59 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_operations.py @@ -0,0 +1,348 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DscCompilationJobOperations(object): + """DscCompilationJobOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + + def _create_initial( + self, resource_group_name, automation_account_name, compilation_job_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + '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'), + 'compilationJobName': self._serialize.url("compilation_job_name", compilation_job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DscCompilationJobCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('DscCompilationJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, automation_account_name, compilation_job_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates the Dsc compilation job of the 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 compilation_job_name: The the DSC configuration Id. + :type compilation_job_name: str + :param parameters: The parameters supplied to the create compilation + job operation. + :type parameters: + ~azure.mgmt.automation.models.DscCompilationJobCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DscCompilationJob or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.automation.models.DscCompilationJob] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.automation.models.DscCompilationJob]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + compilation_job_name=compilation_job_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DscCompilationJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName}'} + + def get( + self, resource_group_name, automation_account_name, compilation_job_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the Dsc configuration compilation job identified by job id. + + :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 compilation_job_name: The the DSC configuration Id. + :type compilation_job_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscCompilationJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscCompilationJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'compilationJobName': self._serialize.url("compilation_job_name", compilation_job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscCompilationJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of dsc compilation jobs. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DscCompilationJob + :rtype: + ~azure.mgmt.automation.models.DscCompilationJobPaged[~azure.mgmt.automation.models.DscCompilationJob] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DscCompilationJobPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DscCompilationJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs'} + + def get_stream( + self, resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the job stream identified by job stream id. + + :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 job_id: The job id. + :type job_id: str + :param job_stream_id: The job stream id. + :type job_stream_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStream or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobStream or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_stream.metadata['url'] + path_format_arguments = { + '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'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + 'jobStreamId': self._serialize.url("job_stream_id", job_stream_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStream', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_stream.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_stream_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_stream_operations.py new file mode 100644 index 000000000000..1389c6550bc1 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_compilation_job_stream_operations.py @@ -0,0 +1,101 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DscCompilationJobStreamOperations(object): + """DscCompilationJobStreamOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def list_by_job( + self, resource_group_name, automation_account_name, job_id, custom_headers=None, raw=False, **operation_config): + """Retrieve all the job streams for the compilation Job. + + :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 job_id: The job id. + :type job_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStreamListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobStreamListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + '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'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStreamListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_configuration_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_configuration_operations.py new file mode 100644 index 000000000000..5eb207496bdd --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_configuration_operations.py @@ -0,0 +1,453 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DscConfigurationOperations(object): + """DscConfigurationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """Delete the dsc configuration identified by configuration 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 configuration_name: The configuration name. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'} + + def get( + self, resource_group_name, automation_account_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the configuration identified by configuration 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 configuration_name: The configuration name. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, configuration_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create the configuration identified by configuration 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 configuration_name: The create or update parameters for + configuration. + :type configuration_name: str + :param parameters: The create or update parameters for configuration. + :type parameters: + ~azure.mgmt.automation.models.DscConfigurationCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DscConfigurationCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('DscConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'} + + def update( + self, resource_group_name, automation_account_name, configuration_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """Create the configuration identified by configuration 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 configuration_name: The create or update parameters for + configuration. + :type configuration_name: str + :param parameters: The create or update parameters for configuration. + :type parameters: + ~azure.mgmt.automation.models.DscConfigurationUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'DscConfigurationUpdateParameters') + else: + body_content = None + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'} + + def get_content( + self, resource_group_name, automation_account_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the configuration script identified by configuration 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 configuration_name: The configuration name. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_content.metadata['url'] + path_format_arguments = { + '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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, skip=None, top=None, inlinecount=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of configurations. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param skip: The number of rows to skip. + :type skip: int + :param top: The the number of rows to take. + :type top: int + :param inlinecount: Return total rows. + :type inlinecount: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DscConfiguration + :rtype: + ~azure.mgmt.automation.models.DscConfigurationPaged[~azure.mgmt.automation.models.DscConfiguration] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if inlinecount is not None: + query_parameters['$inlinecount'] = self._serialize.query("inlinecount", inlinecount, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DscConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DscConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_configuration_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_configuration_operations.py new file mode 100644 index 000000000000..e6219785a15b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_configuration_operations.py @@ -0,0 +1,347 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DscNodeConfigurationOperations(object): + """DscNodeConfigurationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, node_configuration_name, custom_headers=None, raw=False, **operation_config): + """Delete the Dsc node configurations by node 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 node_configuration_name: The Dsc node configuration name. + :type node_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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'), + 'nodeConfigurationName': self._serialize.url("node_configuration_name", node_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'} + + def get( + self, resource_group_name, automation_account_name, node_configuration_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the Dsc node configurations by node 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 node_configuration_name: The Dsc node configuration name. + :type node_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscNodeConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscNodeConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'nodeConfigurationName': self._serialize.url("node_configuration_name", node_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscNodeConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'} + + + def _create_or_update_initial( + self, resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'nodeConfigurationName': self._serialize.url("node_configuration_name", node_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DscNodeConfigurationCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('DscNodeConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create the node configuration identified by node configuration 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 node_configuration_name: The Dsc node configuration name. + :type node_configuration_name: str + :param parameters: The create or update parameters for configuration. + :type parameters: + ~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DscNodeConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.automation.models.DscNodeConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.automation.models.DscNodeConfiguration]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + node_configuration_name=node_configuration_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DscNodeConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, skip=None, top=None, inlinecount=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of dsc node configurations. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param skip: The number of rows to skip. + :type skip: int + :param top: The the number of rows to take. + :type top: int + :param inlinecount: Return total rows. + :type inlinecount: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DscNodeConfiguration + :rtype: + ~azure.mgmt.automation.models.DscNodeConfigurationPaged[~azure.mgmt.automation.models.DscNodeConfiguration] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if inlinecount is not None: + query_parameters['$inlinecount'] = self._serialize.query("inlinecount", inlinecount, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DscNodeConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DscNodeConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_operations.py new file mode 100644 index 000000000000..e1272b2be984 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/dsc_node_operations.py @@ -0,0 +1,325 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DscNodeOperations(object): + """DscNodeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, node_id, custom_headers=None, raw=False, **operation_config): + """Delete the dsc node identified by node id. + + :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 node_id: The node id. + :type node_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscNode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscNode or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscNode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'} + + def get( + self, resource_group_name, automation_account_name, node_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the dsc node identified by node id. + + :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 node_id: The node id. + :type node_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscNode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscNode or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscNode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'} + + def update( + self, resource_group_name, automation_account_name, node_id, node_id1=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Update the dsc node. + + :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 node_id: Parameters supplied to the update dsc node. + :type node_id: str + :param node_id1: Gets or sets the id of the dsc node. + :type node_id1: str + :param properties: + :type properties: + ~azure.mgmt.automation.models.DscNodeUpdateParametersProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscNode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscNode or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + dsc_node_update_parameters = models.DscNodeUpdateParameters(node_id=node_id1, properties=properties) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(dsc_node_update_parameters, 'DscNodeUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscNode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, skip=None, top=None, inlinecount=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of dsc nodes. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param skip: The number of rows to skip. + :type skip: int + :param top: The the number of rows to take. + :type top: int + :param inlinecount: Return total rows. + :type inlinecount: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DscNode + :rtype: + ~azure.mgmt.automation.models.DscNodePaged[~azure.mgmt.automation.models.DscNode] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if inlinecount is not None: + query_parameters['$inlinecount'] = self._serialize.query("inlinecount", inlinecount, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DscNodePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DscNodePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/fields_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/fields_operations.py new file mode 100644 index 000000000000..fc4107d04602 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/fields_operations.py @@ -0,0 +1,112 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class FieldsOperations(object): + """FieldsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list_by_type( + self, resource_group_name, automation_account_name, module_name, type_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of fields of a given type identified by module 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 module_name: The name of module. + :type module_name: str + :param type_name: The name of type. + :type type_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TypeField + :rtype: + ~azure.mgmt.automation.models.TypeFieldPaged[~azure.mgmt.automation.models.TypeField] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_type.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'typeName': self._serialize.url("type_name", type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/hybrid_runbook_worker_group_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/hybrid_runbook_worker_group_operations.py new file mode 100644 index 000000000000..fc91151c0d67 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/hybrid_runbook_worker_group_operations.py @@ -0,0 +1,305 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class HybridRunbookWorkerGroupOperations(object): + """HybridRunbookWorkerGroupOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a hybrid runbook worker group. + + :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 hybrid_runbook_worker_group_name: The hybrid runbook worker + group name + :type hybrid_runbook_worker_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'hybridRunbookWorkerGroupName': self._serialize.url("hybrid_runbook_worker_group_name", hybrid_runbook_worker_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'} + + def get( + self, resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a hybrid runbook worker group. + + :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 hybrid_runbook_worker_group_name: The hybrid runbook worker + group name + :type hybrid_runbook_worker_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridRunbookWorkerGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'hybridRunbookWorkerGroupName': self._serialize.url("hybrid_runbook_worker_group_name", hybrid_runbook_worker_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HybridRunbookWorkerGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'} + + def update( + self, resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, credential=None, custom_headers=None, raw=False, **operation_config): + """Update a hybrid runbook worker group. + + :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 hybrid_runbook_worker_group_name: The hybrid runbook worker + group name + :type hybrid_runbook_worker_group_name: str + :param credential: Sets the credential of a worker group. + :type credential: + ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridRunbookWorkerGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.HybridRunbookWorkerGroupUpdateParameters(credential=credential) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'hybridRunbookWorkerGroupName': self._serialize.url("hybrid_runbook_worker_group_name", hybrid_runbook_worker_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'HybridRunbookWorkerGroupUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HybridRunbookWorkerGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of hybrid runbook worker groups. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridRunbookWorkerGroup + :rtype: + ~azure.mgmt.automation.models.HybridRunbookWorkerGroupPaged[~azure.mgmt.automation.models.HybridRunbookWorkerGroup] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.HybridRunbookWorkerGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.HybridRunbookWorkerGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/job_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/job_operations.py new file mode 100644 index 000000000000..74f4c6b3d880 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/job_operations.py @@ -0,0 +1,580 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobOperations(object): + """JobOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def get_output( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Retrieve the job output identified by job 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 job_name: The name of the job to be created. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_output.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'text/plain' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_output.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output'} + + def get_runbook_content( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Retrieve the runbook content of the job identified by job 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 job_name: The job name. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_runbook_content.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_runbook_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent'} + + def suspend( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Suspend the job identified by job 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 job_name: The job name. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.suspend.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend'} + + def stop( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Stop the job identified by jobName. + + :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 job_name: The job name. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + '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'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop'} + + def get( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Retrieve the job identified by job 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 job_name: The job name. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'} + + def create( + self, resource_group_name, automation_account_name, job_name, parameters, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Create a job of the runbook. + + :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 job_name: The job name. + :type job_name: str + :param parameters: The parameters supplied to the create job + operation. + :type parameters: ~azure.mgmt.automation.models.JobCreateParameters + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of jobs. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobCollectionItem + :rtype: + ~azure.mgmt.automation.models.JobCollectionItemPaged[~azure.mgmt.automation.models.JobCollectionItem] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.JobCollectionItemPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobCollectionItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs'} + + def resume( + self, resource_group_name, automation_account_name, job_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Resume the job identified by jobName. + + :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 job_name: The job name. + :type job_name: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + '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'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/job_schedule_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/job_schedule_operations.py new file mode 100644 index 000000000000..0cdcf92b9d82 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/job_schedule_operations.py @@ -0,0 +1,301 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class JobScheduleOperations(object): + """JobScheduleOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, job_schedule_id, custom_headers=None, raw=False, **operation_config): + """Delete the job schedule identified by job schedule 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 job_schedule_id: The job schedule name. + :type job_schedule_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'jobScheduleId': self._serialize.url("job_schedule_id", job_schedule_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'} + + def get( + self, resource_group_name, automation_account_name, job_schedule_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the job schedule identified by job schedule 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 job_schedule_id: The job schedule name. + :type job_schedule_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'jobScheduleId': self._serialize.url("job_schedule_id", job_schedule_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'} + + def create( + self, resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers=None, raw=False, **operation_config): + """Create a job schedule. + + :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 job_schedule_id: The job schedule name. + :type job_schedule_id: str + :param parameters: The parameters supplied to the create job schedule + operation. + :type parameters: + ~azure.mgmt.automation.models.JobScheduleCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + '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'), + 'jobScheduleId': self._serialize.url("job_schedule_id", job_schedule_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'JobScheduleCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('JobSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of job schedules. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobSchedule + :rtype: + ~azure.mgmt.automation.models.JobSchedulePaged[~azure.mgmt.automation.models.JobSchedule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.JobSchedulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/job_stream_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/job_stream_operations.py new file mode 100644 index 000000000000..edf10e8d91ee --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/job_stream_operations.py @@ -0,0 +1,188 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class JobStreamOperations(object): + """JobStreamOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, job_name, job_stream_id, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Retrieve the job stream identified by job stream id. + + :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 job_name: The job name. + :type job_name: str + :param job_stream_id: The job stream id. + :type job_stream_id: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStream or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobStream or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobStreamId': self._serialize.url("job_stream_id", job_stream_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStream', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}'} + + def list_by_job( + self, resource_group_name, automation_account_name, job_name, filter=None, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of jobs streams identified by job 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 job_name: The job name. + :type job_name: str + :param filter: The filter to apply on the operation. + :type filter: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobStream + :rtype: + ~azure.mgmt.automation.models.JobStreamPaged[~azure.mgmt.automation.models.JobStream] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + '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'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.JobStreamPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStreamPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/keys_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/keys_operations.py new file mode 100644 index 000000000000..d3061c5c090f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/keys_operations.py @@ -0,0 +1,98 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class KeysOperations(object): + """KeysOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the automation keys for an 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.KeyListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('KeyListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listKeys'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/linked_workspace_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/linked_workspace_operations.py new file mode 100644 index 000000000000..b6675c38175a --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/linked_workspace_operations.py @@ -0,0 +1,98 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LinkedWorkspaceOperations(object): + """LinkedWorkspaceOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the linked workspace for the account id. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LinkedWorkspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.LinkedWorkspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LinkedWorkspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/linkedWorkspace'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/module_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/module_operations.py new file mode 100644 index 000000000000..96659104c6a4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/module_operations.py @@ -0,0 +1,368 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ModuleOperations(object): + """ModuleOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def delete( + self, resource_group_name, automation_account_name, module_name, custom_headers=None, raw=False, **operation_config): + """Delete the module 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 module_name: The module name. + :type module_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'} + + def get( + self, resource_group_name, automation_account_name, module_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the module identified by module 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 module_name: The module name. + :type module_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Module or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Module or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Module', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, module_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or Update the module identified by module 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 module_name: The name of module. + :type module_name: str + :param parameters: The create or update parameters for module. + :type parameters: + ~azure.mgmt.automation.models.ModuleCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Module or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Module or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ModuleCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Module', response) + if response.status_code == 201: + deserialized = self._deserialize('Module', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'} + + def update( + self, resource_group_name, automation_account_name, module_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update the module identified by module 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 module_name: The name of module. + :type module_name: str + :param parameters: The update parameters for module. + :type parameters: ~azure.mgmt.automation.models.ModuleUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Module or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Module or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ModuleUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Module', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of modules. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Module + :rtype: + ~azure.mgmt.automation.models.ModulePaged[~azure.mgmt.automation.models.Module] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ModulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ModulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/node_count_information_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/node_count_information_operations.py new file mode 100644 index 000000000000..158d30f8b3e8 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/node_count_information_operations.py @@ -0,0 +1,99 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NodeCountInformationOperations(object): + """NodeCountInformationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve counts for Dsc Nodes. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeCounts or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.NodeCounts or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'countType': self._serialize.url("self.config.count_type", self.config.count_type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NodeCounts', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType}'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/node_reports_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/node_reports_operations.py new file mode 100644 index 000000000000..06c9057ef1db --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/node_reports_operations.py @@ -0,0 +1,246 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NodeReportsOperations(object): + """NodeReportsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-01-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-15" + + self.config = config + + def list_by_node( + self, resource_group_name, automation_account_name, node_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve the Dsc node report list by node id. + + :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 node_id: The parameters supplied to the list operation. + :type node_id: str + :param filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DscNodeReport + :rtype: + ~azure.mgmt.automation.models.DscNodeReportPaged[~azure.mgmt.automation.models.DscNodeReport] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_node.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DscNodeReportPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DscNodeReportPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_node.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports'} + + def get( + self, resource_group_name, automation_account_name, node_id, report_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the Dsc node report data by node id and report id. + + :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 node_id: The Dsc node id. + :type node_id: str + :param report_id: The report id. + :type report_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DscNodeReport or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.DscNodeReport or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'reportId': self._serialize.url("report_id", report_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DscNodeReport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}'} + + def get_content( + self, resource_group_name, automation_account_name, node_id, report_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the Dsc node reports by node id and report id. + + :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 node_id: The Dsc node id. + :type node_id: str + :param report_id: The report id. + :type report_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_content.metadata['url'] + path_format_arguments = { + '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'), + 'nodeId': self._serialize.url("node_id", node_id, 'str'), + 'reportId': self._serialize.url("report_id", report_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}/content'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/object_data_types_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/object_data_types_operations.py new file mode 100644 index 000000000000..ab19e27054d7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/object_data_types_operations.py @@ -0,0 +1,185 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ObjectDataTypesOperations(object): + """ObjectDataTypesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list_fields_by_module_and_type( + self, resource_group_name, automation_account_name, module_name, type_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of fields of a given type identified by module 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 module_name: The name of module. + :type module_name: str + :param type_name: The name of type. + :type type_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TypeField + :rtype: + ~azure.mgmt.automation.models.TypeFieldPaged[~azure.mgmt.automation.models.TypeField] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_fields_by_module_and_type.metadata['url'] + path_format_arguments = { + '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'), + 'moduleName': self._serialize.url("module_name", module_name, 'str'), + 'typeName': self._serialize.url("type_name", type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_fields_by_module_and_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/objectDataTypes/{typeName}/fields'} + + def list_fields_by_type( + self, resource_group_name, automation_account_name, type_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of fields of a given type across all accessible + modules. + + :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 type_name: The name of type. + :type type_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TypeField + :rtype: + ~azure.mgmt.automation.models.TypeFieldPaged[~azure.mgmt.automation.models.TypeField] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_fields_by_type.metadata['url'] + path_format_arguments = { + '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'), + 'typeName': self._serialize.url("type_name", type_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TypeFieldPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_fields_by_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/objectDataTypes/{typeName}/fields'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/operations.py new file mode 100644 index 000000000000..b93623b0db61 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/operations.py @@ -0,0 +1,96 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Automation REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.automation.models.OperationPaged[~azure.mgmt.automation.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Automation/operations'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_draft_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_draft_operations.py new file mode 100644 index 000000000000..37644686bc1f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_draft_operations.py @@ -0,0 +1,439 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class RunbookDraftOperations(object): + """RunbookDraftOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def get_content( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, callback=None, **operation_config): + """Retrieve the content of runbook draft identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_content.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'text/powershell' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'} + + + def _replace_content_initial( + self, resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers=None, raw=False, callback=None, **operation_config): + # Construct URL + url = self.replace_content.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'text/powershell' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = upload_gen(runbook_content) + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + header_dict = { + 'location': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def replace_content( + self, resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers=None, raw=False, callback=None, polling=True, **operation_config): + """Replaces the runbook draft content. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param runbook_content: The runbook draft content. + :type runbook_content: Generator + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[Generator] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[Generator]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._replace_content_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + runbook_name=runbook_name, + runbook_content=runbook_content, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'location': 'str', + } + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + replace_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'} + + def get( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the runbook draft identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunbookDraft or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.RunbookDraft or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunbookDraft', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft'} + + + def _publish_initial( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.publish.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def publish( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Publish runbook draft. + + :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 runbook_name: The parameters supplied to the publish runbook + operation. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._publish_initial( + resource_group_name=resource_group_name, + automation_account_name=automation_account_name, + runbook_name=runbook_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'location': 'str', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + publish.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/publish'} + + def undo_edit( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Undo draft edit to last known published state identified by runbook + 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunbookDraftUndoEditResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.undo_edit.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunbookDraftUndoEditResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + undo_edit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_operations.py new file mode 100644 index 000000000000..9d43688ec94b --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/runbook_operations.py @@ -0,0 +1,441 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RunbookOperations(object): + """RunbookOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def get_content( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, callback=None, **operation_config): + """Retrieve the content of runbook identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_content.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'text/powershell' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content'} + + def get( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the runbook identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Runbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Runbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Runbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, runbook_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create the runbook identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param parameters: The create or update parameters for runbook. + Provide either content link for a published runbook or draft, not + both. + :type parameters: + ~azure.mgmt.automation.models.RunbookCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Runbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Runbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunbookCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 400]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Runbook', response) + if response.status_code == 201: + deserialized = self._deserialize('Runbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'} + + def update( + self, resource_group_name, automation_account_name, runbook_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update the runbook identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param parameters: The update parameters for runbook. + :type parameters: + ~azure.mgmt.automation.models.RunbookUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Runbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Runbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunbookUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Runbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'} + + def delete( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Delete the runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of runbooks. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Runbook + :rtype: + ~azure.mgmt.automation.models.RunbookPaged[~azure.mgmt.automation.models.Runbook] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.RunbookPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RunbookPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py new file mode 100644 index 000000000000..50a938a918d7 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py @@ -0,0 +1,371 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ScheduleOperations(object): + """ScheduleOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def create_or_update( + self, resource_group_name, automation_account_name, schedule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a schedule. + + :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 schedule_name: The schedule name. + :type schedule_name: str + :param parameters: The parameters supplied to the create or update + schedule operation. + :type parameters: + ~azure.mgmt.automation.models.ScheduleCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'scheduleName': self._serialize.url("schedule_name", schedule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ScheduleCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 409]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + if response.status_code == 201: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'} + + def update( + self, resource_group_name, automation_account_name, schedule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update the schedule identified by schedule 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 schedule_name: The schedule name. + :type schedule_name: str + :param parameters: The parameters supplied to the update schedule + operation. + :type parameters: + ~azure.mgmt.automation.models.ScheduleUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'scheduleName': self._serialize.url("schedule_name", schedule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ScheduleUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'} + + def get( + self, resource_group_name, automation_account_name, schedule_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the schedule identified by schedule 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 schedule_name: The schedule name. + :type schedule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'scheduleName': self._serialize.url("schedule_name", schedule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'} + + def delete( + self, resource_group_name, automation_account_name, schedule_name, custom_headers=None, raw=False, **operation_config): + """Delete the schedule identified by schedule 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 schedule_name: The schedule name. + :type schedule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'scheduleName': self._serialize.url("schedule_name", schedule_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of schedules. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Schedule + :rtype: + ~azure.mgmt.automation.models.SchedulePaged[~azure.mgmt.automation.models.Schedule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_machine_runs_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_machine_runs_operations.py new file mode 100644 index 000000000000..ab7bee0b10ad --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_machine_runs_operations.py @@ -0,0 +1,191 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SoftwareUpdateConfigurationMachineRunsOperations(object): + """SoftwareUpdateConfigurationMachineRunsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def get_by_id( + self, resource_group_name, automation_account_name, software_update_configuration_machine_run_id, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Get a single software update configuration machine run by Id. + + :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_machine_run_id: The Id of the + software update configuration machine run. + :type software_update_configuration_machine_run_id: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfigurationMachineRun or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRun or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + 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'), + 'softwareUpdateConfigurationMachineRunId': self._serialize.url("software_update_configuration_machine_run_id", software_update_configuration_machine_run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}'} + + def list( + self, resource_group_name, automation_account_name, client_request_id=None, filter=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Return list of software update configuration machine runs. + + :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. You can use the + following filters: 'properties/osType', 'properties/status', + 'properties/startTime', and + 'properties/softwareUpdateConfiguration/name' + :type filter: str + :param skip: number of entries you skip before returning results + :type skip: str + :param top: Maximum number of entries returned in the results + collection + :type top: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfigurationMachineRunListResult or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRunListResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfigurationMachineRunListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_runs_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_runs_operations.py new file mode 100644 index 000000000000..7ba4e735a516 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configuration_runs_operations.py @@ -0,0 +1,190 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SoftwareUpdateConfigurationRunsOperations(object): + """SoftwareUpdateConfigurationRunsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def get_by_id( + self, resource_group_name, automation_account_name, software_update_configuration_run_id, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """Get a single software update configuration Run by Id. + + :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_run_id: The Id of the software + update configuration run. + :type software_update_configuration_run_id: str + :param client_request_id: Identifies this specific client request. + :type client_request_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfigurationRun or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + 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'), + 'softwareUpdateConfigurationRunId': self._serialize.url("software_update_configuration_run_id", software_update_configuration_run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfigurationRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}'} + + def list( + self, resource_group_name, automation_account_name, client_request_id=None, filter=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Return list of software update configuration runs. + + :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. You can use the + following filters: 'properties/osType', 'properties/status', + 'properties/startTime', and + 'properties/softwareUpdateConfiguration/name' + :type filter: str + :param skip: number of entries you skip before returning results + :type skip: str + :param top: Maximum number of entries returned in the results + collection + :type top: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfigurationRunListResult or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunListResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfigurationRunListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configurations_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configurations_operations.py new file mode 100644 index 000000000000..d5c30c808507 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/software_update_configurations_operations.py @@ -0,0 +1,316 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SoftwareUpdateConfigurationsOperations(object): + """SoftwareUpdateConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def create( + self, resource_group_name, automation_account_name, software_update_configuration_name, parameters, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SoftwareUpdateConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('SoftwareUpdateConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} + + def get_by_name( + self, resource_group_name, automation_account_name, software_update_configuration_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} + + def delete( + self, resource_group_name, automation_account_name, software_update_configuration_name, client_request_id=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'} + + def list( + self, resource_group_name, automation_account_name, client_request_id=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SoftwareUpdateConfigurationListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.automation.models.SoftwareUpdateConfigurationListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if client_request_id is not None: + header_parameters['clientRequestId'] = self._serialize.header("client_request_id", client_request_id, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SoftwareUpdateConfigurationListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_operations.py new file mode 100644 index 000000000000..2e7132d8cad4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_operations.py @@ -0,0 +1,375 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SourceControlOperations(object): + """SourceControlOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, automation_account_name, source_control_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a source control. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param parameters: The parameters supplied to the create or update + source control operation. + :type parameters: + ~azure.mgmt.automation.models.SourceControlCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SourceControlCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'} + + def update( + self, resource_group_name, automation_account_name, source_control_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update a source control. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param parameters: The parameters supplied to the update source + control operation. + :type parameters: + ~azure.mgmt.automation.models.SourceControlUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SourceControlUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'} + + def delete( + self, resource_group_name, automation_account_name, source_control_name, custom_headers=None, raw=False, **operation_config): + """Delete the source control. + + :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 source_control_name: The name of source control. + :type source_control_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'} + + def get( + self, resource_group_name, automation_account_name, source_control_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the source control identified by source control 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 source_control_name: The name of source control. + :type source_control_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of source controls. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.automation.models.SourceControlPaged[~azure.mgmt.automation.models.SourceControl] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py new file mode 100644 index 000000000000..23acb737426f --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py @@ -0,0 +1,256 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SourceControlSyncJobOperations(object): + """SourceControlSyncJobOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def create( + self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, commit_id, custom_headers=None, raw=False, **operation_config): + """Creates the sync job for a source control. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :param commit_id: The commit id of the source control sync job. If not + syncing to a commitId, enter an empty string. + :type commit_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControlSyncJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SourceControlSyncJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.SourceControlSyncJobCreateParameters(commit_id=commit_id) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'sourceControlSyncJobId': self._serialize.url("source_control_sync_job_id", source_control_sync_job_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SourceControlSyncJobCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('SourceControlSyncJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'} + + def get( + self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the source control sync job identified by job id. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControlSyncJobById or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.SourceControlSyncJobById or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'sourceControlSyncJobId': self._serialize.url("source_control_sync_job_id", source_control_sync_job_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceControlSyncJobById', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, source_control_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of source control sync jobs. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControlSyncJob + :rtype: + ~azure.mgmt.automation.models.SourceControlSyncJobPaged[~azure.mgmt.automation.models.SourceControlSyncJob] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SourceControlSyncJobPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SourceControlSyncJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_streams_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_streams_operations.py new file mode 100644 index 000000000000..43adc6bc5fac --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_streams_operations.py @@ -0,0 +1,187 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SourceControlSyncJobStreamsOperations(object): + """SourceControlSyncJobStreamsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-05-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-05-15-preview" + + self.config = config + + def list_by_sync_job( + self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of sync job streams identified by sync job id. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :param filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControlSyncJobStream + :rtype: + ~azure.mgmt.automation.models.SourceControlSyncJobStreamPaged[~azure.mgmt.automation.models.SourceControlSyncJobStream] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_sync_job.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'sourceControlSyncJobId': self._serialize.url("source_control_sync_job_id", source_control_sync_job_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SourceControlSyncJobStreamPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SourceControlSyncJobStreamPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_sync_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}/streams'} + + def get( + self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, stream_id, custom_headers=None, raw=False, **operation_config): + """Retrieve a sync job stream identified by stream id. + + :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 source_control_name: The source control name. + :type source_control_name: str + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :param stream_id: The id of the sync job stream. + :type stream_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControlSyncJobStreamById or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.automation.models.SourceControlSyncJobStreamById + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'sourceControlName': self._serialize.url("source_control_name", source_control_name, 'str'), + 'sourceControlSyncJobId': self._serialize.url("source_control_sync_job_id", source_control_sync_job_id, 'str'), + 'streamId': self._serialize.url("stream_id", stream_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceControlSyncJobStreamById', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}/streams/{streamId}'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/statistics_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/statistics_operations.py new file mode 100644 index 000000000000..889cd31fc482 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/statistics_operations.py @@ -0,0 +1,110 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class StatisticsOperations(object): + """StatisticsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve the statistics 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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Statistics + :rtype: + ~azure.mgmt.automation.models.StatisticsPaged[~azure.mgmt.automation.models.Statistics] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.StatisticsPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StatisticsPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/statistics'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_operations.py new file mode 100644 index 000000000000..9e886f2303b3 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_operations.py @@ -0,0 +1,342 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TestJobOperations(object): + """TestJobOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def create( + self, resource_group_name, automation_account_name, runbook_name, parameters=None, run_on=None, custom_headers=None, raw=False, **operation_config): + """Create a test job of the runbook. + + :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 runbook_name: The parameters supplied to the create test job + operation. + :type runbook_name: str + :param parameters: Gets or sets the parameters of the test job. + :type parameters: dict[str, str] + :param run_on: Gets or sets the runOn which specifies the group name + where the job is to be executed. + :type run_on: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TestJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.TestJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters1 = models.TestJobCreateParameters(parameters=parameters, run_on=run_on) + + # Construct URL + url = self.create.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters1, 'TestJobCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('TestJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'} + + def get( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the test job for the specified runbook. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TestJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.TestJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('TestJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'} + + def resume( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Resume the test job. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.resume.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume'} + + def stop( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Stop the test job. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop'} + + def suspend( + self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, **operation_config): + """Suspend the test job. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.suspend.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_streams_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_streams_operations.py new file mode 100644 index 000000000000..91b476306237 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/test_job_streams_operations.py @@ -0,0 +1,181 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TestJobStreamsOperations(object): + """TestJobStreamsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def get( + self, resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers=None, raw=False, **operation_config): + """Retrieve a test job stream of the test job identified by runbook name + and stream id. + + :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 runbook_name: The runbook name. + :type runbook_name: str + :param job_stream_id: The job stream id. + :type job_stream_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobStream or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.JobStream or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str'), + 'jobStreamId': self._serialize.url("job_stream_id", job_stream_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobStream', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}'} + + def list_by_test_job( + self, resource_group_name, automation_account_name, runbook_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of test job streams identified by runbook 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 runbook_name: The runbook name. + :type runbook_name: str + :param filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobStream + :rtype: + ~azure.mgmt.automation.models.JobStreamPaged[~azure.mgmt.automation.models.JobStream] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_test_job.metadata['url'] + 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'), + 'runbookName': self._serialize.url("runbook_name", runbook_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.JobStreamPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStreamPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_test_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/usages_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/usages_operations.py new file mode 100644 index 000000000000..0f4a458757ce --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/usages_operations.py @@ -0,0 +1,106 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the usage for the account id. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.automation.models.UsagePaged[~azure.mgmt.automation.models.Usage] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/usages'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/variable_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/variable_operations.py new file mode 100644 index 000000000000..d32eabd3f1ee --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/variable_operations.py @@ -0,0 +1,371 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class VariableOperations(object): + """VariableOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def create_or_update( + self, resource_group_name, automation_account_name, variable_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create a variable. + + :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 variable_name: The variable name. + :type variable_name: str + :param parameters: The parameters supplied to the create or update + variable operation. + :type parameters: + ~azure.mgmt.automation.models.VariableCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Variable or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Variable or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'variableName': self._serialize.url("variable_name", variable_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VariableCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Variable', response) + if response.status_code == 201: + deserialized = self._deserialize('Variable', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'} + + def update( + self, resource_group_name, automation_account_name, variable_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update a variable. + + :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 variable_name: The variable name. + :type variable_name: str + :param parameters: The parameters supplied to the update variable + operation. + :type parameters: + ~azure.mgmt.automation.models.VariableUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Variable or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Variable or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'variableName': self._serialize.url("variable_name", variable_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VariableUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Variable', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'} + + def delete( + self, resource_group_name, automation_account_name, variable_name, custom_headers=None, raw=False, **operation_config): + """Delete the variable. + + :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 variable_name: The name of variable. + :type variable_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'variableName': self._serialize.url("variable_name", variable_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'} + + def get( + self, resource_group_name, automation_account_name, variable_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the variable identified by variable 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 variable_name: The name of variable. + :type variable_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Variable or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Variable or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'variableName': self._serialize.url("variable_name", variable_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Variable', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of variables. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Variable + :rtype: + ~azure.mgmt.automation.models.VariablePaged[~azure.mgmt.automation.models.Variable] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.VariablePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VariablePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/watcher_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/watcher_operations.py new file mode 100644 index 000000000000..23367d7e10c6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/watcher_operations.py @@ -0,0 +1,486 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WatcherOperations(object): + """WatcherOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def create_or_update( + self, resource_group_name, automation_account_name, watcher_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create the watcher identified by watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param parameters: The create or update parameters for watcher. + :type parameters: ~azure.mgmt.automation.models.Watcher + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Watcher or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Watcher or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Watcher') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Watcher', response) + if response.status_code == 201: + deserialized = self._deserialize('Watcher', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}'} + + def get( + self, resource_group_name, automation_account_name, watcher_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the watcher identified by watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Watcher or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Watcher or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Watcher', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}'} + + def update( + self, resource_group_name, automation_account_name, watcher_name, execution_frequency_in_seconds=None, name=None, custom_headers=None, raw=False, **operation_config): + """Update the watcher identified by watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param execution_frequency_in_seconds: Gets or sets the frequency at + which the watcher is invoked. + :type execution_frequency_in_seconds: long + :param name: Gets or sets the name of the resource. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Watcher or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Watcher or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.WatcherUpdateParameters(execution_frequency_in_seconds=execution_frequency_in_seconds, name=name) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WatcherUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Watcher', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}'} + + def delete( + self, resource_group_name, automation_account_name, watcher_name, custom_headers=None, raw=False, **operation_config): + """Delete the watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}'} + + def start( + self, resource_group_name, automation_account_name, watcher_name, custom_headers=None, raw=False, **operation_config): + """Resume the watcher identified by watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}/start'} + + def stop( + self, resource_group_name, automation_account_name, watcher_name, custom_headers=None, raw=False, **operation_config): + """Resume the watcher identified by watcher 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 watcher_name: The watcher name. + :type watcher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + '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'), + 'watcherName': self._serialize.url("watcher_name", watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName}/stop'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of watchers. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Watcher + :rtype: + ~azure.mgmt.automation.models.WatcherPaged[~azure.mgmt.automation.models.Watcher] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.WatcherPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WatcherPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/webhook_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/webhook_operations.py new file mode 100644 index 000000000000..befc4db0b689 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/webhook_operations.py @@ -0,0 +1,433 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WebhookOperations(object): + """WebhookOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-10-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-10-31" + + self.config = config + + def generate_uri( + self, resource_group_name, automation_account_name, custom_headers=None, raw=False, **operation_config): + """Generates a Uri for use in creating a webhook. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.generate_uri.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_uri.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri'} + + def delete( + self, resource_group_name, automation_account_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Delete the webhook 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 webhook_name: The webhook name. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + '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'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'} + + def get( + self, resource_group_name, automation_account_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the webhook identified by webhook 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 webhook_name: The webhook name. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Webhook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Webhook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'} + + def create_or_update( + self, resource_group_name, automation_account_name, webhook_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create the webhook identified by webhook 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 webhook_name: The webhook name. + :type webhook_name: str + :param parameters: The create or update parameters for webhook. + :type parameters: + ~azure.mgmt.automation.models.WebhookCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Webhook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Webhook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + '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'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WebhookCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + if response.status_code == 201: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'} + + def update( + self, resource_group_name, automation_account_name, webhook_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update the webhook identified by webhook 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 webhook_name: The webhook name. + :type webhook_name: str + :param parameters: The update parameters for webhook. + :type parameters: + ~azure.mgmt.automation.models.WebhookUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Webhook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.automation.models.Webhook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + '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'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WebhookUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'} + + def list_by_automation_account( + self, resource_group_name, automation_account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Retrieve a list of webhooks. + + :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 filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Webhook + :rtype: + ~azure.mgmt.automation.models.WebhookPaged[~azure.mgmt.automation.models.Webhook] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_automation_account.metadata['url'] + path_format_arguments = { + '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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.WebhookPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WebhookPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_automation_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks'} diff --git a/azure-mgmt-automation/azure/mgmt/automation/version.py b/azure-mgmt-automation/azure/mgmt/automation/version.py new file mode 100644 index 000000000000..9bd1dfac7ecb --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.2.0" +