From b2e2ab1b2bbb1e7388ba7dd325afc62246c870d7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Sep 2018 15:01:07 -0700 Subject: [PATCH] Generated from fe7933fcaf05884a7da733e0979f26c42e30c917 (#3450) Compute conf for py 2018-10-01 --- .../mgmt/compute/compute_management_client.py | 49 + .../mgmt/compute/v2018_10_01/__init__.py | 18 + .../v2018_10_01/compute_management_client.py | 155 ++ .../compute/v2018_10_01/models/__init__.py | 484 +++++ .../models/additional_capabilities.py | 33 + .../models/additional_capabilities_py3.py | 33 + .../models/additional_unattend_content.py | 52 + .../models/additional_unattend_content_py3.py | 52 + .../models/api_entity_reference.py | 29 + .../models/api_entity_reference_py3.py | 29 + .../compute/v2018_10_01/models/api_error.py | 44 + .../v2018_10_01/models/api_error_base.py | 36 + .../v2018_10_01/models/api_error_base_py3.py | 36 + .../v2018_10_01/models/api_error_py3.py | 44 + .../models/automatic_os_upgrade_policy.py | 35 + .../models/automatic_os_upgrade_policy_py3.py | 35 + .../v2018_10_01/models/availability_set.py | 88 + .../models/availability_set_paged.py | 27 + .../models/availability_set_py3.py | 88 + .../models/availability_set_update.py | 58 + .../models/availability_set_update_py3.py | 58 + .../v2018_10_01/models/boot_diagnostics.py | 37 + .../models/boot_diagnostics_instance_view.py | 47 + .../boot_diagnostics_instance_view_py3.py | 47 + .../models/boot_diagnostics_py3.py | 37 + .../models/compute_management_client_enums.py | 345 ++++ .../models/compute_operation_value.py | 60 + .../models/compute_operation_value_paged.py | 27 + .../models/compute_operation_value_py3.py | 60 + .../compute/v2018_10_01/models/data_disk.py | 87 + .../v2018_10_01/models/data_disk_image.py | 37 + .../v2018_10_01/models/data_disk_image_py3.py | 37 + .../v2018_10_01/models/data_disk_py3.py | 87 + .../v2018_10_01/models/diagnostics_profile.py | 33 + .../models/diagnostics_profile_py3.py | 33 + .../v2018_10_01/models/diff_disk_settings.py | 32 + .../models/diff_disk_settings_py3.py | 32 + .../models/disk_encryption_settings.py | 41 + .../models/disk_encryption_settings_py3.py | 41 + .../v2018_10_01/models/disk_instance_view.py | 39 + .../models/disk_instance_view_py3.py | 39 + .../v2018_10_01/models/hardware_profile.py | 85 + .../models/hardware_profile_py3.py | 85 + .../mgmt/compute/v2018_10_01/models/image.py | 70 + .../v2018_10_01/models/image_data_disk.py | 69 + .../v2018_10_01/models/image_data_disk_py3.py | 69 + .../v2018_10_01/models/image_os_disk.py | 77 + .../v2018_10_01/models/image_os_disk_py3.py | 77 + .../compute/v2018_10_01/models/image_paged.py | 27 + .../compute/v2018_10_01/models/image_py3.py | 70 + .../v2018_10_01/models/image_reference.py | 54 + .../v2018_10_01/models/image_reference_py3.py | 54 + .../models/image_storage_profile.py | 45 + .../models/image_storage_profile_py3.py | 45 + .../v2018_10_01/models/image_update.py | 50 + .../v2018_10_01/models/image_update_py3.py | 50 + .../compute/v2018_10_01/models/inner_error.py | 32 + .../v2018_10_01/models/inner_error_py3.py | 32 + .../models/instance_view_status.py | 47 + .../models/instance_view_status_py3.py | 47 + .../models/key_vault_key_reference.py | 41 + .../models/key_vault_key_reference_py3.py | 41 + .../models/key_vault_secret_reference.py | 40 + .../models/key_vault_secret_reference_py3.py | 40 + .../v2018_10_01/models/linux_configuration.py | 47 + .../models/linux_configuration_py3.py | 47 + .../models/log_analytics_input_base.py | 58 + .../models/log_analytics_input_base_py3.py | 58 + .../models/log_analytics_operation_result.py | 36 + .../log_analytics_operation_result_py3.py | 36 + .../models/log_analytics_output.py | 35 + .../models/log_analytics_output_py3.py | 35 + .../models/maintenance_redeploy_status.py | 60 + .../models/maintenance_redeploy_status_py3.py | 60 + .../models/managed_disk_parameters.py | 35 + .../models/managed_disk_parameters_py3.py | 35 + .../models/network_interface_reference.py | 32 + .../models/network_interface_reference_py3.py | 32 + .../v2018_10_01/models/network_profile.py | 30 + .../v2018_10_01/models/network_profile_py3.py | 30 + .../compute/v2018_10_01/models/os_disk.py | 103 + .../v2018_10_01/models/os_disk_image.py | 36 + .../v2018_10_01/models/os_disk_image_py3.py | 36 + .../compute/v2018_10_01/models/os_disk_py3.py | 103 + .../compute/v2018_10_01/models/os_profile.py | 105 + .../v2018_10_01/models/os_profile_py3.py | 105 + .../mgmt/compute/v2018_10_01/models/plan.py | 46 + .../compute/v2018_10_01/models/plan_py3.py | 46 + .../v2018_10_01/models/purchase_plan.py | 47 + .../v2018_10_01/models/purchase_plan_py3.py | 47 + .../models/recovery_walk_response.py | 41 + .../models/recovery_walk_response_py3.py | 41 + .../models/request_rate_by_interval_input.py | 60 + .../request_rate_by_interval_input_py3.py | 60 + .../compute/v2018_10_01/models/resource.py | 56 + .../v2018_10_01/models/resource_py3.py | 56 + .../models/rollback_status_info.py | 48 + .../models/rollback_status_info_py3.py | 48 + .../models/rolling_upgrade_policy.py | 63 + .../models/rolling_upgrade_policy_py3.py | 63 + .../models/rolling_upgrade_progress_info.py | 55 + .../rolling_upgrade_progress_info_py3.py | 55 + .../models/rolling_upgrade_running_status.py | 54 + .../rolling_upgrade_running_status_py3.py | 54 + .../models/rolling_upgrade_status_info.py | 76 + .../models/rolling_upgrade_status_info_py3.py | 76 + .../models/run_command_document.py | 61 + .../models/run_command_document_base.py | 56 + .../models/run_command_document_base_paged.py | 27 + .../models/run_command_document_base_py3.py | 56 + .../models/run_command_document_py3.py | 61 + .../v2018_10_01/models/run_command_input.py | 44 + .../models/run_command_input_parameter.py | 39 + .../models/run_command_input_parameter_py3.py | 39 + .../models/run_command_input_py3.py | 44 + .../run_command_parameter_definition.py | 48 + .../run_command_parameter_definition_py3.py | 48 + .../v2018_10_01/models/run_command_result.py | 29 + .../models/run_command_result_py3.py | 29 + .../mgmt/compute/v2018_10_01/models/sku.py | 38 + .../compute/v2018_10_01/models/sku_py3.py | 38 + .../v2018_10_01/models/ssh_configuration.py | 30 + .../models/ssh_configuration_py3.py | 30 + .../v2018_10_01/models/ssh_public_key.py | 39 + .../v2018_10_01/models/ssh_public_key_py3.py | 39 + .../v2018_10_01/models/storage_profile.py | 47 + .../v2018_10_01/models/storage_profile_py3.py | 47 + .../v2018_10_01/models/sub_resource.py | 28 + .../v2018_10_01/models/sub_resource_py3.py | 28 + .../models/sub_resource_read_only.py | 35 + .../models/sub_resource_read_only_py3.py | 35 + .../models/throttled_requests_input.py | 52 + .../models/throttled_requests_input_py3.py | 52 + .../v2018_10_01/models/update_resource.py | 28 + .../v2018_10_01/models/update_resource_py3.py | 28 + ...pgrade_operation_historical_status_info.py | 47 + ..._operation_historical_status_info_paged.py | 27 + ...ation_historical_status_info_properties.py | 67 + ...n_historical_status_info_properties_py3.py | 67 + ...de_operation_historical_status_info_py3.py | 47 + .../upgrade_operation_history_status.py | 46 + .../upgrade_operation_history_status_py3.py | 46 + .../v2018_10_01/models/upgrade_policy.py | 45 + .../v2018_10_01/models/upgrade_policy_py3.py | 45 + .../mgmt/compute/v2018_10_01/models/usage.py | 54 + .../compute/v2018_10_01/models/usage_name.py | 32 + .../v2018_10_01/models/usage_name_py3.py | 32 + .../compute/v2018_10_01/models/usage_paged.py | 27 + .../compute/v2018_10_01/models/usage_py3.py | 54 + .../v2018_10_01/models/vault_certificate.py | 46 + .../models/vault_certificate_py3.py | 46 + .../v2018_10_01/models/vault_secret_group.py | 35 + .../models/vault_secret_group_py3.py | 35 + .../v2018_10_01/models/virtual_hard_disk.py | 28 + .../models/virtual_hard_disk_py3.py | 28 + .../v2018_10_01/models/virtual_machine.py | 156 ++ .../virtual_machine_agent_instance_view.py | 39 + ...virtual_machine_agent_instance_view_py3.py | 39 + .../virtual_machine_capture_parameters.py | 46 + .../virtual_machine_capture_parameters_py3.py | 46 + .../models/virtual_machine_capture_result.py | 53 + .../virtual_machine_capture_result_py3.py | 53 + .../models/virtual_machine_extension.py | 97 + ...machine_extension_handler_instance_view.py | 37 + ...ine_extension_handler_instance_view_py3.py | 37 + .../models/virtual_machine_extension_image.py | 81 + .../virtual_machine_extension_image_py3.py | 81 + ...virtual_machine_extension_instance_view.py | 47 + ...ual_machine_extension_instance_view_py3.py | 47 + .../models/virtual_machine_extension_py3.py | 97 + .../virtual_machine_extension_update.py | 62 + .../virtual_machine_extension_update_py3.py | 62 + .../virtual_machine_extensions_list_result.py | 29 + ...tual_machine_extensions_list_result_py3.py | 29 + .../models/virtual_machine_health_status.py | 35 + .../virtual_machine_health_status_py3.py | 35 + .../models/virtual_machine_identity.py | 59 + .../models/virtual_machine_identity_py3.py | 59 + ...identity_user_assigned_identities_value.py | 40 + ...tity_user_assigned_identities_value_py3.py | 40 + .../models/virtual_machine_image.py | 59 + .../models/virtual_machine_image_py3.py | 59 + .../models/virtual_machine_image_resource.py | 49 + .../virtual_machine_image_resource_py3.py | 49 + .../models/virtual_machine_instance_view.py | 84 + .../virtual_machine_instance_view_py3.py | 84 + .../models/virtual_machine_paged.py | 27 + .../v2018_10_01/models/virtual_machine_py3.py | 156 ++ .../models/virtual_machine_scale_set.py | 116 ++ .../virtual_machine_scale_set_data_disk.py | 70 + ...virtual_machine_scale_set_data_disk_py3.py | 70 + .../virtual_machine_scale_set_extension.py | 80 + ...rtual_machine_scale_set_extension_paged.py | 27 + ...ual_machine_scale_set_extension_profile.py | 30 + ...machine_scale_set_extension_profile_py3.py | 30 + ...virtual_machine_scale_set_extension_py3.py | 80 + .../virtual_machine_scale_set_identity.py | 61 + .../virtual_machine_scale_set_identity_py3.py | 61 + ...identity_user_assigned_identities_value.py | 40 + ...tity_user_assigned_identities_value_py3.py | 40 + ...virtual_machine_scale_set_instance_view.py | 48 + ...ual_machine_scale_set_instance_view_py3.py | 48 + ...cale_set_instance_view_statuses_summary.py | 37 + ..._set_instance_view_statuses_summary_py3.py | 37 + ...tual_machine_scale_set_ip_configuration.py | 89 + ..._machine_scale_set_ip_configuration_py3.py | 89 + .../virtual_machine_scale_set_ip_tag.py | 33 + .../virtual_machine_scale_set_ip_tag_py3.py | 33 + ...chine_scale_set_managed_disk_parameters.py | 32 + ...e_scale_set_managed_disk_parameters_py3.py | 32 + ...machine_scale_set_network_configuration.py | 70 + ..._set_network_configuration_dns_settings.py | 29 + ..._network_configuration_dns_settings_py3.py | 29 + ...ine_scale_set_network_configuration_py3.py | 70 + ...rtual_machine_scale_set_network_profile.py | 38 + ...l_machine_scale_set_network_profile_py3.py | 38 + .../virtual_machine_scale_set_os_disk.py | 92 + .../virtual_machine_scale_set_os_disk_py3.py | 92 + .../virtual_machine_scale_set_os_profile.py | 97 + ...irtual_machine_scale_set_os_profile_py3.py | 97 + .../models/virtual_machine_scale_set_paged.py | 27 + ...ale_set_public_ip_address_configuration.py | 55 + ...c_ip_address_configuration_dns_settings.py | 37 + ..._address_configuration_dns_settings_py3.py | 37 + ...set_public_ip_address_configuration_py3.py | 55 + .../models/virtual_machine_scale_set_py3.py | 116 ++ .../models/virtual_machine_scale_set_sku.py | 46 + .../virtual_machine_scale_set_sku_capacity.py | 52 + ...tual_machine_scale_set_sku_capacity_py3.py | 52 + .../virtual_machine_scale_set_sku_paged.py | 27 + .../virtual_machine_scale_set_sku_py3.py | 46 + ...rtual_machine_scale_set_storage_profile.py | 49 + ...l_machine_scale_set_storage_profile_py3.py | 49 + .../virtual_machine_scale_set_update.py | 61 + ...chine_scale_set_update_ip_configuration.py | 77 + ...e_scale_set_update_ip_configuration_py3.py | 77 + ..._scale_set_update_network_configuration.py | 61 + ...le_set_update_network_configuration_py3.py | 61 + ...achine_scale_set_update_network_profile.py | 30 + ...ne_scale_set_update_network_profile_py3.py | 30 + ...irtual_machine_scale_set_update_os_disk.py | 56 + ...al_machine_scale_set_update_os_disk_py3.py | 56 + ...ual_machine_scale_set_update_os_profile.py | 43 + ...machine_scale_set_update_os_profile_py3.py | 43 + ..._update_public_ip_address_configuration.py | 39 + ...ate_public_ip_address_configuration_py3.py | 39 + .../virtual_machine_scale_set_update_py3.py | 61 + ...achine_scale_set_update_storage_profile.py | 39 + ...ne_scale_set_update_storage_profile_py3.py | 39 + ...ual_machine_scale_set_update_vm_profile.py | 55 + ...machine_scale_set_update_vm_profile_py3.py | 55 + .../models/virtual_machine_scale_set_vm.py | 168 ++ ...machine_scale_set_vm_extensions_summary.py | 41 + ...ine_scale_set_vm_extensions_summary_py3.py | 41 + ...rtual_machine_scale_set_vm_instance_ids.py | 30 + ...l_machine_scale_set_vm_instance_ids_py3.py | 30 + ...hine_scale_set_vm_instance_required_ids.py | 34 + ..._scale_set_vm_instance_required_ids_py3.py | 34 + ...tual_machine_scale_set_vm_instance_view.py | 86 + ..._machine_scale_set_vm_instance_view_py3.py | 86 + .../virtual_machine_scale_set_vm_paged.py | 27 + .../virtual_machine_scale_set_vm_profile.py | 88 + ...irtual_machine_scale_set_vm_profile_py3.py | 88 + .../virtual_machine_scale_set_vm_py3.py | 168 ++ .../models/virtual_machine_size.py | 53 + .../models/virtual_machine_size_paged.py | 27 + .../models/virtual_machine_size_py3.py | 53 + .../virtual_machine_status_code_count.py | 41 + .../virtual_machine_status_code_count_py3.py | 41 + .../models/virtual_machine_update.py | 132 ++ .../models/virtual_machine_update_py3.py | 132 ++ .../models/win_rm_configuration.py | 29 + .../models/win_rm_configuration_py3.py | 29 + .../v2018_10_01/models/win_rm_listener.py | 42 + .../v2018_10_01/models/win_rm_listener_py3.py | 42 + .../models/windows_configuration.py | 54 + .../models/windows_configuration_py3.py | 54 + .../v2018_10_01/operations/__init__.py | 44 + .../availability_sets_operations.py | 495 +++++ .../operations/images_operations.py | 522 +++++ .../operations/log_analytics_operations.py | 242 +++ .../v2018_10_01/operations/operations.py | 98 + .../operations/usage_operations.py | 107 + ...ual_machine_extension_images_operations.py | 248 +++ .../virtual_machine_extensions_operations.py | 479 +++++ .../virtual_machine_images_operations.py | 383 ++++ ...virtual_machine_run_commands_operations.py | 167 ++ ...machine_scale_set_extensions_operations.py | 377 ++++ ...e_scale_set_rolling_upgrades_operations.py | 347 ++++ ...irtual_machine_scale_set_vms_operations.py | 1226 ++++++++++++ .../virtual_machine_scale_sets_operations.py | 1750 +++++++++++++++++ .../virtual_machine_sizes_operations.py | 107 + .../operations/virtual_machines_operations.py | 1551 +++++++++++++++ .../azure/mgmt/compute/v2018_10_01/version.py | 13 + 294 files changed, 23387 insertions(+) create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py create mode 100644 azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/version.py diff --git a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py index 66da49f5387c..4c6f725f0850 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py @@ -117,6 +117,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2017-12-01: :mod:`v2017_12_01.models` * 2018-04-01: :mod:`v2018_04_01.models` * 2018-06-01: :mod:`v2018_06_01.models` + * 2018-10-01: :mod:`v2018_10_01.models` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -142,6 +143,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2018-06-01': from .v2018_06_01 import models return models + elif api_version == '2018-10-01': + from .v2018_10_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -155,6 +159,7 @@ def availability_sets(self): * 2017-12-01: :class:`AvailabilitySetsOperations` * 2018-04-01: :class:`AvailabilitySetsOperations` * 2018-06-01: :class:`AvailabilitySetsOperations` + * 2018-10-01: :class:`AvailabilitySetsOperations` """ api_version = self._get_api_version('availability_sets') if api_version == '2015-06-15': @@ -171,6 +176,8 @@ def availability_sets(self): from .v2018_04_01.operations import AvailabilitySetsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -245,6 +252,7 @@ def images(self): * 2017-12-01: :class:`ImagesOperations` * 2018-04-01: :class:`ImagesOperations` * 2018-06-01: :class:`ImagesOperations` + * 2018-10-01: :class:`ImagesOperations` """ api_version = self._get_api_version('images') if api_version == '2016-04-30-preview': @@ -257,6 +265,8 @@ def images(self): from .v2018_04_01.operations import ImagesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import ImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ImagesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -268,6 +278,7 @@ def log_analytics(self): * 2017-12-01: :class:`LogAnalyticsOperations` * 2018-04-01: :class:`LogAnalyticsOperations` * 2018-06-01: :class:`LogAnalyticsOperations` + * 2018-10-01: :class:`LogAnalyticsOperations` """ api_version = self._get_api_version('log_analytics') if api_version == '2017-12-01': @@ -276,6 +287,8 @@ def log_analytics(self): from .v2018_04_01.operations import LogAnalyticsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -287,6 +300,7 @@ def operations(self): * 2017-12-01: :class:`Operations` * 2018-04-01: :class:`Operations` * 2018-06-01: :class:`Operations` + * 2018-10-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-12-01': @@ -295,6 +309,8 @@ def operations(self): from .v2018_04_01.operations import Operations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -348,6 +364,7 @@ def usage(self): * 2017-12-01: :class:`UsageOperations` * 2018-04-01: :class:`UsageOperations` * 2018-06-01: :class:`UsageOperations` + * 2018-10-01: :class:`UsageOperations` """ api_version = self._get_api_version('usage') if api_version == '2015-06-15': @@ -364,6 +381,8 @@ def usage(self): from .v2018_04_01.operations import UsageOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import UsageOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import UsageOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -379,6 +398,7 @@ def virtual_machine_extension_images(self): * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` * 2018-04-01: :class:`VirtualMachineExtensionImagesOperations` * 2018-06-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-10-01: :class:`VirtualMachineExtensionImagesOperations` """ api_version = self._get_api_version('virtual_machine_extension_images') if api_version == '2015-06-15': @@ -395,6 +415,8 @@ def virtual_machine_extension_images(self): from .v2018_04_01.operations import VirtualMachineExtensionImagesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -410,6 +432,7 @@ def virtual_machine_extensions(self): * 2017-12-01: :class:`VirtualMachineExtensionsOperations` * 2018-04-01: :class:`VirtualMachineExtensionsOperations` * 2018-06-01: :class:`VirtualMachineExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineExtensionsOperations` """ api_version = self._get_api_version('virtual_machine_extensions') if api_version == '2015-06-15': @@ -426,6 +449,8 @@ def virtual_machine_extensions(self): from .v2018_04_01.operations import VirtualMachineExtensionsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -441,6 +466,7 @@ def virtual_machine_images(self): * 2017-12-01: :class:`VirtualMachineImagesOperations` * 2018-04-01: :class:`VirtualMachineImagesOperations` * 2018-06-01: :class:`VirtualMachineImagesOperations` + * 2018-10-01: :class:`VirtualMachineImagesOperations` """ api_version = self._get_api_version('virtual_machine_images') if api_version == '2015-06-15': @@ -457,6 +483,8 @@ def virtual_machine_images(self): from .v2018_04_01.operations import VirtualMachineImagesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -469,6 +497,7 @@ def virtual_machine_run_commands(self): * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` * 2018-04-01: :class:`VirtualMachineRunCommandsOperations` * 2018-06-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-10-01: :class:`VirtualMachineRunCommandsOperations` """ api_version = self._get_api_version('virtual_machine_run_commands') if api_version == '2017-03-30': @@ -479,6 +508,8 @@ def virtual_machine_run_commands(self): from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -491,6 +522,7 @@ def virtual_machine_scale_set_extensions(self): * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` * 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations` * 2018-06-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_extensions') if api_version == '2017-03-30': @@ -501,6 +533,8 @@ def virtual_machine_scale_set_extensions(self): from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -513,6 +547,7 @@ def virtual_machine_scale_set_rolling_upgrades(self): * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` * 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` * 2018-06-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_rolling_upgrades') if api_version == '2017-03-30': @@ -523,6 +558,8 @@ def virtual_machine_scale_set_rolling_upgrades(self): from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -538,6 +575,7 @@ def virtual_machine_scale_set_vms(self): * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` * 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations` * 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_vms') if api_version == '2015-06-15': @@ -554,6 +592,8 @@ def virtual_machine_scale_set_vms(self): from .v2018_04_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -569,6 +609,7 @@ def virtual_machine_scale_sets(self): * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` * 2018-04-01: :class:`VirtualMachineScaleSetsOperations` * 2018-06-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetsOperations` """ api_version = self._get_api_version('virtual_machine_scale_sets') if api_version == '2015-06-15': @@ -585,6 +626,8 @@ def virtual_machine_scale_sets(self): from .v2018_04_01.operations import VirtualMachineScaleSetsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -600,6 +643,7 @@ def virtual_machine_sizes(self): * 2017-12-01: :class:`VirtualMachineSizesOperations` * 2018-04-01: :class:`VirtualMachineSizesOperations` * 2018-06-01: :class:`VirtualMachineSizesOperations` + * 2018-10-01: :class:`VirtualMachineSizesOperations` """ api_version = self._get_api_version('virtual_machine_sizes') if api_version == '2015-06-15': @@ -616,6 +660,8 @@ def virtual_machine_sizes(self): from .v2018_04_01.operations import VirtualMachineSizesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -631,6 +677,7 @@ def virtual_machines(self): * 2017-12-01: :class:`VirtualMachinesOperations` * 2018-04-01: :class:`VirtualMachinesOperations` * 2018-06-01: :class:`VirtualMachinesOperations` + * 2018-10-01: :class:`VirtualMachinesOperations` """ api_version = self._get_api_version('virtual_machines') if api_version == '2015-06-15': @@ -647,6 +694,8 @@ def virtual_machines(self): from .v2018_04_01.operations import VirtualMachinesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py new file mode 100644 index 000000000000..88ded2f640de --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__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 .compute_management_client import ComputeManagementClient +from .version import VERSION + +__all__ = ['ComputeManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py new file mode 100644 index 000000000000..5fef76bdb571 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py @@ -0,0 +1,155 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.operations import Operations +from .operations.availability_sets_operations import AvailabilitySetsOperations +from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations +from .operations.usage_operations import UsageOperations +from .operations.virtual_machines_operations import VirtualMachinesOperations +from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations +from .operations.images_operations import ImagesOperations +from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from .operations.log_analytics_operations import LogAnalyticsOperations +from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from . import models + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + 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: 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 str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, 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 not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2018_10_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2018_10_01.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2018_10_01.operations.UsageOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2018_10_01.operations.VirtualMachinesOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2018_10_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2018_10_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineRunCommandsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: 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 str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-10-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py new file mode 100644 index 000000000000..6cd083bb87a5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py @@ -0,0 +1,484 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 .compute_operation_value_py3 import ComputeOperationValue + from .instance_view_status_py3 import InstanceViewStatus + from .sub_resource_py3 import SubResource + from .sku_py3 import Sku + from .availability_set_py3 import AvailabilitySet + from .availability_set_update_py3 import AvailabilitySetUpdate + from .virtual_machine_size_py3 import VirtualMachineSize + from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage + from .virtual_machine_image_resource_py3 import VirtualMachineImageResource + from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView + from .virtual_machine_extension_py3 import VirtualMachineExtension + from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate + from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult + from .purchase_plan_py3 import PurchasePlan + from .os_disk_image_py3 import OSDiskImage + from .data_disk_image_py3 import DataDiskImage + from .virtual_machine_image_py3 import VirtualMachineImage + from .usage_name_py3 import UsageName + from .usage_py3 import Usage + from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters + from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult + from .plan_py3 import Plan + from .hardware_profile_py3 import HardwareProfile + from .image_reference_py3 import ImageReference + from .key_vault_secret_reference_py3 import KeyVaultSecretReference + from .key_vault_key_reference_py3 import KeyVaultKeyReference + from .disk_encryption_settings_py3 import DiskEncryptionSettings + from .virtual_hard_disk_py3 import VirtualHardDisk + from .diff_disk_settings_py3 import DiffDiskSettings + from .managed_disk_parameters_py3 import ManagedDiskParameters + from .os_disk_py3 import OSDisk + from .data_disk_py3 import DataDisk + from .storage_profile_py3 import StorageProfile + from .additional_capabilities_py3 import AdditionalCapabilities + from .additional_unattend_content_py3 import AdditionalUnattendContent + from .win_rm_listener_py3 import WinRMListener + from .win_rm_configuration_py3 import WinRMConfiguration + from .windows_configuration_py3 import WindowsConfiguration + from .ssh_public_key_py3 import SshPublicKey + from .ssh_configuration_py3 import SshConfiguration + from .linux_configuration_py3 import LinuxConfiguration + from .vault_certificate_py3 import VaultCertificate + from .vault_secret_group_py3 import VaultSecretGroup + from .os_profile_py3 import OSProfile + from .network_interface_reference_py3 import NetworkInterfaceReference + from .network_profile_py3 import NetworkProfile + from .boot_diagnostics_py3 import BootDiagnostics + from .diagnostics_profile_py3 import DiagnosticsProfile + from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView + from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView + from .disk_instance_view_py3 import DiskInstanceView + from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView + from .virtual_machine_identity_user_assigned_identities_value_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue + from .virtual_machine_identity_py3 import VirtualMachineIdentity + from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus + from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView + from .virtual_machine_py3 import VirtualMachine + from .virtual_machine_update_py3 import VirtualMachineUpdate + from .automatic_os_upgrade_policy_py3 import AutomaticOSUpgradePolicy + from .rolling_upgrade_policy_py3 import RollingUpgradePolicy + from .upgrade_policy_py3 import UpgradePolicy + from .image_os_disk_py3 import ImageOSDisk + from .image_data_disk_py3 import ImageDataDisk + from .image_storage_profile_py3 import ImageStorageProfile + from .image_py3 import Image + from .image_update_py3 import ImageUpdate + from .virtual_machine_scale_set_identity_user_assigned_identities_value_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity + from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile + from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile + from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters + from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk + from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk + from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk + from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile + from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile + from .api_entity_reference_py3 import ApiEntityReference + from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from .virtual_machine_scale_set_ip_tag_py3 import VirtualMachineScaleSetIpTag + from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration + from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration + from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile + from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension + from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile + from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile + from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile + from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet + from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate + from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs + from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount + from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary + from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView + from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity + from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku + from .api_error_base_py3 import ApiErrorBase + from .inner_error_py3 import InnerError + from .api_error_py3 import ApiError + from .rollback_status_info_py3 import RollbackStatusInfo + from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus + from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo + from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties + from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo + from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus + from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView + from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM + from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus + from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo + from .resource_py3 import Resource + from .update_resource_py3 import UpdateResource + from .sub_resource_read_only_py3 import SubResourceReadOnly + from .recovery_walk_response_py3 import RecoveryWalkResponse + from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput + from .throttled_requests_input_py3 import ThrottledRequestsInput + from .log_analytics_input_base_py3 import LogAnalyticsInputBase + from .log_analytics_output_py3 import LogAnalyticsOutput + from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult + from .run_command_input_parameter_py3 import RunCommandInputParameter + from .run_command_input_py3 import RunCommandInput + from .run_command_parameter_definition_py3 import RunCommandParameterDefinition + from .run_command_document_base_py3 import RunCommandDocumentBase + from .run_command_document_py3 import RunCommandDocument + from .run_command_result_py3 import RunCommandResult +except (SyntaxError, ImportError): + from .compute_operation_value import ComputeOperationValue + from .instance_view_status import InstanceViewStatus + from .sub_resource import SubResource + from .sku import Sku + from .availability_set import AvailabilitySet + from .availability_set_update import AvailabilitySetUpdate + from .virtual_machine_size import VirtualMachineSize + from .virtual_machine_extension_image import VirtualMachineExtensionImage + from .virtual_machine_image_resource import VirtualMachineImageResource + from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView + from .virtual_machine_extension import VirtualMachineExtension + from .virtual_machine_extension_update import VirtualMachineExtensionUpdate + from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult + from .purchase_plan import PurchasePlan + from .os_disk_image import OSDiskImage + from .data_disk_image import DataDiskImage + from .virtual_machine_image import VirtualMachineImage + from .usage_name import UsageName + from .usage import Usage + from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters + from .virtual_machine_capture_result import VirtualMachineCaptureResult + from .plan import Plan + from .hardware_profile import HardwareProfile + from .image_reference import ImageReference + from .key_vault_secret_reference import KeyVaultSecretReference + from .key_vault_key_reference import KeyVaultKeyReference + from .disk_encryption_settings import DiskEncryptionSettings + from .virtual_hard_disk import VirtualHardDisk + from .diff_disk_settings import DiffDiskSettings + from .managed_disk_parameters import ManagedDiskParameters + from .os_disk import OSDisk + from .data_disk import DataDisk + from .storage_profile import StorageProfile + from .additional_capabilities import AdditionalCapabilities + from .additional_unattend_content import AdditionalUnattendContent + from .win_rm_listener import WinRMListener + from .win_rm_configuration import WinRMConfiguration + from .windows_configuration import WindowsConfiguration + from .ssh_public_key import SshPublicKey + from .ssh_configuration import SshConfiguration + from .linux_configuration import LinuxConfiguration + from .vault_certificate import VaultCertificate + from .vault_secret_group import VaultSecretGroup + from .os_profile import OSProfile + from .network_interface_reference import NetworkInterfaceReference + from .network_profile import NetworkProfile + from .boot_diagnostics import BootDiagnostics + from .diagnostics_profile import DiagnosticsProfile + from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView + from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView + from .disk_instance_view import DiskInstanceView + from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView + from .virtual_machine_identity_user_assigned_identities_value import VirtualMachineIdentityUserAssignedIdentitiesValue + from .virtual_machine_identity import VirtualMachineIdentity + from .maintenance_redeploy_status import MaintenanceRedeployStatus + from .virtual_machine_instance_view import VirtualMachineInstanceView + from .virtual_machine import VirtualMachine + from .virtual_machine_update import VirtualMachineUpdate + from .automatic_os_upgrade_policy import AutomaticOSUpgradePolicy + from .rolling_upgrade_policy import RollingUpgradePolicy + from .upgrade_policy import UpgradePolicy + from .image_os_disk import ImageOSDisk + from .image_data_disk import ImageDataDisk + from .image_storage_profile import ImageStorageProfile + from .image import Image + from .image_update import ImageUpdate + from .virtual_machine_scale_set_identity_user_assigned_identities_value import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity + from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile + from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile + from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters + from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk + from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk + from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk + from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile + from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile + from .api_entity_reference import ApiEntityReference + from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from .virtual_machine_scale_set_ip_tag import VirtualMachineScaleSetIpTag + from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration + from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration + from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration + from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration + from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration + from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile + from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile + from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension + from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile + from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile + from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile + from .virtual_machine_scale_set import VirtualMachineScaleSet + from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate + from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs + from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs + from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount + from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary + from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary + from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView + from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity + from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku + from .api_error_base import ApiErrorBase + from .inner_error import InnerError + from .api_error import ApiError + from .rollback_status_info import RollbackStatusInfo + from .upgrade_operation_history_status import UpgradeOperationHistoryStatus + from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo + from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties + from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo + from .virtual_machine_health_status import VirtualMachineHealthStatus + from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView + from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM + from .rolling_upgrade_running_status import RollingUpgradeRunningStatus + from .rolling_upgrade_status_info import RollingUpgradeStatusInfo + from .resource import Resource + from .update_resource import UpdateResource + from .sub_resource_read_only import SubResourceReadOnly + from .recovery_walk_response import RecoveryWalkResponse + from .request_rate_by_interval_input import RequestRateByIntervalInput + from .throttled_requests_input import ThrottledRequestsInput + from .log_analytics_input_base import LogAnalyticsInputBase + from .log_analytics_output import LogAnalyticsOutput + from .log_analytics_operation_result import LogAnalyticsOperationResult + from .run_command_input_parameter import RunCommandInputParameter + from .run_command_input import RunCommandInput + from .run_command_parameter_definition import RunCommandParameterDefinition + from .run_command_document_base import RunCommandDocumentBase + from .run_command_document import RunCommandDocument + from .run_command_result import RunCommandResult +from .compute_operation_value_paged import ComputeOperationValuePaged +from .availability_set_paged import AvailabilitySetPaged +from .virtual_machine_size_paged import VirtualMachineSizePaged +from .usage_paged import UsagePaged +from .virtual_machine_paged import VirtualMachinePaged +from .image_paged import ImagePaged +from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged +from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged +from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged +from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged +from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged +from .run_command_document_base_paged import RunCommandDocumentBasePaged +from .compute_management_client_enums import ( + StatusLevelTypes, + AvailabilitySetSkuTypes, + OperatingSystemTypes, + VirtualMachineSizeTypes, + CachingTypes, + DiskCreateOptionTypes, + StorageAccountTypes, + DiffDiskOptions, + PassNames, + ComponentNames, + SettingNames, + ProtocolTypes, + ResourceIdentityType, + MaintenanceOperationResultCodeTypes, + UpgradeMode, + OperatingSystemStateTypes, + IPVersion, + VirtualMachinePriorityTypes, + VirtualMachineEvictionPolicyTypes, + VirtualMachineScaleSetSkuScaleType, + UpgradeState, + UpgradeOperationInvoker, + RollingUpgradeStatusCode, + RollingUpgradeActionType, + IntervalInMins, + InstanceViewTypes, +) + +__all__ = [ + 'ComputeOperationValue', + 'InstanceViewStatus', + 'SubResource', + 'Sku', + 'AvailabilitySet', + 'AvailabilitySetUpdate', + 'VirtualMachineSize', + 'VirtualMachineExtensionImage', + 'VirtualMachineImageResource', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtension', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineExtensionsListResult', + 'PurchasePlan', + 'OSDiskImage', + 'DataDiskImage', + 'VirtualMachineImage', + 'UsageName', + 'Usage', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'Plan', + 'HardwareProfile', + 'ImageReference', + 'KeyVaultSecretReference', + 'KeyVaultKeyReference', + 'DiskEncryptionSettings', + 'VirtualHardDisk', + 'DiffDiskSettings', + 'ManagedDiskParameters', + 'OSDisk', + 'DataDisk', + 'StorageProfile', + 'AdditionalCapabilities', + 'AdditionalUnattendContent', + 'WinRMListener', + 'WinRMConfiguration', + 'WindowsConfiguration', + 'SshPublicKey', + 'SshConfiguration', + 'LinuxConfiguration', + 'VaultCertificate', + 'VaultSecretGroup', + 'OSProfile', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'BootDiagnostics', + 'DiagnosticsProfile', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineAgentInstanceView', + 'DiskInstanceView', + 'BootDiagnosticsInstanceView', + 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineIdentity', + 'MaintenanceRedeployStatus', + 'VirtualMachineInstanceView', + 'VirtualMachine', + 'VirtualMachineUpdate', + 'AutomaticOSUpgradePolicy', + 'RollingUpgradePolicy', + 'UpgradePolicy', + 'ImageOSDisk', + 'ImageDataDisk', + 'ImageStorageProfile', + 'Image', + 'ImageUpdate', + 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineScaleSetIdentity', + 'VirtualMachineScaleSetOSProfile', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdateStorageProfile', + 'ApiEntityReference', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetPublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetUpdateIPConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetUpdateNetworkConfiguration', + 'VirtualMachineScaleSetNetworkProfile', + 'VirtualMachineScaleSetUpdateNetworkProfile', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateVMProfile', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVMInstanceIDs', + 'VirtualMachineScaleSetVMInstanceRequiredIDs', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetVMExtensionsSummary', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetSku', + 'ApiErrorBase', + 'InnerError', + 'ApiError', + 'RollbackStatusInfo', + 'UpgradeOperationHistoryStatus', + 'RollingUpgradeProgressInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoricalStatusInfo', + 'VirtualMachineHealthStatus', + 'VirtualMachineScaleSetVMInstanceView', + 'VirtualMachineScaleSetVM', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'Resource', + 'UpdateResource', + 'SubResourceReadOnly', + 'RecoveryWalkResponse', + 'RequestRateByIntervalInput', + 'ThrottledRequestsInput', + 'LogAnalyticsInputBase', + 'LogAnalyticsOutput', + 'LogAnalyticsOperationResult', + 'RunCommandInputParameter', + 'RunCommandInput', + 'RunCommandParameterDefinition', + 'RunCommandDocumentBase', + 'RunCommandDocument', + 'RunCommandResult', + 'ComputeOperationValuePaged', + 'AvailabilitySetPaged', + 'VirtualMachineSizePaged', + 'UsagePaged', + 'VirtualMachinePaged', + 'ImagePaged', + 'VirtualMachineScaleSetPaged', + 'VirtualMachineScaleSetSkuPaged', + 'UpgradeOperationHistoricalStatusInfoPaged', + 'VirtualMachineScaleSetExtensionPaged', + 'VirtualMachineScaleSetVMPaged', + 'RunCommandDocumentBasePaged', + 'StatusLevelTypes', + 'AvailabilitySetSkuTypes', + 'OperatingSystemTypes', + 'VirtualMachineSizeTypes', + 'CachingTypes', + 'DiskCreateOptionTypes', + 'StorageAccountTypes', + 'DiffDiskOptions', + 'PassNames', + 'ComponentNames', + 'SettingNames', + 'ProtocolTypes', + 'ResourceIdentityType', + 'MaintenanceOperationResultCodeTypes', + 'UpgradeMode', + 'OperatingSystemStateTypes', + 'IPVersion', + 'VirtualMachinePriorityTypes', + 'VirtualMachineEvictionPolicyTypes', + 'VirtualMachineScaleSetSkuScaleType', + 'UpgradeState', + 'UpgradeOperationInvoker', + 'RollingUpgradeStatusCode', + 'RollingUpgradeActionType', + 'IntervalInMins', + 'InstanceViewTypes', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py new file mode 100644 index 000000000000..18ff109310c8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.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 AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py new file mode 100644 index 000000000000..db83a0a4eacb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_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 AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = ultra_ssd_enabled diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py new file mode 100644 index 000000000000..46f7944d0f4a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.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 AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_10_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_10_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py new file mode 100644 index 000000000000..69bf6281a50a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_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 AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_10_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_10_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py new file mode 100644 index 000000000000..d1bf572e916d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.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 ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py new file mode 100644 index 000000000000..da3e07082381 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_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 ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py new file mode 100644 index 000000000000..a5871f03ef08 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py new file mode 100644 index 000000000000..655c08638905 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.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 ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py new file mode 100644 index 000000000000..5ba95aa0283e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_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 ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py new file mode 100644 index 000000000000..09198f85879b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py new file mode 100644 index 000000000000..94301a312ac4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.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 AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the image becomes available. Default value is false. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = kwargs.get('enable_automatic_os_upgrade', None) + self.disable_automatic_rollback = kwargs.get('disable_automatic_rollback', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py new file mode 100644 index 000000000000..edb10f11ea56 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_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 AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the image becomes available. Default value is false. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, *, enable_automatic_os_upgrade: bool=None, disable_automatic_rollback: bool=None, **kwargs) -> None: + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = enable_automatic_os_upgrade + self.disable_automatic_rollback = disable_automatic_rollback diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py new file mode 100644 index 000000000000..e4bc1b86ea4c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py new file mode 100644 index 000000000000..179ffb77166d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_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 AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py new file mode 100644 index 000000000000..1b21ca071e5c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.sku = sku diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py new file mode 100644 index 000000000000..7d85cde8cbee --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.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 .update_resource import UpdateResource + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py new file mode 100644 index 000000000000..d6337f8fa7d8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_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 .update_resource_py3 import UpdateResource + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.sku = sku diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py new file mode 100644 index 000000000000..4a1f77c4d7d0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.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 BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

You can easily view + the output of your console log.

Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py new file mode 100644 index 000000000000..fcfbf63fd379 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

+ NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py new file mode 100644 index 000000000000..19856f1c10c7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

+ NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py new file mode 100644 index 000000000000..b64ae5b4adde --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_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 BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

You can easily view + the output of your console log.

Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py new file mode 100644 index 000000000000..d62295f3ac3e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py @@ -0,0 +1,345 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 StatusLevelTypes(str, Enum): + + info = "Info" + warning = "Warning" + error = "Error" + + +class AvailabilitySetSkuTypes(str, Enum): + + classic = "Classic" + aligned = "Aligned" + + +class OperatingSystemTypes(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class VirtualMachineSizeTypes(str, Enum): + + basic_a0 = "Basic_A0" + basic_a1 = "Basic_A1" + basic_a2 = "Basic_A2" + basic_a3 = "Basic_A3" + basic_a4 = "Basic_A4" + standard_a0 = "Standard_A0" + standard_a1 = "Standard_A1" + standard_a2 = "Standard_A2" + standard_a3 = "Standard_A3" + standard_a4 = "Standard_A4" + standard_a5 = "Standard_A5" + standard_a6 = "Standard_A6" + standard_a7 = "Standard_A7" + standard_a8 = "Standard_A8" + standard_a9 = "Standard_A9" + standard_a10 = "Standard_A10" + standard_a11 = "Standard_A11" + standard_a1_v2 = "Standard_A1_v2" + standard_a2_v2 = "Standard_A2_v2" + standard_a4_v2 = "Standard_A4_v2" + standard_a8_v2 = "Standard_A8_v2" + standard_a2m_v2 = "Standard_A2m_v2" + standard_a4m_v2 = "Standard_A4m_v2" + standard_a8m_v2 = "Standard_A8m_v2" + standard_b1s = "Standard_B1s" + standard_b1ms = "Standard_B1ms" + standard_b2s = "Standard_B2s" + standard_b2ms = "Standard_B2ms" + standard_b4ms = "Standard_B4ms" + standard_b8ms = "Standard_B8ms" + standard_d1 = "Standard_D1" + standard_d2 = "Standard_D2" + standard_d3 = "Standard_D3" + standard_d4 = "Standard_D4" + standard_d11 = "Standard_D11" + standard_d12 = "Standard_D12" + standard_d13 = "Standard_D13" + standard_d14 = "Standard_D14" + standard_d1_v2 = "Standard_D1_v2" + standard_d2_v2 = "Standard_D2_v2" + standard_d3_v2 = "Standard_D3_v2" + standard_d4_v2 = "Standard_D4_v2" + standard_d5_v2 = "Standard_D5_v2" + standard_d2_v3 = "Standard_D2_v3" + standard_d4_v3 = "Standard_D4_v3" + standard_d8_v3 = "Standard_D8_v3" + standard_d16_v3 = "Standard_D16_v3" + standard_d32_v3 = "Standard_D32_v3" + standard_d64_v3 = "Standard_D64_v3" + standard_d2s_v3 = "Standard_D2s_v3" + standard_d4s_v3 = "Standard_D4s_v3" + standard_d8s_v3 = "Standard_D8s_v3" + standard_d16s_v3 = "Standard_D16s_v3" + standard_d32s_v3 = "Standard_D32s_v3" + standard_d64s_v3 = "Standard_D64s_v3" + standard_d11_v2 = "Standard_D11_v2" + standard_d12_v2 = "Standard_D12_v2" + standard_d13_v2 = "Standard_D13_v2" + standard_d14_v2 = "Standard_D14_v2" + standard_d15_v2 = "Standard_D15_v2" + standard_ds1 = "Standard_DS1" + standard_ds2 = "Standard_DS2" + standard_ds3 = "Standard_DS3" + standard_ds4 = "Standard_DS4" + standard_ds11 = "Standard_DS11" + standard_ds12 = "Standard_DS12" + standard_ds13 = "Standard_DS13" + standard_ds14 = "Standard_DS14" + standard_ds1_v2 = "Standard_DS1_v2" + standard_ds2_v2 = "Standard_DS2_v2" + standard_ds3_v2 = "Standard_DS3_v2" + standard_ds4_v2 = "Standard_DS4_v2" + standard_ds5_v2 = "Standard_DS5_v2" + standard_ds11_v2 = "Standard_DS11_v2" + standard_ds12_v2 = "Standard_DS12_v2" + standard_ds13_v2 = "Standard_DS13_v2" + standard_ds14_v2 = "Standard_DS14_v2" + standard_ds15_v2 = "Standard_DS15_v2" + standard_ds13_4_v2 = "Standard_DS13-4_v2" + standard_ds13_2_v2 = "Standard_DS13-2_v2" + standard_ds14_8_v2 = "Standard_DS14-8_v2" + standard_ds14_4_v2 = "Standard_DS14-4_v2" + standard_e2_v3 = "Standard_E2_v3" + standard_e4_v3 = "Standard_E4_v3" + standard_e8_v3 = "Standard_E8_v3" + standard_e16_v3 = "Standard_E16_v3" + standard_e32_v3 = "Standard_E32_v3" + standard_e64_v3 = "Standard_E64_v3" + standard_e2s_v3 = "Standard_E2s_v3" + standard_e4s_v3 = "Standard_E4s_v3" + standard_e8s_v3 = "Standard_E8s_v3" + standard_e16s_v3 = "Standard_E16s_v3" + standard_e32s_v3 = "Standard_E32s_v3" + standard_e64s_v3 = "Standard_E64s_v3" + standard_e32_16_v3 = "Standard_E32-16_v3" + standard_e32_8s_v3 = "Standard_E32-8s_v3" + standard_e64_32s_v3 = "Standard_E64-32s_v3" + standard_e64_16s_v3 = "Standard_E64-16s_v3" + standard_f1 = "Standard_F1" + standard_f2 = "Standard_F2" + standard_f4 = "Standard_F4" + standard_f8 = "Standard_F8" + standard_f16 = "Standard_F16" + standard_f1s = "Standard_F1s" + standard_f2s = "Standard_F2s" + standard_f4s = "Standard_F4s" + standard_f8s = "Standard_F8s" + standard_f16s = "Standard_F16s" + standard_f2s_v2 = "Standard_F2s_v2" + standard_f4s_v2 = "Standard_F4s_v2" + standard_f8s_v2 = "Standard_F8s_v2" + standard_f16s_v2 = "Standard_F16s_v2" + standard_f32s_v2 = "Standard_F32s_v2" + standard_f64s_v2 = "Standard_F64s_v2" + standard_f72s_v2 = "Standard_F72s_v2" + standard_g1 = "Standard_G1" + standard_g2 = "Standard_G2" + standard_g3 = "Standard_G3" + standard_g4 = "Standard_G4" + standard_g5 = "Standard_G5" + standard_gs1 = "Standard_GS1" + standard_gs2 = "Standard_GS2" + standard_gs3 = "Standard_GS3" + standard_gs4 = "Standard_GS4" + standard_gs5 = "Standard_GS5" + standard_gs4_8 = "Standard_GS4-8" + standard_gs4_4 = "Standard_GS4-4" + standard_gs5_16 = "Standard_GS5-16" + standard_gs5_8 = "Standard_GS5-8" + standard_h8 = "Standard_H8" + standard_h16 = "Standard_H16" + standard_h8m = "Standard_H8m" + standard_h16m = "Standard_H16m" + standard_h16r = "Standard_H16r" + standard_h16mr = "Standard_H16mr" + standard_l4s = "Standard_L4s" + standard_l8s = "Standard_L8s" + standard_l16s = "Standard_L16s" + standard_l32s = "Standard_L32s" + standard_m64s = "Standard_M64s" + standard_m64ms = "Standard_M64ms" + standard_m128s = "Standard_M128s" + standard_m128ms = "Standard_M128ms" + standard_m64_32ms = "Standard_M64-32ms" + standard_m64_16ms = "Standard_M64-16ms" + standard_m128_64ms = "Standard_M128-64ms" + standard_m128_32ms = "Standard_M128-32ms" + standard_nc6 = "Standard_NC6" + standard_nc12 = "Standard_NC12" + standard_nc24 = "Standard_NC24" + standard_nc24r = "Standard_NC24r" + standard_nc6s_v2 = "Standard_NC6s_v2" + standard_nc12s_v2 = "Standard_NC12s_v2" + standard_nc24s_v2 = "Standard_NC24s_v2" + standard_nc24rs_v2 = "Standard_NC24rs_v2" + standard_nc6s_v3 = "Standard_NC6s_v3" + standard_nc12s_v3 = "Standard_NC12s_v3" + standard_nc24s_v3 = "Standard_NC24s_v3" + standard_nc24rs_v3 = "Standard_NC24rs_v3" + standard_nd6s = "Standard_ND6s" + standard_nd12s = "Standard_ND12s" + standard_nd24s = "Standard_ND24s" + standard_nd24rs = "Standard_ND24rs" + standard_nv6 = "Standard_NV6" + standard_nv12 = "Standard_NV12" + standard_nv24 = "Standard_NV24" + + +class CachingTypes(str, Enum): + + none = "None" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class DiskCreateOptionTypes(str, Enum): + + from_image = "FromImage" + empty = "Empty" + attach = "Attach" + + +class StorageAccountTypes(str, Enum): + + standard_lrs = "Standard_LRS" + premium_lrs = "Premium_LRS" + standard_ssd_lrs = "StandardSSD_LRS" + ultra_ssd_lrs = "UltraSSD_LRS" + + +class DiffDiskOptions(str, Enum): + + local = "Local" + + +class PassNames(str, Enum): + + oobe_system = "OobeSystem" + + +class ComponentNames(str, Enum): + + microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup" + + +class SettingNames(str, Enum): + + auto_logon = "AutoLogon" + first_logon_commands = "FirstLogonCommands" + + +class ProtocolTypes(str, Enum): + + http = "Http" + https = "Https" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class MaintenanceOperationResultCodeTypes(str, Enum): + + none = "None" + retry_later = "RetryLater" + maintenance_aborted = "MaintenanceAborted" + maintenance_completed = "MaintenanceCompleted" + + +class UpgradeMode(str, Enum): + + automatic = "Automatic" + manual = "Manual" + rolling = "Rolling" + + +class OperatingSystemStateTypes(str, Enum): + + generalized = "Generalized" + specialized = "Specialized" + + +class IPVersion(str, Enum): + + ipv4 = "IPv4" + ipv6 = "IPv6" + + +class VirtualMachinePriorityTypes(str, Enum): + + regular = "Regular" + low = "Low" + + +class VirtualMachineEvictionPolicyTypes(str, Enum): + + deallocate = "Deallocate" + delete = "Delete" + + +class VirtualMachineScaleSetSkuScaleType(str, Enum): + + automatic = "Automatic" + none = "None" + + +class UpgradeState(str, Enum): + + rolling_forward = "RollingForward" + cancelled = "Cancelled" + completed = "Completed" + faulted = "Faulted" + + +class UpgradeOperationInvoker(str, Enum): + + unknown = "Unknown" + user = "User" + platform = "Platform" + + +class RollingUpgradeStatusCode(str, Enum): + + rolling_forward = "RollingForward" + cancelled = "Cancelled" + completed = "Completed" + faulted = "Faulted" + + +class RollingUpgradeActionType(str, Enum): + + start = "Start" + cancel = "Cancel" + + +class IntervalInMins(str, Enum): + + three_mins = "ThreeMins" + five_mins = "FiveMins" + thirty_mins = "ThirtyMins" + sixty_mins = "SixtyMins" + + +class InstanceViewTypes(str, Enum): + + instance_view = "instanceView" diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py new file mode 100644 index 000000000000..525ef3bbb69a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.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 ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py new file mode 100644 index 000000000000..7b802139f000 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_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 ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py new file mode 100644 index 000000000000..3c4388f312b9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_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 ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py new file mode 100644 index 000000000000..be9739d3e8a9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py new file mode 100644 index 000000000000..b5dbfcefb472 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.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 DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py new file mode 100644 index 000000000000..8431a3988502 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_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 DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py new file mode 100644 index 000000000000..637bb1715329 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py new file mode 100644 index 000000000000..d1db1b00d086 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.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 DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

You can easily view the output of your console log.

+ Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py new file mode 100644 index 000000000000..88736f6d39e8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_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 DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

You can easily view the output of your console log.

+ Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py new file mode 100644 index 000000000000..cb7d223e4101 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.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 DiffDiskSettings(Model): + """Describes the parameters of differencing disk settings that can be be + specified for operating system disk.

NOTE: The differencing disk + settings can only be specified for managed disk. + + :param option: Specifies the differencing disk settings for operating + system disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = kwargs.get('option', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py new file mode 100644 index 000000000000..6778335cd013 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_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 DiffDiskSettings(Model): + """Describes the parameters of differencing disk settings that can be be + specified for operating system disk.

NOTE: The differencing disk + settings can only be specified for managed disk. + + :param option: Specifies the differencing disk settings for operating + system disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, *, option=None, **kwargs) -> None: + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = option diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py new file mode 100644 index 000000000000..ab72449543a3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.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 DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py new file mode 100644 index 000000000000..b83ad0bd55b5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_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 DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py new file mode 100644 index 000000000000..c92baaa065b5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py new file mode 100644 index 000000000000..957f6f523588 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py new file mode 100644 index 000000000000..fca8e6a1903d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.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 msrest.serialization import Model + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

[List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

[List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

[List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py new file mode 100644 index 000000000000..cbf5d7ad221e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_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 msrest.serialization import Model + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

[List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

[List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

[List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py new file mode 100644 index 000000000000..1638dc9bb3d2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.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 .resource import Resource + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py new file mode 100644 index 000000000000..356dbb2e4744 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py new file mode 100644 index 000000000000..12804047ac55 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py new file mode 100644 index 000000000000..77d90b3235cc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

Possible values are:

**Windows**

**Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py new file mode 100644 index 000000000000..8e0895fbe37c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

Possible values are:

**Windows**

**Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py new file mode 100644 index 000000000000..e3c90bd5037d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_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 ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py new file mode 100644 index 000000000000..072d36c732c5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_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 .resource_py3 import Resource + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py new file mode 100644 index 000000000000..b8f929f4ad70 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.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 .sub_resource import SubResource + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py new file mode 100644 index 000000000000..1d7eefe5ac65 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_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 .sub_resource_py3 import SubResource + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py new file mode 100644 index 000000000000..57c1375376ef --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.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 ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py new file mode 100644 index 000000000000..dfe0f937a3c1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_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 ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py new file mode 100644 index 000000000000..985cbe380240 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.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 .update_resource import UpdateResource + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py new file mode 100644 index 000000000000..e1c19f487ae3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_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 .update_resource_py3 import UpdateResource + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py new file mode 100644 index 000000000000..6324249d7c19 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.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 InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py new file mode 100644 index 000000000000..ccec30d7b53f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_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 InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py new file mode 100644 index 000000000000..3498610092fc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py new file mode 100644 index 000000000000..7ff50d8e85d2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py new file mode 100644 index 000000000000..45187a0738f7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.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 KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py new file mode 100644 index 000000000000..ec9783b91054 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_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 KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py new file mode 100644 index 000000000000..6b6c69432141 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.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 KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py new file mode 100644 index 000000000000..fdd35e0c980e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_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 KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py new file mode 100644 index 000000000000..5ab938d7eab9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py new file mode 100644 index 000000000000..ccc388729085 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + self.provision_vm_agent = provision_vm_agent diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py new file mode 100644 index 000000000000..843b739a0328 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.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 LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py new file mode 100644 index 000000000000..b9420117a8ca --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_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 LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py new file mode 100644 index 000000000000..4e51d6b1965b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.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 LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py new file mode 100644 index 000000000000..8413e0c15bf4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_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 LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py new file mode 100644 index 000000000000..5ea1615011c3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.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 LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py new file mode 100644 index 000000000000..71a428a8e49a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_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 LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py new file mode 100644 index 000000000000..74ee05ce94d5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.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 MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py new file mode 100644 index 000000000000..97264ca9b7f4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_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 MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py new file mode 100644 index 000000000000..dc7f70b78e74 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_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 .sub_resource import SubResource + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py new file mode 100644 index 000000000000..94e2f26b2750 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_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 .sub_resource_py3 import SubResource + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py new file mode 100644 index 000000000000..b86e305e3f74 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.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 .sub_resource import SubResource + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py new file mode 100644 index 000000000000..47da29278832 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_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 .sub_resource_py3 import SubResource + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py new file mode 100644 index 000000000000..0431a7df1c0e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.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 NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py new file mode 100644 index 000000000000..bcd509f21769 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_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 NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py new file mode 100644 index 000000000000..a9e7d8e85813 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.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 msrest.serialization import Model + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

Possible values are:

**Windows** +

**Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the differencing Disk Settings for + the operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py new file mode 100644 index 000000000000..07173c618203 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.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 OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py new file mode 100644 index 000000000000..ba5cf0c5b95f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_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 OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py new file mode 100644 index 000000000000..aebde078072a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_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 msrest.serialization import Model + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

Possible values are:

**Windows** +

**Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the differencing Disk Settings for + the operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.diff_disk_settings = diff_disk_settings + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py new file mode 100644 index 000000000000..78ccf392da5c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.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 msrest.serialization import Model + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

**Max-length (Windows):** 15 characters

**Max-length + (Linux):** 64 characters.

For naming conventions and restrictions + see [Azure infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

**Windows-only restriction:** Cannot end in "."

+ **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 + character

**Max-length (Linux):** 64 characters

+ **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + self.allow_extension_operations = kwargs.get('allow_extension_operations', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py new file mode 100644 index 000000000000..a0b560dc3ea3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_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 msrest.serialization import Model + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    **Max-length (Windows):** 15 characters

    **Max-length + (Linux):** 64 characters.

    For naming conventions and restrictions + see [Azure infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + self.allow_extension_operations = allow_extension_operations diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py new file mode 100644 index 000000000000..d42b6b32cfac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.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 Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py new file mode 100644 index 000000000000..9cca2c78a123 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_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 Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py new file mode 100644 index 000000000000..2e1509addca6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py new file mode 100644 index 000000000000..26f7996f1633 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py new file mode 100644 index 000000000000..8dcbca604c7e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.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 RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py new file mode 100644 index 000000000000..5b24a0ed9b7a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_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 RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py new file mode 100644 index 000000000000..0cb61f808835 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.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 .log_analytics_input_base import LogAnalyticsInputBase + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py new file mode 100644 index 000000000000..8ba8eb54a475 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_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 .log_analytics_input_base_py3 import LogAnalyticsInputBase + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py new file mode 100644 index 000000000000..5dd7d481c685 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.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 Resource(Model): + """The Resource model definition. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py new file mode 100644 index 000000000000..2f3702caf609 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_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 Resource(Model): + """The Resource model definition. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py new file mode 100644 index 000000000000..eeb450eb3c45 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.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 RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py new file mode 100644 index 000000000000..df2ff74aec66 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_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 RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py new file mode 100644 index 000000000000..1eecaa5e2e65 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.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 RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py new file mode 100644 index 000000000000..e698a382f112 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_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 RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py new file mode 100644 index 000000000000..87e40590e275 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.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 RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py new file mode 100644 index 000000000000..060abc3063b4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_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 RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py new file mode 100644 index 000000000000..3421e9bad3f5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.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 RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py new file mode 100644 index 000000000000..20fad17e69e8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_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 RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py new file mode 100644 index 000000000000..e4f4c08df0a7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py new file mode 100644 index 000000000000..3ef830980bd0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py new file mode 100644 index 000000000000..9acf4c9f1065 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.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 .run_command_document_base import RunCommandDocumentBase + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py new file mode 100644 index 000000000000..10850d805bdb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.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 RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py new file mode 100644 index 000000000000..e7326920a725 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_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 RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py new file mode 100644 index 000000000000..5ebfc4b1047d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_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 RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py new file mode 100644 index 000000000000..542fe68b0822 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_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 .run_command_document_base_py3 import RunCommandDocumentBase + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py new file mode 100644 index 000000000000..046e30e1c051 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py new file mode 100644 index 000000000000..cd76ad81bfa2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py new file mode 100644 index 000000000000..6013f038a1c3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py new file mode 100644 index 000000000000..6de9afe96dab --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py new file mode 100644 index 000000000000..e09f774d8241 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.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 RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py new file mode 100644 index 000000000000..e5fbc708f965 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_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 RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py new file mode 100644 index 000000000000..7fe68e1ee376 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.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 RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py new file mode 100644 index 000000000000..4bf16cadc70e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_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 RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py new file mode 100644 index 000000000000..5c07709435e0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.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 Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py new file mode 100644 index 000000000000..f6bc74afaadc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_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 Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py new file mode 100644 index 000000000000..e7bae86b788f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.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 SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py new file mode 100644 index 000000000000..111c3078a072 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_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 SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py new file mode 100644 index 000000000000..122e0d3b9fdd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py new file mode 100644 index 000000000000..b16ee085b36b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py new file mode 100644 index 000000000000..f0597c929ed8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py new file mode 100644 index 000000000000..e3b5222965bb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py new file mode 100644 index 000000000000..11e092cc6ff5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.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 SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py new file mode 100644 index 000000000000..29e5afee38f9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_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 SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py new file mode 100644 index 000000000000..4a0ec466c0d4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.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 SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py new file mode 100644 index 000000000000..cb918e9a2ac6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_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 SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py new file mode 100644 index 000000000000..5eac2a5540ac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.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 .log_analytics_input_base import LogAnalyticsInputBase + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py new file mode 100644 index 000000000000..025900705375 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_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 .log_analytics_input_base_py3 import LogAnalyticsInputBase + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py new file mode 100644 index 000000000000..b1d2898ff082 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.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 UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py new file mode 100644 index 000000000000..c06c17c124d9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_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 UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py new file mode 100644 index 000000000000..1e74afabeca6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py new file mode 100644 index 000000000000..20f29bb6d2e5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_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 UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py new file mode 100644 index 000000000000..bf010a02fa9e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.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 UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VM's in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py new file mode 100644 index 000000000000..ff6b2ff63bf9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_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 UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VM's in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py new file mode 100644 index 000000000000..a2c412671913 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py new file mode 100644 index 000000000000..e1692f63e1ec --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.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 UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py new file mode 100644 index 000000000000..a485654a7f07 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_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 UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py new file mode 100644 index 000000000000..2b344fc92000 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.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 UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade_policy = kwargs.get('automatic_os_upgrade_policy', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py new file mode 100644 index 000000000000..dfb0346874f5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_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 UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade_policy = automatic_os_upgrade_policy diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py new file mode 100644 index 000000000000..1eb2b4100c20 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.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 Usage(Model): + """Describes Compute Resource Usage. + + 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 unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py new file mode 100644 index 000000000000..e2560936493e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_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 UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py new file mode 100644 index 000000000000..ad0b77459f75 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_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 UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :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(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py new file mode 100644 index 000000000000..9fd8883e112e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/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-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py new file mode 100644 index 000000000000..bfb4b0ea9c78 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_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 Usage(Model): + """Describes Compute Resource Usage. + + 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 unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py new file mode 100644 index 000000000000..b173def6f820 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.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 VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name .crt + for the X509 certificate file and .prv for private + key. Both of these files are .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py new file mode 100644 index 000000000000..eda5ba1c3f1d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_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 VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name .crt + for the X509 certificate file and .prv for private + key. Both of these files are .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py new file mode 100644 index 000000000000..430e51fd04c6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.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 VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py new file mode 100644 index 000000000000..915235165c12 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_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 VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py new file mode 100644 index 000000000000..5e3ad9dea7d4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.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 VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py new file mode 100644 index 000000000000..9c069b95f084 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_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 VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py new file mode 100644 index 000000000000..d66a901b1e76 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py @@ -0,0 +1,156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachine(Resource): + """Describes a Virtual Machine. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py new file mode 100644 index 000000000000..5f34d8af1c1a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py new file mode 100644 index 000000000000..24f44c45521e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py new file mode 100644 index 000000000000..4e6ffbea7a4f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_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 VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py new file mode 100644 index 000000000000..1866cdc23300 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_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 VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py new file mode 100644 index 000000000000..2972e1f2fcda --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.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 .sub_resource import SubResource + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py new file mode 100644 index 000000000000..09e8afde1591 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_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 .sub_resource_py3 import SubResource + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py new file mode 100644 index 000000000000..894a684f8e55 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.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 .resource import Resource + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py new file mode 100644 index 000000000000..e13a614f560b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.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 VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py new file mode 100644 index 000000000000..71211067b4e9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_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 VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py new file mode 100644 index 000000000000..7273e2b84754 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.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 .resource import Resource + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py new file mode 100644 index 000000000000..3d48c3a87fb0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_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 .resource_py3 import Resource + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py new file mode 100644 index 000000000000..f53500a5dcbe --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py new file mode 100644 index 000000000000..3c5896ce831d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py new file mode 100644 index 000000000000..48b6a1773a3b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_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 .resource_py3 import Resource + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py new file mode 100644 index 000000000000..b920ff57ff96 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.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 .update_resource import UpdateResource + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py new file mode 100644 index 000000000000..c32c18d32759 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_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 .update_resource_py3 import UpdateResource + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py new file mode 100644 index 000000000000..6a6546732af0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.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 VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py new file mode 100644 index 000000000000..a58776dab0cd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_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 VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py new file mode 100644 index 000000000000..ea6a76ff400a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.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 VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py new file mode 100644 index 000000000000..0f5c003506aa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_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 VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py new file mode 100644 index 000000000000..57ac63292cef --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.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 VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py new file mode 100644 index 000000000000..b66f9dc5e4e1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_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 VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py new file mode 100644 index 000000000000..8df9f5c86f49 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.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 VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py new file mode 100644 index 000000000000..0921bb643ccf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_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 VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py new file mode 100644 index 000000000000..c520d4d0417b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.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 .virtual_machine_image_resource import VirtualMachineImageResource + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py new file mode 100644 index 000000000000..18e7313d4cf4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_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 .virtual_machine_image_resource_py3 import VirtualMachineImageResource + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py new file mode 100644 index 000000000000..8807cc8f391b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.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 .sub_resource import SubResource + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py new file mode 100644 index 000000000000..b9d63a8bc9e0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_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 .sub_resource_py3 import SubResource + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py new file mode 100644 index 000000000000..e7607023c6a8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py new file mode 100644 index 000000000000..5d08ff052a7e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py new file mode 100644 index 000000000000..d18284dc47df --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_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 VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py new file mode 100644 index 000000000000..be5bd7af71e2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py @@ -0,0 +1,156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachine(Resource): + """Describes a Virtual Machine. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py new file mode 100644 index 000000000000..bf02801f4561 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force stictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py new file mode 100644 index 000000000000..6cbb2a72dc8a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.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 VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py new file mode 100644 index 000000000000..0c630fa79251 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_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 VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py new file mode 100644 index 000000000000..24a487547a2a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_read_only import SubResourceReadOnly + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py new file mode 100644 index 000000000000..247e13f74c21 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_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 VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py new file mode 100644 index 000000000000..611016ad56a3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.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 VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py new file mode 100644 index 000000000000..967b0d6657ce --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_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 VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py new file mode 100644 index 000000000000..27392a2de9fd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_read_only_py3 import SubResourceReadOnly + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py new file mode 100644 index 000000000000..18f709698a79 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.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 VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py new file mode 100644 index 000000000000..e390dce4feb3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_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 VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py new file mode 100644 index 000000000000..e362323ac96e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.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 VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py new file mode 100644 index 000000000000..2839c26040cc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_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 VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py new file mode 100644 index 000000000000..2c0af6103a77 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.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 VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py new file mode 100644 index 000000000000..6e22ddcdb86d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_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 VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py new file mode 100644 index 000000000000..164d1d6ca8b6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.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 VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py new file mode 100644 index 000000000000..47ed18bff23b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_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 VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py new file mode 100644 index 000000000000..758f5aa49d89 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.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 .sub_resource import SubResource + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py new file mode 100644 index 000000000000..7108bfece974 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_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 .sub_resource_py3 import SubResource + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py new file mode 100644 index 000000000000..36b70260d646 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.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 VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py new file mode 100644 index 000000000000..aaf788c9d772 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_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 VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py new file mode 100644 index 000000000000..328a08a19b7c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_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 VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py new file mode 100644 index 000000000000..d6ef426e05f9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_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 VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py new file mode 100644 index 000000000000..8ce739305c35 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.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 .sub_resource import SubResource + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py new file mode 100644 index 000000000000..04e1c619383f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.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 VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py new file mode 100644 index 000000000000..5607f74d3c6a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_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 VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py new file mode 100644 index 000000000000..ffc2b196eb68 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_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 .sub_resource_py3 import SubResource + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py new file mode 100644 index 000000000000..cbfade34bb3c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.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 VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py new file mode 100644 index 000000000000..521872c86f5a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_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 VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py new file mode 100644 index 000000000000..253a1d87f90f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the differencing Disk Settings for + the operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py new file mode 100644 index 000000000000..ce5cc3da79b4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the differencing Disk Settings for + the operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.diff_disk_settings = diff_disk_settings + self.disk_size_gb = disk_size_gb + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py new file mode 100644 index 000000000000..f1682daccc25 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.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 msrest.serialization import Model + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py new file mode 100644 index 000000000000..d60486034c60 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_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 msrest.serialization import Model + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py new file mode 100644 index 000000000000..b4193df0b191 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_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 VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py new file mode 100644 index 000000000000..f7a13f10c6dc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.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 VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py new file mode 100644 index 000000000000..2fe562244372 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.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 VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py new file mode 100644 index 000000000000..326a36708ff4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_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 VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..23a034d99222 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_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 VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + self.ip_tags = ip_tags + self.public_ip_prefix = public_ip_prefix diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py new file mode 100644 index 000000000000..1db294839a1b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force stictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.identity = identity + self.zones = zones diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py new file mode 100644 index 000000000000..6c34f548e1b2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.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 VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py new file mode 100644 index 000000000000..beff389a7661 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.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 VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py new file mode 100644 index 000000000000..73d117928751 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_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 VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py new file mode 100644 index 000000000000..33c53d2a8b04 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_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 VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py new file mode 100644 index 000000000000..be42b347d30a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_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 VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py new file mode 100644 index 000000000000..ea246c181c1a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.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 VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py new file mode 100644 index 000000000000..cacd54634f88 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_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 VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py new file mode 100644 index 000000000000..8478dbfd9e7e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.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 .update_resource import UpdateResource + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py new file mode 100644 index 000000000000..8f58b50c381e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource import SubResource + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py new file mode 100644 index 000000000000..c3afa2576eb8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_resource_py3 import SubResource + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py new file mode 100644 index 000000000000..21b8d35411da --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.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 .sub_resource import SubResource + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py new file mode 100644 index 000000000000..0c829e7f5862 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_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 .sub_resource_py3 import SubResource + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py new file mode 100644 index 000000000000..0a501bd3bd66 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.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 VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py new file mode 100644 index 000000000000..f07f067eca34 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_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 VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py new file mode 100644 index 000000000000..72edd81b4cab --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.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 VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py new file mode 100644 index 000000000000..580aa65b9d5d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_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 VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.disk_size_gb = disk_size_gb + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py new file mode 100644 index 000000000000..64c4844a9e47 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.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 VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py new file mode 100644 index 000000000000..feba5c831a3d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_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 VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py new file mode 100644 index 000000000000..8a8da382c4ba --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..b48f6adae4da --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py new file mode 100644 index 000000000000..0e4ae72fbf76 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_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 .update_resource_py3 import UpdateResource + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py new file mode 100644 index 000000000000..d7f23cbadc74 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py new file mode 100644 index 000000000000..eec6f04a730e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py new file mode 100644 index 000000000000..7a8bd8cd4ff9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.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 VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py new file mode 100644 index 000000000000..474a3738141f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_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 VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py new file mode 100644 index 000000000000..2c75a6bbc10d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + self.zones = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py new file mode 100644 index 000000000000..aa15752c3e96 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.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 VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py new file mode 100644 index 000000000000..35fd5aeefda9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_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 VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py new file mode 100644 index 000000000000..772c66dad326 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.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 VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py new file mode 100644 index 000000000000..658a8ccb87d5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_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 VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py new file mode 100644 index 000000000000..ece250dd4fd4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.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 VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py new file mode 100644 index 000000000000..f32c6181467d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_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 VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py new file mode 100644 index 000000000000..e285f498ac59 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py new file mode 100644 index 000000000000..0eb4b0c95ebb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py new file mode 100644 index 000000000000..e1f19a79375e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_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 VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py new file mode 100644 index 000000000000..53a6384c704f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py new file mode 100644 index 000000000000..f1d9ddca44cd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, additional_capabilities=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py new file mode 100644 index 000000000000..df9890e67f4b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + 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 id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + self.zones = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py new file mode 100644 index 000000000000..0fef3efd6c8e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.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 VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py new file mode 100644 index 000000000000..d991dc65cd02 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_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 VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py new file mode 100644 index 000000000000..9f99ba20ce42 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_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 VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py new file mode 100644 index 000000000000..7df7b702acd7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.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 VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py new file mode 100644 index 000000000000..c38800073a95 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_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 VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py new file mode 100644 index 000000000000..c9c69cb1cb0e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py new file mode 100644 index 000000000000..8717d9cf3f0d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintainance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py new file mode 100644 index 000000000000..b72210839859 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.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 WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py new file mode 100644 index 000000000000..7ee36d3a256e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_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 WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py new file mode 100644 index 000000000000..b70455d84f62 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.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 WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py new file mode 100644 index 000000000000..6f788d7a46c3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_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 WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py new file mode 100644 index 000000000000..e32c345c11c4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.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 WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py new file mode 100644 index 000000000000..f6e91dc1a014 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_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 WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py new file mode 100644 index 000000000000..6902a94c1597 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .availability_sets_operations import AvailabilitySetsOperations +from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from .virtual_machine_images_operations import VirtualMachineImagesOperations +from .usage_operations import UsageOperations +from .virtual_machines_operations import VirtualMachinesOperations +from .virtual_machine_sizes_operations import VirtualMachineSizesOperations +from .images_operations import ImagesOperations +from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from .log_analytics_operations import LogAnalyticsOperations +from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations + +__all__ = [ + 'Operations', + 'AvailabilitySetsOperations', + 'VirtualMachineExtensionImagesOperations', + 'VirtualMachineExtensionsOperations', + 'VirtualMachineImagesOperations', + 'UsageOperations', + 'VirtualMachinesOperations', + 'VirtualMachineSizesOperations', + 'ImagesOperations', + 'VirtualMachineScaleSetsOperations', + 'VirtualMachineScaleSetExtensionsOperations', + 'VirtualMachineScaleSetRollingUpgradesOperations', + 'VirtualMachineScaleSetVMsOperations', + 'LogAnalyticsOperations', + 'VirtualMachineRunCommandsOperations', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py new file mode 100644 index 000000000000..3617327b05fa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py @@ -0,0 +1,495 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 AvailabilitySetsOperations(object): + """AvailabilitySetsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet + :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: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_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, 'AvailabilitySet') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', 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.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetUpdate + :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: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_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, 'AvailabilitySetUpdate') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_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:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_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: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a 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 AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the 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 AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_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') + + 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.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_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 VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_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.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py new file mode 100644 index 000000000000..b9741edb48bd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py @@ -0,0 +1,522 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 ImagesOperations(object): + """ImagesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_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'), + 'imageName': self._serialize.url("image_name", image_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, 'Image') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2018_10_01.models.Image + :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 Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', 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.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_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, 'ImageUpdate') + + # 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, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2018_10_01.models.ImageUpdate + :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 Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: 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: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the 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 Image + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] + :raises: :class:`CloudError` + """ + 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'), + '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.ImagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ImagePaged(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.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Images in the subscription. Use nextLink property in + the response to get the next page of Images. Do this till nextLink is + null to fetch all the Images. + + :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 Image + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] + :raises: :class:`CloudError` + """ + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py new file mode 100644 index 000000000000..f9a6ce85c0a9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py @@ -0,0 +1,242 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 LogAnalyticsOperations(object): + """LogAnalyticsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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') + + # 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, 'RequestRateByIntervalInput') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: 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 + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', 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, lro_options={'final-state-via': 'azure-async-operation'}, **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) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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') + + # 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, 'ThrottledRequestsInput') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: 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 + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', 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, lro_options={'final-state-via': 'azure-async-operation'}, **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) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py new file mode 100644 index 000000000000..221365ebd88b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/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 msrestazure.azure_exceptions import CloudError + +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: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute 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 ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py new file mode 100644 index 000000000000..6be160e988ba --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: 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.compute.v2018_10_01.models.UsagePaged[~azure.mgmt.compute.v2018_10_01.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..6f64e21be833 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py @@ -0,0 +1,248 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: 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: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, '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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: 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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", 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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..79399d26fe53 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py @@ -0,0 +1,479 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_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'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_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(extension_parameters, 'VirtualMachineExtension') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension + :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 VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', 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.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_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(extension_parameters, 'VirtualMachineExtensionUpdate') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionUpdate + :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 VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: 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: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def list( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: 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: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py new file mode 100644 index 000000000000..5e79b774c90e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py @@ -0,0 +1,383 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: 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: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, '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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: 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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, '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 top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: 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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, '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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: 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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, '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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..506264ff88d9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: 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 RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_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: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..421713e2d4c5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,377 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_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'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_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(extension_parameters, 'VirtualMachineScaleSetExtension') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension + :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 + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: 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: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_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 VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..9f7d82a51d23 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_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 msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a rolling upgrade to move all virtual machine scale set + instances to the latest available Platform Image OS version. Instances + which are already running the latest available OS version are not + affected. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + + def _start_extension_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_extension_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_extension_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a rolling upgrade to move all extensions for all virtual machine + scale set instances to the latest available extension version. + Instances which are already running the latest extension versions are + not affected. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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:`CloudError` + """ + raw_result = self._start_extension_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..d8b6638b82fe --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1226 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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, 'VirtualMachineScaleSetVM') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM + :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 + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_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: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_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: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: 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 VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_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 select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, '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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: 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:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_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, 'RunCommandInput') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput + :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 RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', 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, lro_options={'final-state-via': 'location'}, **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) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..904d18441eec --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py @@ -0,0 +1,1750 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_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'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 'VirtualMachineScaleSet') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet + :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 VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', 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.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 'VirtualMachineScaleSetUpdate') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdate + :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 VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the 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 VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_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') + + 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.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM Scale Sets in the subscription, regardless of the + associated resource group. Use nextLink property in the response to get + the next page of VM Scale Sets. Do this till nextLink is null to fetch + all the VM Scale Sets. + + :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 VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_all.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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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 VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_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 + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Perform maintenance on one or more virtual machines in a VM scale set. + Operation on instances which are not eligible for perform maintenance + will be failed. Please refer to best practices for more details: + https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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['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 vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[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:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :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: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_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') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..9c8970331776 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """This API is deprecated. Use [Resources + Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: 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 VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py new file mode 100644 index 000000000000..009c54f350e3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py @@ -0,0 +1,1551 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 VirtualMachinesOperations(object): + """VirtualMachinesOperations 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-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: 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 VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 'VirtualMachineCaptureParameters') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureParameters + :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 + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', 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, lro_options={'final-state-via': 'location'}, **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) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_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'), + 'vmName': self._serialize.url("vm_name", vm_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, 'VirtualMachine') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine + :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 VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', 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.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 'VirtualMachineUpdate') + + # 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, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineUpdate + :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 VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2018_10_01.models.InstanceViewTypes + :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: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the 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 VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_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') + + 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.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified subscription. Use + the nextLink property in the response to get the next page of virtual + machines. + + :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 VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_all.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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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 VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_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:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + 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) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_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, 'RunCommandInput') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput + :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 RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', 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, lro_options={'final-state-via': 'location'}, **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) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/version.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/version.py new file mode 100644 index 000000000000..ddb74deab6d6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/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 = "2018-10-01" +