azure_mgmt_compute 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/2015-06-15/generated/azure_mgmt_compute.rb +131 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/availability_sets.rb +495 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +163 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/additional_unattend_content.rb +87 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/api_error.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/api_error_base.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/availability_set.rb +137 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/availability_set_list_result.rb +1 -1
- data/lib/{generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb → 2015-06-15/generated/azure_mgmt_compute/models/boot_diagnostics.rb} +11 -12
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/data_disk.rb +114 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/data_disk_image.rb +47 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/diagnostics_profile.rb +47 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +69 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/disk_instance_view.rb +62 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/hardware_profile.rb +58 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/image_reference.rb +76 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/inner_error.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/instance_view_status.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/instance_view_types.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +56 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/key_vault_secret_reference.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/linux_configuration.rb +56 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/list_usages_result.rb +84 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/network_interface_reference.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/network_profile.rb +54 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/operation_status_response.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/osdisk.rb +127 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/osdisk_image.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/osprofile.rb +119 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/plan.rb +74 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/purchase_plan.rb +65 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/resource.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/sku.rb +64 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/ssh_configuration.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/ssh_public_key.rb +59 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/storage_profile.rb +74 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/sub_resource.rb +44 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/upgrade_mode.rb +16 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/upgrade_policy.rb +46 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/usage.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/usage_name.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/vault_certificate.rb +57 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/vault_secret_group.rb +65 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +45 -0
- data/lib/{generated/azure_mgmt_compute/models/container_service.rb → 2015-06-15/generated/azure_mgmt_compute/models/virtual_machine.rb} +93 -69
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +175 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +67 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_extension_image.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +101 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_image.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +78 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +142 -0
- data/lib/{generated/azure_mgmt_compute/models/container_service_list_result.rb → 2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb} +13 -13
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +134 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +124 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +98 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +85 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +86 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +98 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +82 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +53 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +111 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +116 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +70 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +56 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +247 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +51 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +142 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +85 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +82 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_size.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +1 -1
- data/lib/{generated/azure_mgmt_compute/models/container_service_vmsize_types.rb → 2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb} +13 -8
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/models/win_rmconfiguration.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/win_rmlistener.rb +57 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/models/windows_configuration.rb +99 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/usage_operations.rb +5 -5
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/version.rb +2 -2
- data/lib/2015-06-15/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +347 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/virtual_machine_extensions.rb +14 -14
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/virtual_machine_images.rb +12 -12
- data/lib/2015-06-15/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +1285 -0
- data/lib/2015-06-15/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +2182 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_compute/virtual_machine_sizes.rb +4 -4
- data/lib/2015-06-15/generated/azure_mgmt_compute/virtual_machines.rb +1839 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute.rb +134 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/availability_sets.rb +495 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +163 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/additional_unattend_content.rb +87 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/api_entity_reference.rb +45 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/api_error.rb +93 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/api_error_base.rb +64 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/availability_set.rb +137 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/availability_set_list_result.rb +52 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/boot_diagnostics.rb +56 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +54 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/component_names.rb +15 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +44 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/data_disk.rb +114 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/data_disk_image.rb +47 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/diagnostics_profile.rb +47 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +69 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/disk_instance_view.rb +62 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/hardware_profile.rb +61 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/image_reference.rb +76 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/inner_error.rb +54 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/instance_view_status.rb +87 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +56 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +56 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/linux_configuration.rb +56 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/list_usages_result.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/network_interface_reference.rb +52 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/network_profile.rb +54 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/operation_status_response.rb +90 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/osdisk.rb +127 -0
- data/lib/{generated/azure_mgmt_compute/models/container_service_custom_profile.rb → 2016-03-30/generated/azure_mgmt_compute/models/osdisk_image.rb} +13 -11
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/osprofile.rb +119 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/plan.rb +74 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/purchase_plan.rb +65 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/resource.rb +94 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/resource_identity_type.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/sku.rb +64 -0
- data/lib/{generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb → 2016-03-30/generated/azure_mgmt_compute/models/ssh_configuration.rb} +11 -11
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/ssh_public_key.rb +59 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/storage_profile.rb +74 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/sub_resource.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/upgrade_mode.rb +16 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb +46 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/usage.rb +78 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/usage_name.rb +54 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/vault_certificate.rb +57 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/vault_secret_group.rb +65 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +45 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine.rb +239 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +81 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +65 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +51 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +175 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +67 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +134 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +101 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_identity.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_image.rb +109 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +78 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +142 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_list_result.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +147 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +124 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +53 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +85 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +56 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +117 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +82 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +53 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +111 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +116 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +70 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +80 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +56 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +259 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +66 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +51 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +52 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +142 -0
- data/lib/{generated → 2016-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +82 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_size.rb +99 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +52 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +77 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +58 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +53 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/win_rmlistener.rb +57 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/models/windows_configuration.rb +99 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/usage_operations.rb +234 -0
- data/lib/{generated/azure_mgmt_compute/module_definition.rb → 2016-03-30/generated/azure_mgmt_compute/version.rb} +3 -3
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +347 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_extensions.rb +444 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_images.rb +577 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +1285 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +2182 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_sizes.rb +115 -0
- data/lib/2016-03-30/generated/azure_mgmt_compute/virtual_machines.rb +1839 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute.rb +165 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/availability_sets.rb +495 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +175 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/disks.rb +1272 -0
- data/lib/{generated/azure_mgmt_compute/container_services.rb → 2016-04-30-preview/generated/azure_mgmt_compute/images.rb} +235 -347
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/access_level.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/access_uri.rb +45 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/additional_unattend_content.rb +87 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/api_entity_reference.rb +45 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/api_error.rb +93 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/api_error_base.rb +64 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/availability_set.rb +158 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/availability_set_list_result.rb +52 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/boot_diagnostics.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +54 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/component_names.rb +15 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +44 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/creation_data.rb +94 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/data_disk.rb +125 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/data_disk_image.rb +47 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/diagnostics_profile.rb +47 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk.rb +174 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_create_option.rb +20 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +69 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_instance_view.rb +62 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_list.rb +95 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/disk_update.rb +109 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/encryption_settings.rb +72 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/grant_access_data.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/hardware_profile.rb +61 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image.rb +113 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_data_disk.rb +99 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_disk_reference.rb +57 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_list_result.rb +95 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_osdisk.rb +113 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_reference.rb +83 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/image_storage_profile.rb +63 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/inner_error.rb +54 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/instance_view_status.rb +87 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +57 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/linux_configuration.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/list_usages_result.rb +96 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +53 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/network_interface_reference.rb +52 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/network_profile.rb +54 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/operation_status_response.rb +90 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/osdisk.rb +138 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/osdisk_image.rb +46 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/osprofile.rb +119 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/plan.rb +74 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/purchase_plan.rb +65 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/resource.rb +94 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/resource_identity_type.rb +15 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/resource_update.rb +51 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/sku.rb +64 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/snapshot.rb +174 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/snapshot_list.rb +95 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/snapshot_update.rb +109 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/source_vault.rb +45 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/ssh_configuration.rb +53 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/ssh_public_key.rb +59 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/storage_account_types.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/storage_profile.rb +74 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/sub_resource.rb +45 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +46 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/upgrade_mode.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/upgrade_policy.rb +46 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/usage.rb +78 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/usage_name.rb +54 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/vault_certificate.rb +57 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/vault_secret_group.rb +65 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +45 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine.rb +239 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +81 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +65 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +51 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +175 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +67 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +134 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +101 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +70 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_image.rb +109 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +78 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +142 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +95 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +170 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +101 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +125 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +53 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +72 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +85 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +56 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +117 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +96 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +97 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +98 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +47 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +82 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +53 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +123 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +116 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +70 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +80 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +74 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +259 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +66 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +51 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +52 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +153 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +97 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +82 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_size.rb +99 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +52 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +77 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +58 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +53 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/win_rmlistener.rb +57 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/windows_configuration.rb +99 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/snapshots.rb +1272 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/usage_operations.rb +234 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/version.rb +8 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +347 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_extensions.rb +444 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_images.rb +577 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +1432 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +2323 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_sizes.rb +115 -0
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb +1976 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute.rb +210 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/availability_sets.rb +18 -18
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/compute_management_client.rb +7 -7
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/disks.rb +38 -38
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/images.rb +23 -23
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/access_level.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/access_uri.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/api_entity_reference.rb +45 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/api_error.rb +93 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/api_error_base.rb +64 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/availability_set.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/availability_set_list_result.rb +52 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/boot_diagnostics.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +54 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/component_names.rb +15 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +44 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/creation_data.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/data_disk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/data_disk_image.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/diagnostics_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_create_option.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_encryption_settings.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_instance_view.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_list.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_sku.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/disk_update.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/encryption_settings.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/grant_access_data.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/hardware_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_data_disk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_disk_reference.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_list_result.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_osdisk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_reference.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/image_storage_profile.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/inner_error.rb +54 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/instance_view_status.rb +87 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/ipversion.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/key_vault_and_key_reference.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/key_vault_key_reference.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +56 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/linux_configuration.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/list_usages_result.rb +96 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/maintenance_redeploy_status.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/managed_disk_parameters.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/network_interface_reference.rb +52 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/network_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/operating_system_state_types.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/operation_status_response.rb +90 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/osdisk.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/osdisk_image.rb +46 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/osprofile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/plan.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/purchase_plan.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/resource.rb +94 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/resource_identity_type.rb +15 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_capabilities.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_capacity.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_costs.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_restrictions.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_sku_restrictions_type.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_skus_result.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/resource_update.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_policy.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_document.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_document_base.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_input.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_input_parameter.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_list_result.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_parameter_definition.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/run_command_result.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/sku.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/snapshot.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/snapshot_list.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/snapshot_update.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/source_vault.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/ssh_configuration.rb +53 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/storage_account_types.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/storage_profile.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/sub_resource.rb +45 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/sub_resource_read_only.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/update_resource.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/usage.rb +78 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/usage_name.rb +54 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/vault_certificate.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/vault_secret_group.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +81 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +65 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +51 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +134 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_health_status.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +70 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_image.rb +109 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_image_resource.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_instance_view.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +95 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +53 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +72 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +85 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +56 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +96 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +97 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +98 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +80 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +66 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +52 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +97 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_size.rb +99 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +52 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/virtual_machine_size_types.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +58 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +53 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/win_rmlistener.rb +1 -1
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/models/windows_configuration.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/resource_skus.rb +6 -6
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/snapshots.rb +38 -38
- data/lib/2017-03-30/generated/azure_mgmt_compute/usage_operations.rb +234 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/version.rb +8 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_extension_images.rb +9 -9
- data/lib/2017-03-30/generated/azure_mgmt_compute/virtual_machine_extensions.rb +444 -0
- data/lib/2017-03-30/generated/azure_mgmt_compute/virtual_machine_images.rb +577 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_run_commands.rb +9 -9
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +19 -19
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +13 -13
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +40 -40
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machine_scale_sets.rb +75 -75
- data/lib/2017-03-30/generated/azure_mgmt_compute/virtual_machine_sizes.rb +115 -0
- data/lib/{generated → 2017-03-30/generated}/azure_mgmt_compute/virtual_machines.rb +70 -70
- data/lib/azure_mgmt_compute.rb +6 -1
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/common/configurable.rb +73 -0
- data/lib/profiles/common/default.rb +68 -0
- data/lib/profiles/latest/compute_latest_profile_client.rb +33 -0
- data/lib/profiles/latest/compute_module_definition.rb +9 -0
- data/lib/profiles/latest/modules/compute_profile_module.rb +740 -0
- data/lib/profiles/v2017_03_09/compute_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/compute_v2017_03_09_profile_client.rb +33 -0
- data/lib/profiles/v2017_03_09/modules/compute_profile_module.rb +450 -0
- data/lib/version.rb +7 -0
- metadata +560 -205
- data/lib/generated/azure_mgmt_compute.rb +0 -226
- data/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +0 -107
- data/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +0 -47
- data/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +0 -59
- data/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb +0 -68
- data/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb +0 -48
- data/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb +0 -18
- data/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb +0 -56
- data/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb +0 -46
- data/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +0 -60
@@ -3,7 +3,7 @@
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
|
-
module Azure::
|
6
|
+
module Azure::Compute::Mgmt::V2015_06_15
|
7
7
|
#
|
8
8
|
# Compute Client
|
9
9
|
#
|
@@ -62,7 +62,7 @@ module Azure::ARM::Compute
|
|
62
62
|
#
|
63
63
|
def list_async(location, custom_headers = nil)
|
64
64
|
fail ArgumentError, 'location is nil' if location.nil?
|
65
|
-
api_version
|
65
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
66
66
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
67
67
|
|
68
68
|
|
@@ -78,7 +78,7 @@ module Azure::ARM::Compute
|
|
78
78
|
options = {
|
79
79
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
80
80
|
path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
|
81
|
-
query_params: {'api-version' => api_version},
|
81
|
+
query_params: {'api-version' => @client.api_version},
|
82
82
|
headers: request_headers.merge(custom_headers || {}),
|
83
83
|
base_url: request_url
|
84
84
|
}
|
@@ -98,7 +98,7 @@ module Azure::ARM::Compute
|
|
98
98
|
if status_code == 200
|
99
99
|
begin
|
100
100
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
101
|
-
result_mapper = Azure::
|
101
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineSizeListResult.mapper()
|
102
102
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
103
103
|
rescue Exception => e
|
104
104
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -0,0 +1,1839 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Compute::Mgmt::V2015_06_15
|
7
|
+
#
|
8
|
+
# Compute Client
|
9
|
+
#
|
10
|
+
class VirtualMachines
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the VirtualMachines class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ComputeManagementClient] reference to the ComputeManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Captures the VM by copying virtual hard disks of the VM and outputs a
|
26
|
+
# template that can be used to create similar VMs.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] The name of the resource group.
|
29
|
+
# @param vm_name [String] The name of the virtual machine.
|
30
|
+
# @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
|
31
|
+
# the Capture Virtual Machine operation.
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [VirtualMachineCaptureResult] operation results.
|
36
|
+
#
|
37
|
+
def capture(resource_group_name, vm_name, parameters, custom_headers = nil)
|
38
|
+
response = capture_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] The name of the resource group.
|
44
|
+
# @param vm_name [String] The name of the virtual machine.
|
45
|
+
# @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
|
46
|
+
# the Capture Virtual Machine operation.
|
47
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
48
|
+
# will be added to the HTTP request.
|
49
|
+
#
|
50
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
51
|
+
# response.
|
52
|
+
#
|
53
|
+
def capture_async(resource_group_name, vm_name, parameters, custom_headers = nil)
|
54
|
+
# Send request
|
55
|
+
promise = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers)
|
56
|
+
|
57
|
+
promise = promise.then do |response|
|
58
|
+
# Defining deserialization method.
|
59
|
+
deserialize_method = lambda do |parsed_response|
|
60
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineCaptureResult.mapper()
|
61
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Waiting for response.
|
65
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
66
|
+
end
|
67
|
+
|
68
|
+
promise
|
69
|
+
end
|
70
|
+
|
71
|
+
#
|
72
|
+
# The operation to create or update a virtual machine.
|
73
|
+
#
|
74
|
+
# @param resource_group_name [String] The name of the resource group.
|
75
|
+
# @param vm_name [String] The name of the virtual machine.
|
76
|
+
# @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
|
77
|
+
# Machine operation.
|
78
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
79
|
+
# will be added to the HTTP request.
|
80
|
+
#
|
81
|
+
# @return [VirtualMachine] operation results.
|
82
|
+
#
|
83
|
+
def create_or_update(resource_group_name, vm_name, parameters, custom_headers = nil)
|
84
|
+
response = create_or_update_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
85
|
+
response.body unless response.nil?
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# @param resource_group_name [String] The name of the resource group.
|
90
|
+
# @param vm_name [String] The name of the virtual machine.
|
91
|
+
# @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
|
92
|
+
# Machine operation.
|
93
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
94
|
+
# will be added to the HTTP request.
|
95
|
+
#
|
96
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
97
|
+
# response.
|
98
|
+
#
|
99
|
+
def create_or_update_async(resource_group_name, vm_name, parameters, custom_headers = nil)
|
100
|
+
# Send request
|
101
|
+
promise = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers)
|
102
|
+
|
103
|
+
promise = promise.then do |response|
|
104
|
+
# Defining deserialization method.
|
105
|
+
deserialize_method = lambda do |parsed_response|
|
106
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachine.mapper()
|
107
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Waiting for response.
|
111
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
112
|
+
end
|
113
|
+
|
114
|
+
promise
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# The operation to delete a virtual machine.
|
119
|
+
#
|
120
|
+
# @param resource_group_name [String] The name of the resource group.
|
121
|
+
# @param vm_name [String] The name of the virtual machine.
|
122
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
123
|
+
# will be added to the HTTP request.
|
124
|
+
#
|
125
|
+
# @return [OperationStatusResponse] operation results.
|
126
|
+
#
|
127
|
+
def delete(resource_group_name, vm_name, custom_headers = nil)
|
128
|
+
response = delete_async(resource_group_name, vm_name, custom_headers).value!
|
129
|
+
response.body unless response.nil?
|
130
|
+
end
|
131
|
+
|
132
|
+
#
|
133
|
+
# @param resource_group_name [String] The name of the resource group.
|
134
|
+
# @param vm_name [String] The name of the virtual machine.
|
135
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
136
|
+
# will be added to the HTTP request.
|
137
|
+
#
|
138
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
139
|
+
# response.
|
140
|
+
#
|
141
|
+
def delete_async(resource_group_name, vm_name, custom_headers = nil)
|
142
|
+
# Send request
|
143
|
+
promise = begin_delete_async(resource_group_name, vm_name, custom_headers)
|
144
|
+
|
145
|
+
promise = promise.then do |response|
|
146
|
+
# Defining deserialization method.
|
147
|
+
deserialize_method = lambda do |parsed_response|
|
148
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
149
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
150
|
+
end
|
151
|
+
|
152
|
+
# Waiting for response.
|
153
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
154
|
+
end
|
155
|
+
|
156
|
+
promise
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Retrieves information about the model view or the instance view of a virtual
|
161
|
+
# machine.
|
162
|
+
#
|
163
|
+
# @param resource_group_name [String] The name of the resource group.
|
164
|
+
# @param vm_name [String] The name of the virtual machine.
|
165
|
+
# @param expand [InstanceViewTypes] The expand expression to apply on the
|
166
|
+
# operation. Possible values include: 'instanceView'
|
167
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
168
|
+
# will be added to the HTTP request.
|
169
|
+
#
|
170
|
+
# @return [VirtualMachine] operation results.
|
171
|
+
#
|
172
|
+
def get(resource_group_name, vm_name, expand = nil, custom_headers = nil)
|
173
|
+
response = get_async(resource_group_name, vm_name, expand, custom_headers).value!
|
174
|
+
response.body unless response.nil?
|
175
|
+
end
|
176
|
+
|
177
|
+
#
|
178
|
+
# Retrieves information about the model view or the instance view of a virtual
|
179
|
+
# machine.
|
180
|
+
#
|
181
|
+
# @param resource_group_name [String] The name of the resource group.
|
182
|
+
# @param vm_name [String] The name of the virtual machine.
|
183
|
+
# @param expand [InstanceViewTypes] The expand expression to apply on the
|
184
|
+
# operation. Possible values include: 'instanceView'
|
185
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
186
|
+
# will be added to the HTTP request.
|
187
|
+
#
|
188
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
189
|
+
#
|
190
|
+
def get_with_http_info(resource_group_name, vm_name, expand = nil, custom_headers = nil)
|
191
|
+
get_async(resource_group_name, vm_name, expand, custom_headers).value!
|
192
|
+
end
|
193
|
+
|
194
|
+
#
|
195
|
+
# Retrieves information about the model view or the instance view of a virtual
|
196
|
+
# machine.
|
197
|
+
#
|
198
|
+
# @param resource_group_name [String] The name of the resource group.
|
199
|
+
# @param vm_name [String] The name of the virtual machine.
|
200
|
+
# @param expand [InstanceViewTypes] The expand expression to apply on the
|
201
|
+
# operation. Possible values include: 'instanceView'
|
202
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
203
|
+
# to the HTTP request.
|
204
|
+
#
|
205
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
206
|
+
#
|
207
|
+
def get_async(resource_group_name, vm_name, expand = nil, custom_headers = nil)
|
208
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
209
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
210
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
211
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
212
|
+
|
213
|
+
|
214
|
+
request_headers = {}
|
215
|
+
|
216
|
+
# Set Headers
|
217
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
218
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
219
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
|
220
|
+
|
221
|
+
request_url = @base_url || @client.base_url
|
222
|
+
|
223
|
+
options = {
|
224
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
225
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
226
|
+
query_params: {'$expand' => expand,'api-version' => @client.api_version},
|
227
|
+
headers: request_headers.merge(custom_headers || {}),
|
228
|
+
base_url: request_url
|
229
|
+
}
|
230
|
+
promise = @client.make_request_async(:get, path_template, options)
|
231
|
+
|
232
|
+
promise = promise.then do |result|
|
233
|
+
http_response = result.response
|
234
|
+
status_code = http_response.status
|
235
|
+
response_content = http_response.body
|
236
|
+
unless status_code == 200
|
237
|
+
error_model = JSON.load(response_content)
|
238
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
239
|
+
end
|
240
|
+
|
241
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
242
|
+
# Deserialize Response
|
243
|
+
if status_code == 200
|
244
|
+
begin
|
245
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
246
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachine.mapper()
|
247
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
248
|
+
rescue Exception => e
|
249
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
result
|
254
|
+
end
|
255
|
+
|
256
|
+
promise.execute
|
257
|
+
end
|
258
|
+
|
259
|
+
#
|
260
|
+
# Shuts down the virtual machine and releases the compute resources. You are
|
261
|
+
# not billed for the compute resources that this virtual machine uses.
|
262
|
+
#
|
263
|
+
# @param resource_group_name [String] The name of the resource group.
|
264
|
+
# @param vm_name [String] The name of the virtual machine.
|
265
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
266
|
+
# will be added to the HTTP request.
|
267
|
+
#
|
268
|
+
# @return [OperationStatusResponse] operation results.
|
269
|
+
#
|
270
|
+
def deallocate(resource_group_name, vm_name, custom_headers = nil)
|
271
|
+
response = deallocate_async(resource_group_name, vm_name, custom_headers).value!
|
272
|
+
response.body unless response.nil?
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# @param resource_group_name [String] The name of the resource group.
|
277
|
+
# @param vm_name [String] The name of the virtual machine.
|
278
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
279
|
+
# will be added to the HTTP request.
|
280
|
+
#
|
281
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
282
|
+
# response.
|
283
|
+
#
|
284
|
+
def deallocate_async(resource_group_name, vm_name, custom_headers = nil)
|
285
|
+
# Send request
|
286
|
+
promise = begin_deallocate_async(resource_group_name, vm_name, custom_headers)
|
287
|
+
|
288
|
+
promise = promise.then do |response|
|
289
|
+
# Defining deserialization method.
|
290
|
+
deserialize_method = lambda do |parsed_response|
|
291
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
292
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
293
|
+
end
|
294
|
+
|
295
|
+
# Waiting for response.
|
296
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
297
|
+
end
|
298
|
+
|
299
|
+
promise
|
300
|
+
end
|
301
|
+
|
302
|
+
#
|
303
|
+
# Sets the state of the virtual machine to generalized.
|
304
|
+
#
|
305
|
+
# @param resource_group_name [String] The name of the resource group.
|
306
|
+
# @param vm_name [String] The name of the virtual machine.
|
307
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
308
|
+
# will be added to the HTTP request.
|
309
|
+
#
|
310
|
+
# @return [OperationStatusResponse] operation results.
|
311
|
+
#
|
312
|
+
def generalize(resource_group_name, vm_name, custom_headers = nil)
|
313
|
+
response = generalize_async(resource_group_name, vm_name, custom_headers).value!
|
314
|
+
response.body unless response.nil?
|
315
|
+
end
|
316
|
+
|
317
|
+
#
|
318
|
+
# Sets the state of the virtual machine to generalized.
|
319
|
+
#
|
320
|
+
# @param resource_group_name [String] The name of the resource group.
|
321
|
+
# @param vm_name [String] The name of the virtual machine.
|
322
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
323
|
+
# will be added to the HTTP request.
|
324
|
+
#
|
325
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
326
|
+
#
|
327
|
+
def generalize_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
328
|
+
generalize_async(resource_group_name, vm_name, custom_headers).value!
|
329
|
+
end
|
330
|
+
|
331
|
+
#
|
332
|
+
# Sets the state of the virtual machine to generalized.
|
333
|
+
#
|
334
|
+
# @param resource_group_name [String] The name of the resource group.
|
335
|
+
# @param vm_name [String] The name of the virtual machine.
|
336
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
337
|
+
# to the HTTP request.
|
338
|
+
#
|
339
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
340
|
+
#
|
341
|
+
def generalize_async(resource_group_name, vm_name, custom_headers = nil)
|
342
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
343
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
344
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
345
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
346
|
+
|
347
|
+
|
348
|
+
request_headers = {}
|
349
|
+
|
350
|
+
# Set Headers
|
351
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
352
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
353
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'
|
354
|
+
|
355
|
+
request_url = @base_url || @client.base_url
|
356
|
+
|
357
|
+
options = {
|
358
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
359
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
360
|
+
query_params: {'api-version' => @client.api_version},
|
361
|
+
headers: request_headers.merge(custom_headers || {}),
|
362
|
+
base_url: request_url
|
363
|
+
}
|
364
|
+
promise = @client.make_request_async(:post, path_template, options)
|
365
|
+
|
366
|
+
promise = promise.then do |result|
|
367
|
+
http_response = result.response
|
368
|
+
status_code = http_response.status
|
369
|
+
response_content = http_response.body
|
370
|
+
unless status_code == 200
|
371
|
+
error_model = JSON.load(response_content)
|
372
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
373
|
+
end
|
374
|
+
|
375
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
376
|
+
# Deserialize Response
|
377
|
+
if status_code == 200
|
378
|
+
begin
|
379
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
380
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
381
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
382
|
+
rescue Exception => e
|
383
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
result
|
388
|
+
end
|
389
|
+
|
390
|
+
promise.execute
|
391
|
+
end
|
392
|
+
|
393
|
+
#
|
394
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
395
|
+
# nextLink property in the response to get the next page of virtual machines.
|
396
|
+
#
|
397
|
+
# @param resource_group_name [String] The name of the resource group.
|
398
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
399
|
+
# will be added to the HTTP request.
|
400
|
+
#
|
401
|
+
# @return [Array<VirtualMachine>] operation results.
|
402
|
+
#
|
403
|
+
def list(resource_group_name, custom_headers = nil)
|
404
|
+
first_page = list_as_lazy(resource_group_name, custom_headers)
|
405
|
+
first_page.get_all_items
|
406
|
+
end
|
407
|
+
|
408
|
+
#
|
409
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
410
|
+
# nextLink property in the response to get the next page of virtual machines.
|
411
|
+
#
|
412
|
+
# @param resource_group_name [String] The name of the resource group.
|
413
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
414
|
+
# will be added to the HTTP request.
|
415
|
+
#
|
416
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
417
|
+
#
|
418
|
+
def list_with_http_info(resource_group_name, custom_headers = nil)
|
419
|
+
list_async(resource_group_name, custom_headers).value!
|
420
|
+
end
|
421
|
+
|
422
|
+
#
|
423
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
424
|
+
# nextLink property in the response to get the next page of virtual machines.
|
425
|
+
#
|
426
|
+
# @param resource_group_name [String] The name of the resource group.
|
427
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
428
|
+
# to the HTTP request.
|
429
|
+
#
|
430
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
431
|
+
#
|
432
|
+
def list_async(resource_group_name, custom_headers = nil)
|
433
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
434
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
435
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
436
|
+
|
437
|
+
|
438
|
+
request_headers = {}
|
439
|
+
|
440
|
+
# Set Headers
|
441
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
442
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
443
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'
|
444
|
+
|
445
|
+
request_url = @base_url || @client.base_url
|
446
|
+
|
447
|
+
options = {
|
448
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
449
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
450
|
+
query_params: {'api-version' => @client.api_version},
|
451
|
+
headers: request_headers.merge(custom_headers || {}),
|
452
|
+
base_url: request_url
|
453
|
+
}
|
454
|
+
promise = @client.make_request_async(:get, path_template, options)
|
455
|
+
|
456
|
+
promise = promise.then do |result|
|
457
|
+
http_response = result.response
|
458
|
+
status_code = http_response.status
|
459
|
+
response_content = http_response.body
|
460
|
+
unless status_code == 200
|
461
|
+
error_model = JSON.load(response_content)
|
462
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
463
|
+
end
|
464
|
+
|
465
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
466
|
+
# Deserialize Response
|
467
|
+
if status_code == 200
|
468
|
+
begin
|
469
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
470
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineListResult.mapper()
|
471
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
472
|
+
rescue Exception => e
|
473
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
result
|
478
|
+
end
|
479
|
+
|
480
|
+
promise.execute
|
481
|
+
end
|
482
|
+
|
483
|
+
#
|
484
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
485
|
+
# nextLink property in the response to get the next page of virtual machines.
|
486
|
+
#
|
487
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
488
|
+
# will be added to the HTTP request.
|
489
|
+
#
|
490
|
+
# @return [Array<VirtualMachine>] operation results.
|
491
|
+
#
|
492
|
+
def list_all(custom_headers = nil)
|
493
|
+
first_page = list_all_as_lazy(custom_headers)
|
494
|
+
first_page.get_all_items
|
495
|
+
end
|
496
|
+
|
497
|
+
#
|
498
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
499
|
+
# nextLink property in the response to get the next page of virtual machines.
|
500
|
+
#
|
501
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
502
|
+
# will be added to the HTTP request.
|
503
|
+
#
|
504
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
505
|
+
#
|
506
|
+
def list_all_with_http_info(custom_headers = nil)
|
507
|
+
list_all_async(custom_headers).value!
|
508
|
+
end
|
509
|
+
|
510
|
+
#
|
511
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
512
|
+
# nextLink property in the response to get the next page of virtual machines.
|
513
|
+
#
|
514
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
515
|
+
# to the HTTP request.
|
516
|
+
#
|
517
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
518
|
+
#
|
519
|
+
def list_all_async(custom_headers = nil)
|
520
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
521
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
522
|
+
|
523
|
+
|
524
|
+
request_headers = {}
|
525
|
+
|
526
|
+
# Set Headers
|
527
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
528
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
529
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'
|
530
|
+
|
531
|
+
request_url = @base_url || @client.base_url
|
532
|
+
|
533
|
+
options = {
|
534
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
535
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
536
|
+
query_params: {'api-version' => @client.api_version},
|
537
|
+
headers: request_headers.merge(custom_headers || {}),
|
538
|
+
base_url: request_url
|
539
|
+
}
|
540
|
+
promise = @client.make_request_async(:get, path_template, options)
|
541
|
+
|
542
|
+
promise = promise.then do |result|
|
543
|
+
http_response = result.response
|
544
|
+
status_code = http_response.status
|
545
|
+
response_content = http_response.body
|
546
|
+
unless status_code == 200
|
547
|
+
error_model = JSON.load(response_content)
|
548
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
549
|
+
end
|
550
|
+
|
551
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
552
|
+
# Deserialize Response
|
553
|
+
if status_code == 200
|
554
|
+
begin
|
555
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
556
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineListResult.mapper()
|
557
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
558
|
+
rescue Exception => e
|
559
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
560
|
+
end
|
561
|
+
end
|
562
|
+
|
563
|
+
result
|
564
|
+
end
|
565
|
+
|
566
|
+
promise.execute
|
567
|
+
end
|
568
|
+
|
569
|
+
#
|
570
|
+
# Lists all available virtual machine sizes to which the specified virtual
|
571
|
+
# machine can be resized.
|
572
|
+
#
|
573
|
+
# @param resource_group_name [String] The name of the resource group.
|
574
|
+
# @param vm_name [String] The name of the virtual machine.
|
575
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
576
|
+
# will be added to the HTTP request.
|
577
|
+
#
|
578
|
+
# @return [VirtualMachineSizeListResult] operation results.
|
579
|
+
#
|
580
|
+
def list_available_sizes(resource_group_name, vm_name, custom_headers = nil)
|
581
|
+
response = list_available_sizes_async(resource_group_name, vm_name, custom_headers).value!
|
582
|
+
response.body unless response.nil?
|
583
|
+
end
|
584
|
+
|
585
|
+
#
|
586
|
+
# Lists all available virtual machine sizes to which the specified virtual
|
587
|
+
# machine can be resized.
|
588
|
+
#
|
589
|
+
# @param resource_group_name [String] The name of the resource group.
|
590
|
+
# @param vm_name [String] The name of the virtual machine.
|
591
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
592
|
+
# will be added to the HTTP request.
|
593
|
+
#
|
594
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
595
|
+
#
|
596
|
+
def list_available_sizes_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
597
|
+
list_available_sizes_async(resource_group_name, vm_name, custom_headers).value!
|
598
|
+
end
|
599
|
+
|
600
|
+
#
|
601
|
+
# Lists all available virtual machine sizes to which the specified virtual
|
602
|
+
# machine can be resized.
|
603
|
+
#
|
604
|
+
# @param resource_group_name [String] The name of the resource group.
|
605
|
+
# @param vm_name [String] The name of the virtual machine.
|
606
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
607
|
+
# to the HTTP request.
|
608
|
+
#
|
609
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
610
|
+
#
|
611
|
+
def list_available_sizes_async(resource_group_name, vm_name, custom_headers = nil)
|
612
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
613
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
614
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
615
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
616
|
+
|
617
|
+
|
618
|
+
request_headers = {}
|
619
|
+
|
620
|
+
# Set Headers
|
621
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
622
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
623
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'
|
624
|
+
|
625
|
+
request_url = @base_url || @client.base_url
|
626
|
+
|
627
|
+
options = {
|
628
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
629
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
630
|
+
query_params: {'api-version' => @client.api_version},
|
631
|
+
headers: request_headers.merge(custom_headers || {}),
|
632
|
+
base_url: request_url
|
633
|
+
}
|
634
|
+
promise = @client.make_request_async(:get, path_template, options)
|
635
|
+
|
636
|
+
promise = promise.then do |result|
|
637
|
+
http_response = result.response
|
638
|
+
status_code = http_response.status
|
639
|
+
response_content = http_response.body
|
640
|
+
unless status_code == 200
|
641
|
+
error_model = JSON.load(response_content)
|
642
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
643
|
+
end
|
644
|
+
|
645
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
646
|
+
# Deserialize Response
|
647
|
+
if status_code == 200
|
648
|
+
begin
|
649
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
650
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineSizeListResult.mapper()
|
651
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
652
|
+
rescue Exception => e
|
653
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
result
|
658
|
+
end
|
659
|
+
|
660
|
+
promise.execute
|
661
|
+
end
|
662
|
+
|
663
|
+
#
|
664
|
+
# The operation to power off (stop) a virtual machine. The virtual machine can
|
665
|
+
# be restarted with the same provisioned resources. You are still charged for
|
666
|
+
# this virtual machine.
|
667
|
+
#
|
668
|
+
# @param resource_group_name [String] The name of the resource group.
|
669
|
+
# @param vm_name [String] The name of the virtual machine.
|
670
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
671
|
+
# will be added to the HTTP request.
|
672
|
+
#
|
673
|
+
# @return [OperationStatusResponse] operation results.
|
674
|
+
#
|
675
|
+
def power_off(resource_group_name, vm_name, custom_headers = nil)
|
676
|
+
response = power_off_async(resource_group_name, vm_name, custom_headers).value!
|
677
|
+
response.body unless response.nil?
|
678
|
+
end
|
679
|
+
|
680
|
+
#
|
681
|
+
# @param resource_group_name [String] The name of the resource group.
|
682
|
+
# @param vm_name [String] The name of the virtual machine.
|
683
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
684
|
+
# will be added to the HTTP request.
|
685
|
+
#
|
686
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
687
|
+
# response.
|
688
|
+
#
|
689
|
+
def power_off_async(resource_group_name, vm_name, custom_headers = nil)
|
690
|
+
# Send request
|
691
|
+
promise = begin_power_off_async(resource_group_name, vm_name, custom_headers)
|
692
|
+
|
693
|
+
promise = promise.then do |response|
|
694
|
+
# Defining deserialization method.
|
695
|
+
deserialize_method = lambda do |parsed_response|
|
696
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
697
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
698
|
+
end
|
699
|
+
|
700
|
+
# Waiting for response.
|
701
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
702
|
+
end
|
703
|
+
|
704
|
+
promise
|
705
|
+
end
|
706
|
+
|
707
|
+
#
|
708
|
+
# The operation to restart a virtual machine.
|
709
|
+
#
|
710
|
+
# @param resource_group_name [String] The name of the resource group.
|
711
|
+
# @param vm_name [String] The name of the virtual machine.
|
712
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
713
|
+
# will be added to the HTTP request.
|
714
|
+
#
|
715
|
+
# @return [OperationStatusResponse] operation results.
|
716
|
+
#
|
717
|
+
def restart(resource_group_name, vm_name, custom_headers = nil)
|
718
|
+
response = restart_async(resource_group_name, vm_name, custom_headers).value!
|
719
|
+
response.body unless response.nil?
|
720
|
+
end
|
721
|
+
|
722
|
+
#
|
723
|
+
# @param resource_group_name [String] The name of the resource group.
|
724
|
+
# @param vm_name [String] The name of the virtual machine.
|
725
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
726
|
+
# will be added to the HTTP request.
|
727
|
+
#
|
728
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
729
|
+
# response.
|
730
|
+
#
|
731
|
+
def restart_async(resource_group_name, vm_name, custom_headers = nil)
|
732
|
+
# Send request
|
733
|
+
promise = begin_restart_async(resource_group_name, vm_name, custom_headers)
|
734
|
+
|
735
|
+
promise = promise.then do |response|
|
736
|
+
# Defining deserialization method.
|
737
|
+
deserialize_method = lambda do |parsed_response|
|
738
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
739
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
740
|
+
end
|
741
|
+
|
742
|
+
# Waiting for response.
|
743
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
744
|
+
end
|
745
|
+
|
746
|
+
promise
|
747
|
+
end
|
748
|
+
|
749
|
+
#
|
750
|
+
# The operation to start a virtual machine.
|
751
|
+
#
|
752
|
+
# @param resource_group_name [String] The name of the resource group.
|
753
|
+
# @param vm_name [String] The name of the virtual machine.
|
754
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
755
|
+
# will be added to the HTTP request.
|
756
|
+
#
|
757
|
+
# @return [OperationStatusResponse] operation results.
|
758
|
+
#
|
759
|
+
def start(resource_group_name, vm_name, custom_headers = nil)
|
760
|
+
response = start_async(resource_group_name, vm_name, custom_headers).value!
|
761
|
+
response.body unless response.nil?
|
762
|
+
end
|
763
|
+
|
764
|
+
#
|
765
|
+
# @param resource_group_name [String] The name of the resource group.
|
766
|
+
# @param vm_name [String] The name of the virtual machine.
|
767
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
768
|
+
# will be added to the HTTP request.
|
769
|
+
#
|
770
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
771
|
+
# response.
|
772
|
+
#
|
773
|
+
def start_async(resource_group_name, vm_name, custom_headers = nil)
|
774
|
+
# Send request
|
775
|
+
promise = begin_start_async(resource_group_name, vm_name, custom_headers)
|
776
|
+
|
777
|
+
promise = promise.then do |response|
|
778
|
+
# Defining deserialization method.
|
779
|
+
deserialize_method = lambda do |parsed_response|
|
780
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
781
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
782
|
+
end
|
783
|
+
|
784
|
+
# Waiting for response.
|
785
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
786
|
+
end
|
787
|
+
|
788
|
+
promise
|
789
|
+
end
|
790
|
+
|
791
|
+
#
|
792
|
+
# The operation to redeploy a virtual machine.
|
793
|
+
#
|
794
|
+
# @param resource_group_name [String] The name of the resource group.
|
795
|
+
# @param vm_name [String] The name of the virtual machine.
|
796
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
797
|
+
# will be added to the HTTP request.
|
798
|
+
#
|
799
|
+
# @return [OperationStatusResponse] operation results.
|
800
|
+
#
|
801
|
+
def redeploy(resource_group_name, vm_name, custom_headers = nil)
|
802
|
+
response = redeploy_async(resource_group_name, vm_name, custom_headers).value!
|
803
|
+
response.body unless response.nil?
|
804
|
+
end
|
805
|
+
|
806
|
+
#
|
807
|
+
# @param resource_group_name [String] The name of the resource group.
|
808
|
+
# @param vm_name [String] The name of the virtual machine.
|
809
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
810
|
+
# will be added to the HTTP request.
|
811
|
+
#
|
812
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
813
|
+
# response.
|
814
|
+
#
|
815
|
+
def redeploy_async(resource_group_name, vm_name, custom_headers = nil)
|
816
|
+
# Send request
|
817
|
+
promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers)
|
818
|
+
|
819
|
+
promise = promise.then do |response|
|
820
|
+
# Defining deserialization method.
|
821
|
+
deserialize_method = lambda do |parsed_response|
|
822
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
823
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
824
|
+
end
|
825
|
+
|
826
|
+
# Waiting for response.
|
827
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
828
|
+
end
|
829
|
+
|
830
|
+
promise
|
831
|
+
end
|
832
|
+
|
833
|
+
#
|
834
|
+
# Captures the VM by copying virtual hard disks of the VM and outputs a
|
835
|
+
# template that can be used to create similar VMs.
|
836
|
+
#
|
837
|
+
# @param resource_group_name [String] The name of the resource group.
|
838
|
+
# @param vm_name [String] The name of the virtual machine.
|
839
|
+
# @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
|
840
|
+
# the Capture Virtual Machine operation.
|
841
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
842
|
+
# will be added to the HTTP request.
|
843
|
+
#
|
844
|
+
# @return [VirtualMachineCaptureResult] operation results.
|
845
|
+
#
|
846
|
+
def begin_capture(resource_group_name, vm_name, parameters, custom_headers = nil)
|
847
|
+
response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
848
|
+
response.body unless response.nil?
|
849
|
+
end
|
850
|
+
|
851
|
+
#
|
852
|
+
# Captures the VM by copying virtual hard disks of the VM and outputs a
|
853
|
+
# template that can be used to create similar VMs.
|
854
|
+
#
|
855
|
+
# @param resource_group_name [String] The name of the resource group.
|
856
|
+
# @param vm_name [String] The name of the virtual machine.
|
857
|
+
# @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
|
858
|
+
# the Capture Virtual Machine operation.
|
859
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
860
|
+
# will be added to the HTTP request.
|
861
|
+
#
|
862
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
863
|
+
#
|
864
|
+
def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers = nil)
|
865
|
+
begin_capture_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
866
|
+
end
|
867
|
+
|
868
|
+
#
|
869
|
+
# Captures the VM by copying virtual hard disks of the VM and outputs a
|
870
|
+
# template that can be used to create similar VMs.
|
871
|
+
#
|
872
|
+
# @param resource_group_name [String] The name of the resource group.
|
873
|
+
# @param vm_name [String] The name of the virtual machine.
|
874
|
+
# @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
|
875
|
+
# the Capture Virtual Machine operation.
|
876
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
877
|
+
# to the HTTP request.
|
878
|
+
#
|
879
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
880
|
+
#
|
881
|
+
def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers = nil)
|
882
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
883
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
884
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
885
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
886
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
887
|
+
|
888
|
+
|
889
|
+
request_headers = {}
|
890
|
+
|
891
|
+
# Set Headers
|
892
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
893
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
894
|
+
|
895
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
896
|
+
|
897
|
+
# Serialize Request
|
898
|
+
request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineCaptureParameters.mapper()
|
899
|
+
request_content = @client.serialize(request_mapper, parameters)
|
900
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
901
|
+
|
902
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
|
903
|
+
|
904
|
+
request_url = @base_url || @client.base_url
|
905
|
+
|
906
|
+
options = {
|
907
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
908
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
909
|
+
query_params: {'api-version' => @client.api_version},
|
910
|
+
body: request_content,
|
911
|
+
headers: request_headers.merge(custom_headers || {}),
|
912
|
+
base_url: request_url
|
913
|
+
}
|
914
|
+
promise = @client.make_request_async(:post, path_template, options)
|
915
|
+
|
916
|
+
promise = promise.then do |result|
|
917
|
+
http_response = result.response
|
918
|
+
status_code = http_response.status
|
919
|
+
response_content = http_response.body
|
920
|
+
unless status_code == 200 || status_code == 202
|
921
|
+
error_model = JSON.load(response_content)
|
922
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
923
|
+
end
|
924
|
+
|
925
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
926
|
+
# Deserialize Response
|
927
|
+
if status_code == 200
|
928
|
+
begin
|
929
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
930
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineCaptureResult.mapper()
|
931
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
932
|
+
rescue Exception => e
|
933
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
934
|
+
end
|
935
|
+
end
|
936
|
+
|
937
|
+
result
|
938
|
+
end
|
939
|
+
|
940
|
+
promise.execute
|
941
|
+
end
|
942
|
+
|
943
|
+
#
|
944
|
+
# The operation to create or update a virtual machine.
|
945
|
+
#
|
946
|
+
# @param resource_group_name [String] The name of the resource group.
|
947
|
+
# @param vm_name [String] The name of the virtual machine.
|
948
|
+
# @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
|
949
|
+
# Machine operation.
|
950
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
951
|
+
# will be added to the HTTP request.
|
952
|
+
#
|
953
|
+
# @return [VirtualMachine] operation results.
|
954
|
+
#
|
955
|
+
def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers = nil)
|
956
|
+
response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
957
|
+
response.body unless response.nil?
|
958
|
+
end
|
959
|
+
|
960
|
+
#
|
961
|
+
# The operation to create or update a virtual machine.
|
962
|
+
#
|
963
|
+
# @param resource_group_name [String] The name of the resource group.
|
964
|
+
# @param vm_name [String] The name of the virtual machine.
|
965
|
+
# @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
|
966
|
+
# Machine operation.
|
967
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
968
|
+
# will be added to the HTTP request.
|
969
|
+
#
|
970
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
971
|
+
#
|
972
|
+
def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers = nil)
|
973
|
+
begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers).value!
|
974
|
+
end
|
975
|
+
|
976
|
+
#
|
977
|
+
# The operation to create or update a virtual machine.
|
978
|
+
#
|
979
|
+
# @param resource_group_name [String] The name of the resource group.
|
980
|
+
# @param vm_name [String] The name of the virtual machine.
|
981
|
+
# @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
|
982
|
+
# Machine operation.
|
983
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
984
|
+
# to the HTTP request.
|
985
|
+
#
|
986
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
987
|
+
#
|
988
|
+
def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers = nil)
|
989
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
990
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
991
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
992
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
993
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
994
|
+
|
995
|
+
|
996
|
+
request_headers = {}
|
997
|
+
|
998
|
+
# Set Headers
|
999
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1000
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1001
|
+
|
1002
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1003
|
+
|
1004
|
+
# Serialize Request
|
1005
|
+
request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachine.mapper()
|
1006
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1007
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1008
|
+
|
1009
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
|
1010
|
+
|
1011
|
+
request_url = @base_url || @client.base_url
|
1012
|
+
|
1013
|
+
options = {
|
1014
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1015
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1016
|
+
query_params: {'api-version' => @client.api_version},
|
1017
|
+
body: request_content,
|
1018
|
+
headers: request_headers.merge(custom_headers || {}),
|
1019
|
+
base_url: request_url
|
1020
|
+
}
|
1021
|
+
promise = @client.make_request_async(:put, path_template, options)
|
1022
|
+
|
1023
|
+
promise = promise.then do |result|
|
1024
|
+
http_response = result.response
|
1025
|
+
status_code = http_response.status
|
1026
|
+
response_content = http_response.body
|
1027
|
+
unless status_code == 200 || status_code == 201
|
1028
|
+
error_model = JSON.load(response_content)
|
1029
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1033
|
+
# Deserialize Response
|
1034
|
+
if status_code == 200
|
1035
|
+
begin
|
1036
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1037
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachine.mapper()
|
1038
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1039
|
+
rescue Exception => e
|
1040
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
# Deserialize Response
|
1044
|
+
if status_code == 201
|
1045
|
+
begin
|
1046
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1047
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachine.mapper()
|
1048
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1049
|
+
rescue Exception => e
|
1050
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1051
|
+
end
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
result
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
promise.execute
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
#
|
1061
|
+
# The operation to delete a virtual machine.
|
1062
|
+
#
|
1063
|
+
# @param resource_group_name [String] The name of the resource group.
|
1064
|
+
# @param vm_name [String] The name of the virtual machine.
|
1065
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1066
|
+
# will be added to the HTTP request.
|
1067
|
+
#
|
1068
|
+
# @return [OperationStatusResponse] operation results.
|
1069
|
+
#
|
1070
|
+
def begin_delete(resource_group_name, vm_name, custom_headers = nil)
|
1071
|
+
response = begin_delete_async(resource_group_name, vm_name, custom_headers).value!
|
1072
|
+
response.body unless response.nil?
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
#
|
1076
|
+
# The operation to delete a virtual machine.
|
1077
|
+
#
|
1078
|
+
# @param resource_group_name [String] The name of the resource group.
|
1079
|
+
# @param vm_name [String] The name of the virtual machine.
|
1080
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1081
|
+
# will be added to the HTTP request.
|
1082
|
+
#
|
1083
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1084
|
+
#
|
1085
|
+
def begin_delete_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1086
|
+
begin_delete_async(resource_group_name, vm_name, custom_headers).value!
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
#
|
1090
|
+
# The operation to delete a virtual machine.
|
1091
|
+
#
|
1092
|
+
# @param resource_group_name [String] The name of the resource group.
|
1093
|
+
# @param vm_name [String] The name of the virtual machine.
|
1094
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1095
|
+
# to the HTTP request.
|
1096
|
+
#
|
1097
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1098
|
+
#
|
1099
|
+
def begin_delete_async(resource_group_name, vm_name, custom_headers = nil)
|
1100
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1101
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1102
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1103
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1104
|
+
|
1105
|
+
|
1106
|
+
request_headers = {}
|
1107
|
+
|
1108
|
+
# Set Headers
|
1109
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1110
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1111
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
|
1112
|
+
|
1113
|
+
request_url = @base_url || @client.base_url
|
1114
|
+
|
1115
|
+
options = {
|
1116
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1117
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1118
|
+
query_params: {'api-version' => @client.api_version},
|
1119
|
+
headers: request_headers.merge(custom_headers || {}),
|
1120
|
+
base_url: request_url
|
1121
|
+
}
|
1122
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
1123
|
+
|
1124
|
+
promise = promise.then do |result|
|
1125
|
+
http_response = result.response
|
1126
|
+
status_code = http_response.status
|
1127
|
+
response_content = http_response.body
|
1128
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
1129
|
+
error_model = JSON.load(response_content)
|
1130
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1134
|
+
# Deserialize Response
|
1135
|
+
if status_code == 200
|
1136
|
+
begin
|
1137
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1138
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1139
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1140
|
+
rescue Exception => e
|
1141
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1142
|
+
end
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
result
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
promise.execute
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
#
|
1152
|
+
# Shuts down the virtual machine and releases the compute resources. You are
|
1153
|
+
# not billed for the compute resources that this virtual machine uses.
|
1154
|
+
#
|
1155
|
+
# @param resource_group_name [String] The name of the resource group.
|
1156
|
+
# @param vm_name [String] The name of the virtual machine.
|
1157
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1158
|
+
# will be added to the HTTP request.
|
1159
|
+
#
|
1160
|
+
# @return [OperationStatusResponse] operation results.
|
1161
|
+
#
|
1162
|
+
def begin_deallocate(resource_group_name, vm_name, custom_headers = nil)
|
1163
|
+
response = begin_deallocate_async(resource_group_name, vm_name, custom_headers).value!
|
1164
|
+
response.body unless response.nil?
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
#
|
1168
|
+
# Shuts down the virtual machine and releases the compute resources. You are
|
1169
|
+
# not billed for the compute resources that this virtual machine uses.
|
1170
|
+
#
|
1171
|
+
# @param resource_group_name [String] The name of the resource group.
|
1172
|
+
# @param vm_name [String] The name of the virtual machine.
|
1173
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1174
|
+
# will be added to the HTTP request.
|
1175
|
+
#
|
1176
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1177
|
+
#
|
1178
|
+
def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1179
|
+
begin_deallocate_async(resource_group_name, vm_name, custom_headers).value!
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
#
|
1183
|
+
# Shuts down the virtual machine and releases the compute resources. You are
|
1184
|
+
# not billed for the compute resources that this virtual machine uses.
|
1185
|
+
#
|
1186
|
+
# @param resource_group_name [String] The name of the resource group.
|
1187
|
+
# @param vm_name [String] The name of the virtual machine.
|
1188
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1189
|
+
# to the HTTP request.
|
1190
|
+
#
|
1191
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1192
|
+
#
|
1193
|
+
def begin_deallocate_async(resource_group_name, vm_name, custom_headers = nil)
|
1194
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1195
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1196
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1197
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1198
|
+
|
1199
|
+
|
1200
|
+
request_headers = {}
|
1201
|
+
|
1202
|
+
# Set Headers
|
1203
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1204
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1205
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
|
1206
|
+
|
1207
|
+
request_url = @base_url || @client.base_url
|
1208
|
+
|
1209
|
+
options = {
|
1210
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1211
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1212
|
+
query_params: {'api-version' => @client.api_version},
|
1213
|
+
headers: request_headers.merge(custom_headers || {}),
|
1214
|
+
base_url: request_url
|
1215
|
+
}
|
1216
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1217
|
+
|
1218
|
+
promise = promise.then do |result|
|
1219
|
+
http_response = result.response
|
1220
|
+
status_code = http_response.status
|
1221
|
+
response_content = http_response.body
|
1222
|
+
unless status_code == 200 || status_code == 202
|
1223
|
+
error_model = JSON.load(response_content)
|
1224
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1228
|
+
# Deserialize Response
|
1229
|
+
if status_code == 200
|
1230
|
+
begin
|
1231
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1232
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1233
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1234
|
+
rescue Exception => e
|
1235
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1236
|
+
end
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
result
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
promise.execute
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
#
|
1246
|
+
# The operation to power off (stop) a virtual machine. The virtual machine can
|
1247
|
+
# be restarted with the same provisioned resources. You are still charged for
|
1248
|
+
# this virtual machine.
|
1249
|
+
#
|
1250
|
+
# @param resource_group_name [String] The name of the resource group.
|
1251
|
+
# @param vm_name [String] The name of the virtual machine.
|
1252
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1253
|
+
# will be added to the HTTP request.
|
1254
|
+
#
|
1255
|
+
# @return [OperationStatusResponse] operation results.
|
1256
|
+
#
|
1257
|
+
def begin_power_off(resource_group_name, vm_name, custom_headers = nil)
|
1258
|
+
response = begin_power_off_async(resource_group_name, vm_name, custom_headers).value!
|
1259
|
+
response.body unless response.nil?
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
#
|
1263
|
+
# The operation to power off (stop) a virtual machine. The virtual machine can
|
1264
|
+
# be restarted with the same provisioned resources. You are still charged for
|
1265
|
+
# this virtual machine.
|
1266
|
+
#
|
1267
|
+
# @param resource_group_name [String] The name of the resource group.
|
1268
|
+
# @param vm_name [String] The name of the virtual machine.
|
1269
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1270
|
+
# will be added to the HTTP request.
|
1271
|
+
#
|
1272
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1273
|
+
#
|
1274
|
+
def begin_power_off_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1275
|
+
begin_power_off_async(resource_group_name, vm_name, custom_headers).value!
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
#
|
1279
|
+
# The operation to power off (stop) a virtual machine. The virtual machine can
|
1280
|
+
# be restarted with the same provisioned resources. You are still charged for
|
1281
|
+
# this virtual machine.
|
1282
|
+
#
|
1283
|
+
# @param resource_group_name [String] The name of the resource group.
|
1284
|
+
# @param vm_name [String] The name of the virtual machine.
|
1285
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1286
|
+
# to the HTTP request.
|
1287
|
+
#
|
1288
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1289
|
+
#
|
1290
|
+
def begin_power_off_async(resource_group_name, vm_name, custom_headers = nil)
|
1291
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1292
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1293
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1294
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1295
|
+
|
1296
|
+
|
1297
|
+
request_headers = {}
|
1298
|
+
|
1299
|
+
# Set Headers
|
1300
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1301
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1302
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
|
1303
|
+
|
1304
|
+
request_url = @base_url || @client.base_url
|
1305
|
+
|
1306
|
+
options = {
|
1307
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1308
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1309
|
+
query_params: {'api-version' => @client.api_version},
|
1310
|
+
headers: request_headers.merge(custom_headers || {}),
|
1311
|
+
base_url: request_url
|
1312
|
+
}
|
1313
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1314
|
+
|
1315
|
+
promise = promise.then do |result|
|
1316
|
+
http_response = result.response
|
1317
|
+
status_code = http_response.status
|
1318
|
+
response_content = http_response.body
|
1319
|
+
unless status_code == 200 || status_code == 202
|
1320
|
+
error_model = JSON.load(response_content)
|
1321
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1325
|
+
# Deserialize Response
|
1326
|
+
if status_code == 200
|
1327
|
+
begin
|
1328
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1329
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1330
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1331
|
+
rescue Exception => e
|
1332
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1333
|
+
end
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
result
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
promise.execute
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
#
|
1343
|
+
# The operation to restart a virtual machine.
|
1344
|
+
#
|
1345
|
+
# @param resource_group_name [String] The name of the resource group.
|
1346
|
+
# @param vm_name [String] The name of the virtual machine.
|
1347
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1348
|
+
# will be added to the HTTP request.
|
1349
|
+
#
|
1350
|
+
# @return [OperationStatusResponse] operation results.
|
1351
|
+
#
|
1352
|
+
def begin_restart(resource_group_name, vm_name, custom_headers = nil)
|
1353
|
+
response = begin_restart_async(resource_group_name, vm_name, custom_headers).value!
|
1354
|
+
response.body unless response.nil?
|
1355
|
+
end
|
1356
|
+
|
1357
|
+
#
|
1358
|
+
# The operation to restart a virtual machine.
|
1359
|
+
#
|
1360
|
+
# @param resource_group_name [String] The name of the resource group.
|
1361
|
+
# @param vm_name [String] The name of the virtual machine.
|
1362
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1363
|
+
# will be added to the HTTP request.
|
1364
|
+
#
|
1365
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1366
|
+
#
|
1367
|
+
def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1368
|
+
begin_restart_async(resource_group_name, vm_name, custom_headers).value!
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
#
|
1372
|
+
# The operation to restart a virtual machine.
|
1373
|
+
#
|
1374
|
+
# @param resource_group_name [String] The name of the resource group.
|
1375
|
+
# @param vm_name [String] The name of the virtual machine.
|
1376
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1377
|
+
# to the HTTP request.
|
1378
|
+
#
|
1379
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1380
|
+
#
|
1381
|
+
def begin_restart_async(resource_group_name, vm_name, custom_headers = nil)
|
1382
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1383
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1384
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1385
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1386
|
+
|
1387
|
+
|
1388
|
+
request_headers = {}
|
1389
|
+
|
1390
|
+
# Set Headers
|
1391
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1392
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1393
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
|
1394
|
+
|
1395
|
+
request_url = @base_url || @client.base_url
|
1396
|
+
|
1397
|
+
options = {
|
1398
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1399
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1400
|
+
query_params: {'api-version' => @client.api_version},
|
1401
|
+
headers: request_headers.merge(custom_headers || {}),
|
1402
|
+
base_url: request_url
|
1403
|
+
}
|
1404
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1405
|
+
|
1406
|
+
promise = promise.then do |result|
|
1407
|
+
http_response = result.response
|
1408
|
+
status_code = http_response.status
|
1409
|
+
response_content = http_response.body
|
1410
|
+
unless status_code == 200 || status_code == 202
|
1411
|
+
error_model = JSON.load(response_content)
|
1412
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1413
|
+
end
|
1414
|
+
|
1415
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1416
|
+
# Deserialize Response
|
1417
|
+
if status_code == 200
|
1418
|
+
begin
|
1419
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1420
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1421
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1422
|
+
rescue Exception => e
|
1423
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1424
|
+
end
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
result
|
1428
|
+
end
|
1429
|
+
|
1430
|
+
promise.execute
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
#
|
1434
|
+
# The operation to start a virtual machine.
|
1435
|
+
#
|
1436
|
+
# @param resource_group_name [String] The name of the resource group.
|
1437
|
+
# @param vm_name [String] The name of the virtual machine.
|
1438
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1439
|
+
# will be added to the HTTP request.
|
1440
|
+
#
|
1441
|
+
# @return [OperationStatusResponse] operation results.
|
1442
|
+
#
|
1443
|
+
def begin_start(resource_group_name, vm_name, custom_headers = nil)
|
1444
|
+
response = begin_start_async(resource_group_name, vm_name, custom_headers).value!
|
1445
|
+
response.body unless response.nil?
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
#
|
1449
|
+
# The operation to start a virtual machine.
|
1450
|
+
#
|
1451
|
+
# @param resource_group_name [String] The name of the resource group.
|
1452
|
+
# @param vm_name [String] The name of the virtual machine.
|
1453
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1454
|
+
# will be added to the HTTP request.
|
1455
|
+
#
|
1456
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1457
|
+
#
|
1458
|
+
def begin_start_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1459
|
+
begin_start_async(resource_group_name, vm_name, custom_headers).value!
|
1460
|
+
end
|
1461
|
+
|
1462
|
+
#
|
1463
|
+
# The operation to start a virtual machine.
|
1464
|
+
#
|
1465
|
+
# @param resource_group_name [String] The name of the resource group.
|
1466
|
+
# @param vm_name [String] The name of the virtual machine.
|
1467
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1468
|
+
# to the HTTP request.
|
1469
|
+
#
|
1470
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1471
|
+
#
|
1472
|
+
def begin_start_async(resource_group_name, vm_name, custom_headers = nil)
|
1473
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1474
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1475
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1476
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1477
|
+
|
1478
|
+
|
1479
|
+
request_headers = {}
|
1480
|
+
|
1481
|
+
# Set Headers
|
1482
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1483
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1484
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
|
1485
|
+
|
1486
|
+
request_url = @base_url || @client.base_url
|
1487
|
+
|
1488
|
+
options = {
|
1489
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1490
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1491
|
+
query_params: {'api-version' => @client.api_version},
|
1492
|
+
headers: request_headers.merge(custom_headers || {}),
|
1493
|
+
base_url: request_url
|
1494
|
+
}
|
1495
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1496
|
+
|
1497
|
+
promise = promise.then do |result|
|
1498
|
+
http_response = result.response
|
1499
|
+
status_code = http_response.status
|
1500
|
+
response_content = http_response.body
|
1501
|
+
unless status_code == 200 || status_code == 202
|
1502
|
+
error_model = JSON.load(response_content)
|
1503
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1504
|
+
end
|
1505
|
+
|
1506
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1507
|
+
# Deserialize Response
|
1508
|
+
if status_code == 200
|
1509
|
+
begin
|
1510
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1511
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1512
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1513
|
+
rescue Exception => e
|
1514
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1515
|
+
end
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
result
|
1519
|
+
end
|
1520
|
+
|
1521
|
+
promise.execute
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
#
|
1525
|
+
# The operation to redeploy a virtual machine.
|
1526
|
+
#
|
1527
|
+
# @param resource_group_name [String] The name of the resource group.
|
1528
|
+
# @param vm_name [String] The name of the virtual machine.
|
1529
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1530
|
+
# will be added to the HTTP request.
|
1531
|
+
#
|
1532
|
+
# @return [OperationStatusResponse] operation results.
|
1533
|
+
#
|
1534
|
+
def begin_redeploy(resource_group_name, vm_name, custom_headers = nil)
|
1535
|
+
response = begin_redeploy_async(resource_group_name, vm_name, custom_headers).value!
|
1536
|
+
response.body unless response.nil?
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
#
|
1540
|
+
# The operation to redeploy a virtual machine.
|
1541
|
+
#
|
1542
|
+
# @param resource_group_name [String] The name of the resource group.
|
1543
|
+
# @param vm_name [String] The name of the virtual machine.
|
1544
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1545
|
+
# will be added to the HTTP request.
|
1546
|
+
#
|
1547
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1548
|
+
#
|
1549
|
+
def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers = nil)
|
1550
|
+
begin_redeploy_async(resource_group_name, vm_name, custom_headers).value!
|
1551
|
+
end
|
1552
|
+
|
1553
|
+
#
|
1554
|
+
# The operation to redeploy a virtual machine.
|
1555
|
+
#
|
1556
|
+
# @param resource_group_name [String] The name of the resource group.
|
1557
|
+
# @param vm_name [String] The name of the virtual machine.
|
1558
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1559
|
+
# to the HTTP request.
|
1560
|
+
#
|
1561
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1562
|
+
#
|
1563
|
+
def begin_redeploy_async(resource_group_name, vm_name, custom_headers = nil)
|
1564
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1565
|
+
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
1566
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1567
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1568
|
+
|
1569
|
+
|
1570
|
+
request_headers = {}
|
1571
|
+
|
1572
|
+
# Set Headers
|
1573
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1574
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1575
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
|
1576
|
+
|
1577
|
+
request_url = @base_url || @client.base_url
|
1578
|
+
|
1579
|
+
options = {
|
1580
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1581
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
|
1582
|
+
query_params: {'api-version' => @client.api_version},
|
1583
|
+
headers: request_headers.merge(custom_headers || {}),
|
1584
|
+
base_url: request_url
|
1585
|
+
}
|
1586
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1587
|
+
|
1588
|
+
promise = promise.then do |result|
|
1589
|
+
http_response = result.response
|
1590
|
+
status_code = http_response.status
|
1591
|
+
response_content = http_response.body
|
1592
|
+
unless status_code == 200 || status_code == 202
|
1593
|
+
error_model = JSON.load(response_content)
|
1594
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1598
|
+
# Deserialize Response
|
1599
|
+
if status_code == 200
|
1600
|
+
begin
|
1601
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1602
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
|
1603
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1604
|
+
rescue Exception => e
|
1605
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1606
|
+
end
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
result
|
1610
|
+
end
|
1611
|
+
|
1612
|
+
promise.execute
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
#
|
1616
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
1617
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1618
|
+
#
|
1619
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1620
|
+
# to List operation.
|
1621
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1622
|
+
# will be added to the HTTP request.
|
1623
|
+
#
|
1624
|
+
# @return [VirtualMachineListResult] operation results.
|
1625
|
+
#
|
1626
|
+
def list_next(next_page_link, custom_headers = nil)
|
1627
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1628
|
+
response.body unless response.nil?
|
1629
|
+
end
|
1630
|
+
|
1631
|
+
#
|
1632
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
1633
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1634
|
+
#
|
1635
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1636
|
+
# to List operation.
|
1637
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1638
|
+
# will be added to the HTTP request.
|
1639
|
+
#
|
1640
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1641
|
+
#
|
1642
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1643
|
+
list_next_async(next_page_link, custom_headers).value!
|
1644
|
+
end
|
1645
|
+
|
1646
|
+
#
|
1647
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
1648
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1649
|
+
#
|
1650
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1651
|
+
# to List operation.
|
1652
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1653
|
+
# to the HTTP request.
|
1654
|
+
#
|
1655
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1656
|
+
#
|
1657
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1658
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1659
|
+
|
1660
|
+
|
1661
|
+
request_headers = {}
|
1662
|
+
|
1663
|
+
# Set Headers
|
1664
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1665
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1666
|
+
path_template = '{nextLink}'
|
1667
|
+
|
1668
|
+
request_url = @base_url || @client.base_url
|
1669
|
+
|
1670
|
+
options = {
|
1671
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1672
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1673
|
+
headers: request_headers.merge(custom_headers || {}),
|
1674
|
+
base_url: request_url
|
1675
|
+
}
|
1676
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1677
|
+
|
1678
|
+
promise = promise.then do |result|
|
1679
|
+
http_response = result.response
|
1680
|
+
status_code = http_response.status
|
1681
|
+
response_content = http_response.body
|
1682
|
+
unless status_code == 200
|
1683
|
+
error_model = JSON.load(response_content)
|
1684
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1688
|
+
# Deserialize Response
|
1689
|
+
if status_code == 200
|
1690
|
+
begin
|
1691
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1692
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineListResult.mapper()
|
1693
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1694
|
+
rescue Exception => e
|
1695
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1696
|
+
end
|
1697
|
+
end
|
1698
|
+
|
1699
|
+
result
|
1700
|
+
end
|
1701
|
+
|
1702
|
+
promise.execute
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
#
|
1706
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
1707
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1708
|
+
#
|
1709
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1710
|
+
# to List operation.
|
1711
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1712
|
+
# will be added to the HTTP request.
|
1713
|
+
#
|
1714
|
+
# @return [VirtualMachineListResult] operation results.
|
1715
|
+
#
|
1716
|
+
def list_all_next(next_page_link, custom_headers = nil)
|
1717
|
+
response = list_all_next_async(next_page_link, custom_headers).value!
|
1718
|
+
response.body unless response.nil?
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
#
|
1722
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
1723
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1724
|
+
#
|
1725
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1726
|
+
# to List operation.
|
1727
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1728
|
+
# will be added to the HTTP request.
|
1729
|
+
#
|
1730
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1731
|
+
#
|
1732
|
+
def list_all_next_with_http_info(next_page_link, custom_headers = nil)
|
1733
|
+
list_all_next_async(next_page_link, custom_headers).value!
|
1734
|
+
end
|
1735
|
+
|
1736
|
+
#
|
1737
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
1738
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1739
|
+
#
|
1740
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1741
|
+
# to List operation.
|
1742
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1743
|
+
# to the HTTP request.
|
1744
|
+
#
|
1745
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1746
|
+
#
|
1747
|
+
def list_all_next_async(next_page_link, custom_headers = nil)
|
1748
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1749
|
+
|
1750
|
+
|
1751
|
+
request_headers = {}
|
1752
|
+
|
1753
|
+
# Set Headers
|
1754
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1755
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1756
|
+
path_template = '{nextLink}'
|
1757
|
+
|
1758
|
+
request_url = @base_url || @client.base_url
|
1759
|
+
|
1760
|
+
options = {
|
1761
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1762
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1763
|
+
headers: request_headers.merge(custom_headers || {}),
|
1764
|
+
base_url: request_url
|
1765
|
+
}
|
1766
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1767
|
+
|
1768
|
+
promise = promise.then do |result|
|
1769
|
+
http_response = result.response
|
1770
|
+
status_code = http_response.status
|
1771
|
+
response_content = http_response.body
|
1772
|
+
unless status_code == 200
|
1773
|
+
error_model = JSON.load(response_content)
|
1774
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1775
|
+
end
|
1776
|
+
|
1777
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1778
|
+
# Deserialize Response
|
1779
|
+
if status_code == 200
|
1780
|
+
begin
|
1781
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1782
|
+
result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineListResult.mapper()
|
1783
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1784
|
+
rescue Exception => e
|
1785
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1786
|
+
end
|
1787
|
+
end
|
1788
|
+
|
1789
|
+
result
|
1790
|
+
end
|
1791
|
+
|
1792
|
+
promise.execute
|
1793
|
+
end
|
1794
|
+
|
1795
|
+
#
|
1796
|
+
# Lists all of the virtual machines in the specified resource group. Use the
|
1797
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1798
|
+
#
|
1799
|
+
# @param resource_group_name [String] The name of the resource group.
|
1800
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1801
|
+
# will be added to the HTTP request.
|
1802
|
+
#
|
1803
|
+
# @return [VirtualMachineListResult] which provide lazy access to pages of the
|
1804
|
+
# response.
|
1805
|
+
#
|
1806
|
+
def list_as_lazy(resource_group_name, custom_headers = nil)
|
1807
|
+
response = list_async(resource_group_name, custom_headers).value!
|
1808
|
+
unless response.nil?
|
1809
|
+
page = response.body
|
1810
|
+
page.next_method = Proc.new do |next_page_link|
|
1811
|
+
list_next_async(next_page_link, custom_headers)
|
1812
|
+
end
|
1813
|
+
page
|
1814
|
+
end
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
#
|
1818
|
+
# Lists all of the virtual machines in the specified subscription. Use the
|
1819
|
+
# nextLink property in the response to get the next page of virtual machines.
|
1820
|
+
#
|
1821
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1822
|
+
# will be added to the HTTP request.
|
1823
|
+
#
|
1824
|
+
# @return [VirtualMachineListResult] which provide lazy access to pages of the
|
1825
|
+
# response.
|
1826
|
+
#
|
1827
|
+
def list_all_as_lazy(custom_headers = nil)
|
1828
|
+
response = list_all_async(custom_headers).value!
|
1829
|
+
unless response.nil?
|
1830
|
+
page = response.body
|
1831
|
+
page.next_method = Proc.new do |next_page_link|
|
1832
|
+
list_all_next_async(next_page_link, custom_headers)
|
1833
|
+
end
|
1834
|
+
page
|
1835
|
+
end
|
1836
|
+
end
|
1837
|
+
|
1838
|
+
end
|
1839
|
+
end
|