azure_mgmt_compute 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_compute.rb +86 -54
- data/lib/generated/azure_mgmt_compute/availability_sets.rb +17 -6
- data/lib/generated/azure_mgmt_compute/compute_management_client.rb +17 -6
- data/lib/generated/azure_mgmt_compute/disks.rb +1273 -0
- data/lib/generated/azure_mgmt_compute/images.rb +808 -0
- data/lib/generated/azure_mgmt_compute/models/access_level.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/access_uri.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_error.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/api_error_base.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/availability_set.rb +21 -0
- data/lib/generated/azure_mgmt_compute/models/container_service.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +2 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/creation_data.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/data_disk.rb +13 -2
- data/lib/generated/azure_mgmt_compute/models/disk.rb +174 -0
- data/lib/generated/azure_mgmt_compute/models/disk_create_option.rb +20 -0
- data/lib/generated/azure_mgmt_compute/models/disk_list.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/disk_update.rb +109 -0
- data/lib/generated/azure_mgmt_compute/models/encryption_settings.rb +72 -0
- data/lib/generated/azure_mgmt_compute/models/grant_access_data.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/image.rb +113 -0
- data/lib/generated/azure_mgmt_compute/models/image_data_disk.rb +99 -0
- data/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb +57 -0
- data/lib/generated/azure_mgmt_compute/models/image_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/image_osdisk.rb +113 -0
- data/lib/generated/azure_mgmt_compute/models/image_reference.rb +8 -1
- data/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb +63 -0
- data/lib/generated/azure_mgmt_compute/models/inner_error.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +57 -0
- data/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/operation_status_response.rb +90 -0
- data/lib/generated/azure_mgmt_compute/models/osdisk.rb +14 -3
- data/lib/generated/azure_mgmt_compute/models/osprofile.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/resource_update.rb +51 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot.rb +174 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot_list.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot_update.rb +109 -0
- data/lib/generated/azure_mgmt_compute/models/source_vault.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/storage_account_types.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +46 -0
- data/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +27 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +101 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +8 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +47 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +19 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +20 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +21 -10
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +19 -8
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +2 -2
- data/lib/generated/azure_mgmt_compute/snapshots.rb +1273 -0
- data/lib/generated/azure_mgmt_compute/usage_operations.rb +1 -1
- data/lib/generated/azure_mgmt_compute/version.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +3 -3
- data/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +21 -6
- data/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +5 -5
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +263 -26
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +298 -37
- data/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machines.rb +270 -32
- metadata +36 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea3839b2d4bcf548f2d59b465928fc6262b2173a
|
|
4
|
+
data.tar.gz: ee7c60f2e9c3d80886ae9a3023eeb45c18ebb118
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5fd348aecfd15697d5924d278b35ced4ffc1cdf652cecce4f6ecb16b42edf8d42902a14cd40c0528e75ba24aafe97e2671c63f15a6c5c927a40162409cee487
|
|
7
|
+
data.tar.gz: d528b5bd176f51bf52960516348f3436a8de7b5dc29386c48f722a7c78f347273158c00b45f003741c552f4361772823b0e7e982470e27f436f6470871769e49
|
|
@@ -26,119 +26,151 @@ module Azure::ARM::Compute
|
|
|
26
26
|
autoload :VirtualMachineImages, 'generated/azure_mgmt_compute/virtual_machine_images.rb'
|
|
27
27
|
autoload :UsageOperations, 'generated/azure_mgmt_compute/usage_operations.rb'
|
|
28
28
|
autoload :VirtualMachineSizes, 'generated/azure_mgmt_compute/virtual_machine_sizes.rb'
|
|
29
|
+
autoload :Images, 'generated/azure_mgmt_compute/images.rb'
|
|
29
30
|
autoload :VirtualMachines, 'generated/azure_mgmt_compute/virtual_machines.rb'
|
|
30
31
|
autoload :VirtualMachineScaleSets, 'generated/azure_mgmt_compute/virtual_machine_scale_sets.rb'
|
|
31
32
|
autoload :VirtualMachineScaleSetVMs, 'generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb'
|
|
32
33
|
autoload :ContainerServices, 'generated/azure_mgmt_compute/container_services.rb'
|
|
34
|
+
autoload :Disks, 'generated/azure_mgmt_compute/disks.rb'
|
|
35
|
+
autoload :Snapshots, 'generated/azure_mgmt_compute/snapshots.rb'
|
|
33
36
|
autoload :ComputeManagementClient, 'generated/azure_mgmt_compute/compute_management_client.rb'
|
|
34
37
|
|
|
35
38
|
module Models
|
|
36
|
-
autoload :
|
|
37
|
-
autoload :VirtualMachineAgentInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb'
|
|
38
|
-
autoload :DiskInstanceView, 'generated/azure_mgmt_compute/models/disk_instance_view.rb'
|
|
39
|
-
autoload :DiagnosticsProfile, 'generated/azure_mgmt_compute/models/diagnostics_profile.rb'
|
|
40
|
-
autoload :AvailabilitySetListResult, 'generated/azure_mgmt_compute/models/availability_set_list_result.rb'
|
|
41
|
-
autoload :VirtualMachineExtensionHandlerInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb'
|
|
42
|
-
autoload :VirtualMachineSizeListResult, 'generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb'
|
|
43
|
-
autoload :ContainerServiceWindowsProfile, 'generated/azure_mgmt_compute/models/container_service_windows_profile.rb'
|
|
44
|
-
autoload :ContainerServiceCustomProfile, 'generated/azure_mgmt_compute/models/container_service_custom_profile.rb'
|
|
45
|
-
autoload :ContainerServiceAgentPoolProfile, 'generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb'
|
|
46
|
-
autoload :BootDiagnosticsInstanceView, 'generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb'
|
|
47
|
-
autoload :OSDiskImage, 'generated/azure_mgmt_compute/models/osdisk_image.rb'
|
|
39
|
+
autoload :VirtualMachineScaleSetOSDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb'
|
|
48
40
|
autoload :InstanceViewStatus, 'generated/azure_mgmt_compute/models/instance_view_status.rb'
|
|
49
|
-
autoload :
|
|
50
|
-
autoload :Usage, 'generated/azure_mgmt_compute/models/usage.rb'
|
|
51
|
-
autoload :VirtualMachineListResult, 'generated/azure_mgmt_compute/models/virtual_machine_list_result.rb'
|
|
52
|
-
autoload :VirtualMachineCaptureParameters, 'generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb'
|
|
41
|
+
autoload :VirtualMachineScaleSetDataDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb'
|
|
53
42
|
autoload :Sku, 'generated/azure_mgmt_compute/models/sku.rb'
|
|
54
|
-
autoload :Plan, 'generated/azure_mgmt_compute/models/plan.rb'
|
|
55
|
-
autoload :UpgradePolicy, 'generated/azure_mgmt_compute/models/upgrade_policy.rb'
|
|
56
|
-
autoload :ImageReference, 'generated/azure_mgmt_compute/models/image_reference.rb'
|
|
57
|
-
autoload :VirtualMachineScaleSetOSProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb'
|
|
58
|
-
autoload :KeyVaultKeyReference, 'generated/azure_mgmt_compute/models/key_vault_key_reference.rb'
|
|
59
|
-
autoload :VirtualMachineScaleSetOSDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb'
|
|
60
|
-
autoload :VirtualHardDisk, 'generated/azure_mgmt_compute/models/virtual_hard_disk.rb'
|
|
61
43
|
autoload :VirtualMachineScaleSetStorageProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb'
|
|
62
|
-
autoload :
|
|
44
|
+
autoload :AvailabilitySetListResult, 'generated/azure_mgmt_compute/models/availability_set_list_result.rb'
|
|
63
45
|
autoload :ApiEntityReference, 'generated/azure_mgmt_compute/models/api_entity_reference.rb'
|
|
46
|
+
autoload :VirtualMachineSizeListResult, 'generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb'
|
|
47
|
+
autoload :VirtualMachineScaleSetManagedDiskParameters, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb'
|
|
48
|
+
autoload :ImageStorageProfile, 'generated/azure_mgmt_compute/models/image_storage_profile.rb'
|
|
49
|
+
autoload :VirtualMachineExtensionInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb'
|
|
50
|
+
autoload :EncryptionSettings, 'generated/azure_mgmt_compute/models/encryption_settings.rb'
|
|
51
|
+
autoload :PurchasePlan, 'generated/azure_mgmt_compute/models/purchase_plan.rb'
|
|
52
|
+
autoload :ImageListResult, 'generated/azure_mgmt_compute/models/image_list_result.rb'
|
|
53
|
+
autoload :DataDiskImage, 'generated/azure_mgmt_compute/models/data_disk_image.rb'
|
|
54
|
+
autoload :VirtualMachineScaleSetOSProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb'
|
|
55
|
+
autoload :UsageName, 'generated/azure_mgmt_compute/models/usage_name.rb'
|
|
56
|
+
autoload :ContainerServiceDiagnosticsProfile, 'generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb'
|
|
57
|
+
autoload :ListUsagesResult, 'generated/azure_mgmt_compute/models/list_usages_result.rb'
|
|
58
|
+
autoload :SourceVault, 'generated/azure_mgmt_compute/models/source_vault.rb'
|
|
59
|
+
autoload :Plan, 'generated/azure_mgmt_compute/models/plan.rb'
|
|
60
|
+
autoload :HardwareProfile, 'generated/azure_mgmt_compute/models/hardware_profile.rb'
|
|
61
|
+
autoload :ContainerServiceVMDiagnostics, 'generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb'
|
|
62
|
+
autoload :KeyVaultSecretReference, 'generated/azure_mgmt_compute/models/key_vault_secret_reference.rb'
|
|
63
|
+
autoload :VirtualMachineSize, 'generated/azure_mgmt_compute/models/virtual_machine_size.rb'
|
|
64
|
+
autoload :DiskEncryptionSettings, 'generated/azure_mgmt_compute/models/disk_encryption_settings.rb'
|
|
65
|
+
autoload :ContainerServiceLinuxProfile, 'generated/azure_mgmt_compute/models/container_service_linux_profile.rb'
|
|
66
|
+
autoload :ImageDiskReference, 'generated/azure_mgmt_compute/models/image_disk_reference.rb'
|
|
67
|
+
autoload :DataDisk, 'generated/azure_mgmt_compute/models/data_disk.rb'
|
|
68
|
+
autoload :SnapshotList, 'generated/azure_mgmt_compute/models/snapshot_list.rb'
|
|
64
69
|
autoload :AdditionalUnattendContent, 'generated/azure_mgmt_compute/models/additional_unattend_content.rb'
|
|
65
|
-
autoload :
|
|
70
|
+
autoload :VirtualMachineScaleSetNetworkProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb'
|
|
66
71
|
autoload :WinRMConfiguration, 'generated/azure_mgmt_compute/models/win_rmconfiguration.rb'
|
|
67
|
-
autoload :
|
|
72
|
+
autoload :AccessUri, 'generated/azure_mgmt_compute/models/access_uri.rb'
|
|
68
73
|
autoload :SshPublicKey, 'generated/azure_mgmt_compute/models/ssh_public_key.rb'
|
|
69
|
-
autoload :VirtualMachineScaleSetNetworkProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb'
|
|
70
|
-
autoload :LinuxConfiguration, 'generated/azure_mgmt_compute/models/linux_configuration.rb'
|
|
71
|
-
autoload :ContainerServiceDiagnosticsProfile, 'generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb'
|
|
72
|
-
autoload :VaultSecretGroup, 'generated/azure_mgmt_compute/models/vault_secret_group.rb'
|
|
73
74
|
autoload :VirtualMachineScaleSetExtensionProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb'
|
|
74
|
-
autoload :
|
|
75
|
+
autoload :LinuxConfiguration, 'generated/azure_mgmt_compute/models/linux_configuration.rb'
|
|
75
76
|
autoload :VirtualMachineScaleSetVMProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb'
|
|
76
|
-
autoload :
|
|
77
|
-
autoload :
|
|
78
|
-
autoload :
|
|
77
|
+
autoload :VaultSecretGroup, 'generated/azure_mgmt_compute/models/vault_secret_group.rb'
|
|
78
|
+
autoload :GrantAccessData, 'generated/azure_mgmt_compute/models/grant_access_data.rb'
|
|
79
|
+
autoload :ResourceUpdate, 'generated/azure_mgmt_compute/models/resource_update.rb'
|
|
79
80
|
autoload :VirtualMachineScaleSetVMInstanceIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb'
|
|
80
|
-
autoload :
|
|
81
|
+
autoload :BootDiagnostics, 'generated/azure_mgmt_compute/models/boot_diagnostics.rb'
|
|
81
82
|
autoload :VirtualMachineScaleSetVMInstanceRequiredIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb'
|
|
82
|
-
autoload :
|
|
83
|
+
autoload :VirtualMachineExtensionHandlerInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb'
|
|
83
84
|
autoload :VirtualMachineStatusCodeCount, 'generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb'
|
|
84
|
-
autoload :
|
|
85
|
+
autoload :DiskInstanceView, 'generated/azure_mgmt_compute/models/disk_instance_view.rb'
|
|
85
86
|
autoload :VirtualMachineScaleSetInstanceViewStatusesSummary, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb'
|
|
86
|
-
autoload :
|
|
87
|
+
autoload :VirtualMachineInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb'
|
|
87
88
|
autoload :VirtualMachineScaleSetVMExtensionsSummary, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb'
|
|
88
|
-
autoload :
|
|
89
|
+
autoload :VirtualMachineListResult, 'generated/azure_mgmt_compute/models/virtual_machine_list_result.rb'
|
|
89
90
|
autoload :VirtualMachineScaleSetInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb'
|
|
90
|
-
autoload :
|
|
91
|
+
autoload :ImageOSDisk, 'generated/azure_mgmt_compute/models/image_osdisk.rb'
|
|
91
92
|
autoload :VirtualMachineScaleSetListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb'
|
|
92
|
-
autoload :
|
|
93
|
+
autoload :KeyVaultAndKeyReference, 'generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb'
|
|
93
94
|
autoload :VirtualMachineScaleSetListWithLinkResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb'
|
|
94
|
-
autoload :
|
|
95
|
+
autoload :KeyVaultAndSecretReference, 'generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb'
|
|
95
96
|
autoload :VirtualMachineScaleSetSkuCapacity, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb'
|
|
96
|
-
autoload :
|
|
97
|
+
autoload :VirtualMachineCaptureParameters, 'generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb'
|
|
97
98
|
autoload :VirtualMachineScaleSetSku, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb'
|
|
98
|
-
autoload :
|
|
99
|
+
autoload :KeyVaultKeyReference, 'generated/azure_mgmt_compute/models/key_vault_key_reference.rb'
|
|
99
100
|
autoload :VirtualMachineScaleSetListSkusResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb'
|
|
100
|
-
autoload :
|
|
101
|
-
autoload :
|
|
102
|
-
autoload :
|
|
101
|
+
autoload :OSDisk, 'generated/azure_mgmt_compute/models/osdisk.rb'
|
|
102
|
+
autoload :DiskList, 'generated/azure_mgmt_compute/models/disk_list.rb'
|
|
103
|
+
autoload :WinRMListener, 'generated/azure_mgmt_compute/models/win_rmlistener.rb'
|
|
103
104
|
autoload :VirtualMachineScaleSetVMInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb'
|
|
104
|
-
autoload :
|
|
105
|
+
autoload :SshConfiguration, 'generated/azure_mgmt_compute/models/ssh_configuration.rb'
|
|
105
106
|
autoload :VirtualMachineScaleSetVMListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb'
|
|
106
|
-
autoload :
|
|
107
|
+
autoload :OSProfile, 'generated/azure_mgmt_compute/models/osprofile.rb'
|
|
107
108
|
autoload :ApiErrorBase, 'generated/azure_mgmt_compute/models/api_error_base.rb'
|
|
108
|
-
autoload :
|
|
109
|
+
autoload :DiagnosticsProfile, 'generated/azure_mgmt_compute/models/diagnostics_profile.rb'
|
|
109
110
|
autoload :InnerError, 'generated/azure_mgmt_compute/models/inner_error.rb'
|
|
110
|
-
autoload :
|
|
111
|
+
autoload :BootDiagnosticsInstanceView, 'generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb'
|
|
111
112
|
autoload :ApiError, 'generated/azure_mgmt_compute/models/api_error.rb'
|
|
112
|
-
autoload :
|
|
113
|
+
autoload :UpgradePolicy, 'generated/azure_mgmt_compute/models/upgrade_policy.rb'
|
|
113
114
|
autoload :ComputeLongRunningOperationProperties, 'generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb'
|
|
114
|
-
autoload :
|
|
115
|
+
autoload :OSDiskImage, 'generated/azure_mgmt_compute/models/osdisk_image.rb'
|
|
116
|
+
autoload :CreationData, 'generated/azure_mgmt_compute/models/creation_data.rb'
|
|
117
|
+
autoload :SubResourceReadOnly, 'generated/azure_mgmt_compute/models/sub_resource_read_only.rb'
|
|
118
|
+
autoload :StorageProfile, 'generated/azure_mgmt_compute/models/storage_profile.rb'
|
|
119
|
+
autoload :OperationStatusResponse, 'generated/azure_mgmt_compute/models/operation_status_response.rb'
|
|
120
|
+
autoload :VaultCertificate, 'generated/azure_mgmt_compute/models/vault_certificate.rb'
|
|
121
|
+
autoload :ContainerServiceCustomProfile, 'generated/azure_mgmt_compute/models/container_service_custom_profile.rb'
|
|
122
|
+
autoload :VirtualMachineAgentInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb'
|
|
123
|
+
autoload :ContainerServiceServicePrincipalProfile, 'generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb'
|
|
124
|
+
autoload :ImageDataDisk, 'generated/azure_mgmt_compute/models/image_data_disk.rb'
|
|
125
|
+
autoload :ContainerServiceOrchestratorProfile, 'generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb'
|
|
126
|
+
autoload :VirtualHardDisk, 'generated/azure_mgmt_compute/models/virtual_hard_disk.rb'
|
|
127
|
+
autoload :ContainerServiceMasterProfile, 'generated/azure_mgmt_compute/models/container_service_master_profile.rb'
|
|
128
|
+
autoload :NetworkProfile, 'generated/azure_mgmt_compute/models/network_profile.rb'
|
|
129
|
+
autoload :ContainerServiceAgentPoolProfile, 'generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb'
|
|
130
|
+
autoload :Usage, 'generated/azure_mgmt_compute/models/usage.rb'
|
|
131
|
+
autoload :ContainerServiceWindowsProfile, 'generated/azure_mgmt_compute/models/container_service_windows_profile.rb'
|
|
132
|
+
autoload :ContainerServiceListResult, 'generated/azure_mgmt_compute/models/container_service_list_result.rb'
|
|
133
|
+
autoload :ContainerServiceSshPublicKey, 'generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb'
|
|
134
|
+
autoload :WindowsConfiguration, 'generated/azure_mgmt_compute/models/windows_configuration.rb'
|
|
135
|
+
autoload :ContainerServiceSshConfiguration, 'generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb'
|
|
115
136
|
autoload :AvailabilitySet, 'generated/azure_mgmt_compute/models/availability_set.rb'
|
|
116
137
|
autoload :VirtualMachineExtensionImage, 'generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb'
|
|
117
138
|
autoload :VirtualMachineImageResource, 'generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb'
|
|
118
139
|
autoload :VirtualMachineExtension, 'generated/azure_mgmt_compute/models/virtual_machine_extension.rb'
|
|
119
140
|
autoload :VirtualMachineImage, 'generated/azure_mgmt_compute/models/virtual_machine_image.rb'
|
|
120
141
|
autoload :VirtualMachineCaptureResult, 'generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb'
|
|
142
|
+
autoload :ImageReference, 'generated/azure_mgmt_compute/models/image_reference.rb'
|
|
143
|
+
autoload :ManagedDiskParameters, 'generated/azure_mgmt_compute/models/managed_disk_parameters.rb'
|
|
121
144
|
autoload :NetworkInterfaceReference, 'generated/azure_mgmt_compute/models/network_interface_reference.rb'
|
|
122
145
|
autoload :VirtualMachine, 'generated/azure_mgmt_compute/models/virtual_machine.rb'
|
|
146
|
+
autoload :Image, 'generated/azure_mgmt_compute/models/image.rb'
|
|
123
147
|
autoload :VirtualMachineScaleSetIPConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb'
|
|
124
148
|
autoload :VirtualMachineScaleSetNetworkConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb'
|
|
125
149
|
autoload :VirtualMachineScaleSetExtension, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb'
|
|
126
150
|
autoload :VirtualMachineScaleSet, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb'
|
|
127
151
|
autoload :VirtualMachineScaleSetVM, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb'
|
|
128
152
|
autoload :ContainerService, 'generated/azure_mgmt_compute/models/container_service.rb'
|
|
153
|
+
autoload :Disk, 'generated/azure_mgmt_compute/models/disk.rb'
|
|
154
|
+
autoload :DiskUpdate, 'generated/azure_mgmt_compute/models/disk_update.rb'
|
|
155
|
+
autoload :Snapshot, 'generated/azure_mgmt_compute/models/snapshot.rb'
|
|
156
|
+
autoload :SnapshotUpdate, 'generated/azure_mgmt_compute/models/snapshot_update.rb'
|
|
129
157
|
autoload :StatusLevelTypes, 'generated/azure_mgmt_compute/models/status_level_types.rb'
|
|
130
158
|
autoload :OperatingSystemTypes, 'generated/azure_mgmt_compute/models/operating_system_types.rb'
|
|
131
159
|
autoload :VirtualMachineSizeTypes, 'generated/azure_mgmt_compute/models/virtual_machine_size_types.rb'
|
|
132
160
|
autoload :CachingTypes, 'generated/azure_mgmt_compute/models/caching_types.rb'
|
|
133
161
|
autoload :DiskCreateOptionTypes, 'generated/azure_mgmt_compute/models/disk_create_option_types.rb'
|
|
162
|
+
autoload :StorageAccountTypes, 'generated/azure_mgmt_compute/models/storage_account_types.rb'
|
|
134
163
|
autoload :PassNames, 'generated/azure_mgmt_compute/models/pass_names.rb'
|
|
135
164
|
autoload :ComponentNames, 'generated/azure_mgmt_compute/models/component_names.rb'
|
|
136
165
|
autoload :SettingNames, 'generated/azure_mgmt_compute/models/setting_names.rb'
|
|
137
166
|
autoload :ProtocolTypes, 'generated/azure_mgmt_compute/models/protocol_types.rb'
|
|
138
167
|
autoload :UpgradeMode, 'generated/azure_mgmt_compute/models/upgrade_mode.rb'
|
|
168
|
+
autoload :OperatingSystemStateTypes, 'generated/azure_mgmt_compute/models/operating_system_state_types.rb'
|
|
139
169
|
autoload :VirtualMachineScaleSetSkuScaleType, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb'
|
|
140
|
-
autoload :InstanceViewTypes, 'generated/azure_mgmt_compute/models/instance_view_types.rb'
|
|
141
170
|
autoload :ContainerServiceOchestratorTypes, 'generated/azure_mgmt_compute/models/container_service_ochestrator_types.rb'
|
|
142
171
|
autoload :ContainerServiceVMSizeTypes, 'generated/azure_mgmt_compute/models/container_service_vmsize_types.rb'
|
|
172
|
+
autoload :DiskCreateOption, 'generated/azure_mgmt_compute/models/disk_create_option.rb'
|
|
173
|
+
autoload :AccessLevel, 'generated/azure_mgmt_compute/models/access_level.rb'
|
|
174
|
+
autoload :InstanceViewTypes, 'generated/azure_mgmt_compute/models/instance_view_types.rb'
|
|
143
175
|
end
|
|
144
176
|
end
|
|
@@ -71,7 +71,7 @@ module Azure::ARM::Compute
|
|
|
71
71
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
72
72
|
fail ArgumentError, 'name is nil' if name.nil?
|
|
73
73
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
74
|
-
api_version = '2016-
|
|
74
|
+
api_version = '2016-04-30-preview'
|
|
75
75
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
76
76
|
|
|
77
77
|
|
|
@@ -137,10 +137,11 @@ module Azure::ARM::Compute
|
|
|
137
137
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
138
138
|
# will be added to the HTTP request.
|
|
139
139
|
#
|
|
140
|
+
# @return [OperationStatusResponse] operation results.
|
|
140
141
|
#
|
|
141
142
|
def delete(resource_group_name, availability_set_name, custom_headers = nil)
|
|
142
143
|
response = delete_async(resource_group_name, availability_set_name, custom_headers).value!
|
|
143
|
-
nil
|
|
144
|
+
response.body unless response.nil?
|
|
144
145
|
end
|
|
145
146
|
|
|
146
147
|
#
|
|
@@ -170,7 +171,7 @@ module Azure::ARM::Compute
|
|
|
170
171
|
def delete_async(resource_group_name, availability_set_name, custom_headers = nil)
|
|
171
172
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
172
173
|
fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
|
|
173
|
-
api_version = '2016-
|
|
174
|
+
api_version = '2016-04-30-preview'
|
|
174
175
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
175
176
|
|
|
176
177
|
|
|
@@ -202,6 +203,16 @@ module Azure::ARM::Compute
|
|
|
202
203
|
end
|
|
203
204
|
|
|
204
205
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
206
|
+
# Deserialize Response
|
|
207
|
+
if status_code == 200
|
|
208
|
+
begin
|
|
209
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
210
|
+
result_mapper = OperationStatusResponse.mapper()
|
|
211
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
212
|
+
rescue Exception => e
|
|
213
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
205
216
|
|
|
206
217
|
result
|
|
207
218
|
end
|
|
@@ -251,7 +262,7 @@ module Azure::ARM::Compute
|
|
|
251
262
|
def get_async(resource_group_name, availability_set_name, custom_headers = nil)
|
|
252
263
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
253
264
|
fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
|
|
254
|
-
api_version = '2016-
|
|
265
|
+
api_version = '2016-04-30-preview'
|
|
255
266
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
256
267
|
|
|
257
268
|
|
|
@@ -338,7 +349,7 @@ module Azure::ARM::Compute
|
|
|
338
349
|
#
|
|
339
350
|
def list_async(resource_group_name, custom_headers = nil)
|
|
340
351
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
341
|
-
api_version = '2016-
|
|
352
|
+
api_version = '2016-04-30-preview'
|
|
342
353
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
343
354
|
|
|
344
355
|
|
|
@@ -432,7 +443,7 @@ module Azure::ARM::Compute
|
|
|
432
443
|
def list_available_sizes_async(resource_group_name, availability_set_name, custom_headers = nil)
|
|
433
444
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
434
445
|
fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
|
|
435
|
-
api_version = '2016-
|
|
446
|
+
api_version = '2016-04-30-preview'
|
|
436
447
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
437
448
|
|
|
438
449
|
|
|
@@ -17,7 +17,7 @@ module Azure::ARM::Compute
|
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
|
18
18
|
attr_reader :credentials
|
|
19
19
|
|
|
20
|
-
# @return [String] Subscription credentials
|
|
20
|
+
# @return [String] Subscription credentials which uniquely identify
|
|
21
21
|
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
|
22
22
|
# for every service call.
|
|
23
23
|
attr_accessor :subscription_id
|
|
@@ -51,6 +51,9 @@ module Azure::ARM::Compute
|
|
|
51
51
|
# @return [VirtualMachineSizes] virtual_machine_sizes
|
|
52
52
|
attr_reader :virtual_machine_sizes
|
|
53
53
|
|
|
54
|
+
# @return [Images] images
|
|
55
|
+
attr_reader :images
|
|
56
|
+
|
|
54
57
|
# @return [VirtualMachines] virtual_machines
|
|
55
58
|
attr_reader :virtual_machines
|
|
56
59
|
|
|
@@ -63,18 +66,23 @@ module Azure::ARM::Compute
|
|
|
63
66
|
# @return [ContainerServices] container_services
|
|
64
67
|
attr_reader :container_services
|
|
65
68
|
|
|
69
|
+
# @return [Disks] disks
|
|
70
|
+
attr_reader :disks
|
|
71
|
+
|
|
72
|
+
# @return [Snapshots] snapshots
|
|
73
|
+
attr_reader :snapshots
|
|
74
|
+
|
|
66
75
|
#
|
|
67
76
|
# Creates initializes a new instance of the ComputeManagementClient class.
|
|
68
77
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
|
69
78
|
# @param base_url [String] the base URI of the service.
|
|
70
79
|
# @param options [Array] filters to be applied to the HTTP requests.
|
|
71
80
|
#
|
|
72
|
-
def initialize(credentials, base_url = nil, options = nil)
|
|
81
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
|
73
82
|
super(credentials, options)
|
|
74
83
|
@base_url = base_url || 'https://management.azure.com'
|
|
75
84
|
|
|
76
|
-
fail ArgumentError, 'credentials
|
|
77
|
-
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
|
85
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
|
78
86
|
@credentials = credentials
|
|
79
87
|
|
|
80
88
|
@availability_sets = AvailabilitySets.new(self)
|
|
@@ -83,10 +91,13 @@ module Azure::ARM::Compute
|
|
|
83
91
|
@virtual_machine_images = VirtualMachineImages.new(self)
|
|
84
92
|
@usage_operations = UsageOperations.new(self)
|
|
85
93
|
@virtual_machine_sizes = VirtualMachineSizes.new(self)
|
|
94
|
+
@images = Images.new(self)
|
|
86
95
|
@virtual_machines = VirtualMachines.new(self)
|
|
87
96
|
@virtual_machine_scale_sets = VirtualMachineScaleSets.new(self)
|
|
88
97
|
@virtual_machine_scale_set_vms = VirtualMachineScaleSetVMs.new(self)
|
|
89
98
|
@container_services = ContainerServices.new(self)
|
|
99
|
+
@disks = Disks.new(self)
|
|
100
|
+
@snapshots = Snapshots.new(self)
|
|
90
101
|
@accept_language = 'en-US'
|
|
91
102
|
@long_running_operation_retry_timeout = 30
|
|
92
103
|
@generate_client_request_id = true
|
|
@@ -95,7 +106,7 @@ module Azure::ARM::Compute
|
|
|
95
106
|
|
|
96
107
|
#
|
|
97
108
|
# Makes a request and returns the body of the response.
|
|
98
|
-
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
109
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
99
110
|
# @param path [String] the path, relative to {base_url}.
|
|
100
111
|
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
101
112
|
# @return [Hash{String=>String}] containing the body of the response.
|
|
@@ -156,7 +167,7 @@ module Azure::ARM::Compute
|
|
|
156
167
|
def add_telemetry
|
|
157
168
|
sdk_information = 'azure_mgmt_compute'
|
|
158
169
|
if defined? Azure::ARM::Compute::VERSION
|
|
159
|
-
sdk_information = "#{sdk_information}/#{Azure::ARM::Compute::VERSION}"
|
|
170
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::Compute::VERSION}"
|
|
160
171
|
end
|
|
161
172
|
add_user_agent_information(sdk_information)
|
|
162
173
|
end
|
|
@@ -0,0 +1,1273 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
#
|
|
8
|
+
# Composite Swagger for Compute Client
|
|
9
|
+
#
|
|
10
|
+
class Disks
|
|
11
|
+
include Azure::ARM::Compute::Models
|
|
12
|
+
include MsRestAzure
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# Creates and initializes a new instance of the Disks class.
|
|
16
|
+
# @param client service class for accessing basic functionality.
|
|
17
|
+
#
|
|
18
|
+
def initialize(client)
|
|
19
|
+
@client = client
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @return [ComputeManagementClient] reference to the ComputeManagementClient
|
|
23
|
+
attr_reader :client
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Creates or updates a disk.
|
|
27
|
+
#
|
|
28
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
29
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
30
|
+
# and resource group.
|
|
31
|
+
# @param disk [Disk] Disk object supplied in the body of the Put disk
|
|
32
|
+
# operation.
|
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
34
|
+
# will be added to the HTTP request.
|
|
35
|
+
#
|
|
36
|
+
# @return [Disk] operation results.
|
|
37
|
+
#
|
|
38
|
+
def create_or_update(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
39
|
+
response = create_or_update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
40
|
+
response.body unless response.nil?
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
#
|
|
44
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
45
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
46
|
+
# and resource group.
|
|
47
|
+
# @param disk [Disk] Disk object supplied in the body of the Put disk
|
|
48
|
+
# operation.
|
|
49
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
50
|
+
# will be added to the HTTP request.
|
|
51
|
+
#
|
|
52
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
53
|
+
# response.
|
|
54
|
+
#
|
|
55
|
+
def create_or_update_async(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
56
|
+
# Send request
|
|
57
|
+
promise = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers)
|
|
58
|
+
|
|
59
|
+
promise = promise.then do |response|
|
|
60
|
+
# Defining deserialization method.
|
|
61
|
+
deserialize_method = lambda do |parsed_response|
|
|
62
|
+
result_mapper = Disk.mapper()
|
|
63
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Waiting for response.
|
|
67
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
promise
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
#
|
|
74
|
+
# Updates (patches) a disk.
|
|
75
|
+
#
|
|
76
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
77
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
78
|
+
# and resource group.
|
|
79
|
+
# @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
|
|
80
|
+
# operation.
|
|
81
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
82
|
+
# will be added to the HTTP request.
|
|
83
|
+
#
|
|
84
|
+
# @return [Disk] operation results.
|
|
85
|
+
#
|
|
86
|
+
def update(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
87
|
+
response = update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
88
|
+
response.body unless response.nil?
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
#
|
|
92
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
93
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
94
|
+
# and resource group.
|
|
95
|
+
# @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
|
|
96
|
+
# operation.
|
|
97
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
98
|
+
# will be added to the HTTP request.
|
|
99
|
+
#
|
|
100
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
101
|
+
# response.
|
|
102
|
+
#
|
|
103
|
+
def update_async(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
104
|
+
# Send request
|
|
105
|
+
promise = begin_update_async(resource_group_name, disk_name, disk, custom_headers)
|
|
106
|
+
|
|
107
|
+
promise = promise.then do |response|
|
|
108
|
+
# Defining deserialization method.
|
|
109
|
+
deserialize_method = lambda do |parsed_response|
|
|
110
|
+
result_mapper = Disk.mapper()
|
|
111
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Waiting for response.
|
|
115
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
promise
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
#
|
|
122
|
+
# Gets information about a disk.
|
|
123
|
+
#
|
|
124
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
125
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
126
|
+
# and resource group.
|
|
127
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
128
|
+
# will be added to the HTTP request.
|
|
129
|
+
#
|
|
130
|
+
# @return [Disk] operation results.
|
|
131
|
+
#
|
|
132
|
+
def get(resource_group_name, disk_name, custom_headers = nil)
|
|
133
|
+
response = get_async(resource_group_name, disk_name, custom_headers).value!
|
|
134
|
+
response.body unless response.nil?
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
#
|
|
138
|
+
# Gets information about a disk.
|
|
139
|
+
#
|
|
140
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
141
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
142
|
+
# and resource group.
|
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
144
|
+
# will be added to the HTTP request.
|
|
145
|
+
#
|
|
146
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
147
|
+
#
|
|
148
|
+
def get_with_http_info(resource_group_name, disk_name, custom_headers = nil)
|
|
149
|
+
get_async(resource_group_name, disk_name, custom_headers).value!
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
#
|
|
153
|
+
# Gets information about a disk.
|
|
154
|
+
#
|
|
155
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
156
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
157
|
+
# and resource group.
|
|
158
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
159
|
+
# to the HTTP request.
|
|
160
|
+
#
|
|
161
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
162
|
+
#
|
|
163
|
+
def get_async(resource_group_name, disk_name, custom_headers = nil)
|
|
164
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
165
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
166
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
167
|
+
api_version = '2016-04-30-preview'
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
request_headers = {}
|
|
171
|
+
|
|
172
|
+
# Set Headers
|
|
173
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
174
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
175
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
|
|
176
|
+
|
|
177
|
+
request_url = @base_url || @client.base_url
|
|
178
|
+
|
|
179
|
+
options = {
|
|
180
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
181
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
182
|
+
query_params: {'api-version' => api_version},
|
|
183
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
184
|
+
base_url: request_url
|
|
185
|
+
}
|
|
186
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
187
|
+
|
|
188
|
+
promise = promise.then do |result|
|
|
189
|
+
http_response = result.response
|
|
190
|
+
status_code = http_response.status
|
|
191
|
+
response_content = http_response.body
|
|
192
|
+
unless status_code == 200
|
|
193
|
+
error_model = JSON.load(response_content)
|
|
194
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
198
|
+
# Deserialize Response
|
|
199
|
+
if status_code == 200
|
|
200
|
+
begin
|
|
201
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
202
|
+
result_mapper = Disk.mapper()
|
|
203
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
204
|
+
rescue Exception => e
|
|
205
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
result
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
promise.execute
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
#
|
|
216
|
+
# Deletes a disk.
|
|
217
|
+
#
|
|
218
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
219
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
220
|
+
# and resource group.
|
|
221
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
222
|
+
# will be added to the HTTP request.
|
|
223
|
+
#
|
|
224
|
+
# @return [OperationStatusResponse] operation results.
|
|
225
|
+
#
|
|
226
|
+
def delete(resource_group_name, disk_name, custom_headers = nil)
|
|
227
|
+
response = delete_async(resource_group_name, disk_name, custom_headers).value!
|
|
228
|
+
response.body unless response.nil?
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
#
|
|
232
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
233
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
234
|
+
# and resource group.
|
|
235
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
236
|
+
# will be added to the HTTP request.
|
|
237
|
+
#
|
|
238
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
239
|
+
# response.
|
|
240
|
+
#
|
|
241
|
+
def delete_async(resource_group_name, disk_name, custom_headers = nil)
|
|
242
|
+
# Send request
|
|
243
|
+
promise = begin_delete_async(resource_group_name, disk_name, custom_headers)
|
|
244
|
+
|
|
245
|
+
promise = promise.then do |response|
|
|
246
|
+
# Defining deserialization method.
|
|
247
|
+
deserialize_method = lambda do |parsed_response|
|
|
248
|
+
result_mapper = OperationStatusResponse.mapper()
|
|
249
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Waiting for response.
|
|
253
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
promise
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
#
|
|
260
|
+
# Lists all the disks under a resource group.
|
|
261
|
+
#
|
|
262
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
263
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
264
|
+
# will be added to the HTTP request.
|
|
265
|
+
#
|
|
266
|
+
# @return [Array<Disk>] operation results.
|
|
267
|
+
#
|
|
268
|
+
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
|
269
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
|
270
|
+
first_page.get_all_items
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
#
|
|
274
|
+
# Lists all the disks under a resource group.
|
|
275
|
+
#
|
|
276
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
277
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
278
|
+
# will be added to the HTTP request.
|
|
279
|
+
#
|
|
280
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
281
|
+
#
|
|
282
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
|
|
283
|
+
list_by_resource_group_async(resource_group_name, custom_headers).value!
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
#
|
|
287
|
+
# Lists all the disks under a resource group.
|
|
288
|
+
#
|
|
289
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
290
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
291
|
+
# to the HTTP request.
|
|
292
|
+
#
|
|
293
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
294
|
+
#
|
|
295
|
+
def list_by_resource_group_async(resource_group_name, custom_headers = nil)
|
|
296
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
297
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
298
|
+
api_version = '2016-04-30-preview'
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
request_headers = {}
|
|
302
|
+
|
|
303
|
+
# Set Headers
|
|
304
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
305
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
306
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'
|
|
307
|
+
|
|
308
|
+
request_url = @base_url || @client.base_url
|
|
309
|
+
|
|
310
|
+
options = {
|
|
311
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
312
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
|
313
|
+
query_params: {'api-version' => api_version},
|
|
314
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
315
|
+
base_url: request_url
|
|
316
|
+
}
|
|
317
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
318
|
+
|
|
319
|
+
promise = promise.then do |result|
|
|
320
|
+
http_response = result.response
|
|
321
|
+
status_code = http_response.status
|
|
322
|
+
response_content = http_response.body
|
|
323
|
+
unless status_code == 200
|
|
324
|
+
error_model = JSON.load(response_content)
|
|
325
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
329
|
+
# Deserialize Response
|
|
330
|
+
if status_code == 200
|
|
331
|
+
begin
|
|
332
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
333
|
+
result_mapper = DiskList.mapper()
|
|
334
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
335
|
+
rescue Exception => e
|
|
336
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
result
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
promise.execute
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
#
|
|
347
|
+
# Lists all the disks under a subscription.
|
|
348
|
+
#
|
|
349
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
350
|
+
# will be added to the HTTP request.
|
|
351
|
+
#
|
|
352
|
+
# @return [Array<Disk>] operation results.
|
|
353
|
+
#
|
|
354
|
+
def list(custom_headers = nil)
|
|
355
|
+
first_page = list_as_lazy(custom_headers)
|
|
356
|
+
first_page.get_all_items
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
#
|
|
360
|
+
# Lists all the disks under a subscription.
|
|
361
|
+
#
|
|
362
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
363
|
+
# will be added to the HTTP request.
|
|
364
|
+
#
|
|
365
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
366
|
+
#
|
|
367
|
+
def list_with_http_info(custom_headers = nil)
|
|
368
|
+
list_async(custom_headers).value!
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
#
|
|
372
|
+
# Lists all the disks under a subscription.
|
|
373
|
+
#
|
|
374
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
375
|
+
# to the HTTP request.
|
|
376
|
+
#
|
|
377
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
378
|
+
#
|
|
379
|
+
def list_async(custom_headers = nil)
|
|
380
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
381
|
+
api_version = '2016-04-30-preview'
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
request_headers = {}
|
|
385
|
+
|
|
386
|
+
# Set Headers
|
|
387
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
388
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
389
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'
|
|
390
|
+
|
|
391
|
+
request_url = @base_url || @client.base_url
|
|
392
|
+
|
|
393
|
+
options = {
|
|
394
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
395
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
|
396
|
+
query_params: {'api-version' => api_version},
|
|
397
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
398
|
+
base_url: request_url
|
|
399
|
+
}
|
|
400
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
401
|
+
|
|
402
|
+
promise = promise.then do |result|
|
|
403
|
+
http_response = result.response
|
|
404
|
+
status_code = http_response.status
|
|
405
|
+
response_content = http_response.body
|
|
406
|
+
unless status_code == 200
|
|
407
|
+
error_model = JSON.load(response_content)
|
|
408
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
412
|
+
# Deserialize Response
|
|
413
|
+
if status_code == 200
|
|
414
|
+
begin
|
|
415
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
416
|
+
result_mapper = DiskList.mapper()
|
|
417
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
418
|
+
rescue Exception => e
|
|
419
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
420
|
+
end
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
result
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
promise.execute
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
#
|
|
430
|
+
# Grants access to a disk.
|
|
431
|
+
#
|
|
432
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
433
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
434
|
+
# and resource group.
|
|
435
|
+
# @param grant_access_data [GrantAccessData] Access data object supplied in the
|
|
436
|
+
# body of the get disk access operation.
|
|
437
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
438
|
+
# will be added to the HTTP request.
|
|
439
|
+
#
|
|
440
|
+
# @return [AccessUri] operation results.
|
|
441
|
+
#
|
|
442
|
+
def grant_access(resource_group_name, disk_name, grant_access_data, custom_headers = nil)
|
|
443
|
+
response = grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers).value!
|
|
444
|
+
response.body unless response.nil?
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
#
|
|
448
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
449
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
450
|
+
# and resource group.
|
|
451
|
+
# @param grant_access_data [GrantAccessData] Access data object supplied in the
|
|
452
|
+
# body of the get disk access operation.
|
|
453
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
454
|
+
# will be added to the HTTP request.
|
|
455
|
+
#
|
|
456
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
457
|
+
# response.
|
|
458
|
+
#
|
|
459
|
+
def grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers = nil)
|
|
460
|
+
# Send request
|
|
461
|
+
promise = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers)
|
|
462
|
+
|
|
463
|
+
promise = promise.then do |response|
|
|
464
|
+
# Defining deserialization method.
|
|
465
|
+
deserialize_method = lambda do |parsed_response|
|
|
466
|
+
result_mapper = AccessUri.mapper()
|
|
467
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Waiting for response.
|
|
471
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
promise
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
#
|
|
478
|
+
# Revokes access to a disk.
|
|
479
|
+
#
|
|
480
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
481
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
482
|
+
# and resource group.
|
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
484
|
+
# will be added to the HTTP request.
|
|
485
|
+
#
|
|
486
|
+
# @return [OperationStatusResponse] operation results.
|
|
487
|
+
#
|
|
488
|
+
def revoke_access(resource_group_name, disk_name, custom_headers = nil)
|
|
489
|
+
response = revoke_access_async(resource_group_name, disk_name, custom_headers).value!
|
|
490
|
+
response.body unless response.nil?
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
#
|
|
494
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
495
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
496
|
+
# and resource group.
|
|
497
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
498
|
+
# will be added to the HTTP request.
|
|
499
|
+
#
|
|
500
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
501
|
+
# response.
|
|
502
|
+
#
|
|
503
|
+
def revoke_access_async(resource_group_name, disk_name, custom_headers = nil)
|
|
504
|
+
# Send request
|
|
505
|
+
promise = begin_revoke_access_async(resource_group_name, disk_name, custom_headers)
|
|
506
|
+
|
|
507
|
+
promise = promise.then do |response|
|
|
508
|
+
# Defining deserialization method.
|
|
509
|
+
deserialize_method = lambda do |parsed_response|
|
|
510
|
+
result_mapper = OperationStatusResponse.mapper()
|
|
511
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# Waiting for response.
|
|
515
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
promise
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
#
|
|
522
|
+
# Creates or updates a disk.
|
|
523
|
+
#
|
|
524
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
525
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
526
|
+
# and resource group.
|
|
527
|
+
# @param disk [Disk] Disk object supplied in the body of the Put disk
|
|
528
|
+
# operation.
|
|
529
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
530
|
+
# will be added to the HTTP request.
|
|
531
|
+
#
|
|
532
|
+
# @return [Disk] operation results.
|
|
533
|
+
#
|
|
534
|
+
def begin_create_or_update(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
535
|
+
response = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
536
|
+
response.body unless response.nil?
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
#
|
|
540
|
+
# Creates or updates a disk.
|
|
541
|
+
#
|
|
542
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
543
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
544
|
+
# and resource group.
|
|
545
|
+
# @param disk [Disk] Disk object supplied in the body of the Put disk
|
|
546
|
+
# operation.
|
|
547
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
548
|
+
# will be added to the HTTP request.
|
|
549
|
+
#
|
|
550
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
551
|
+
#
|
|
552
|
+
def begin_create_or_update_with_http_info(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
553
|
+
begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
#
|
|
557
|
+
# Creates or updates a disk.
|
|
558
|
+
#
|
|
559
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
560
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
561
|
+
# and resource group.
|
|
562
|
+
# @param disk [Disk] Disk object supplied in the body of the Put disk
|
|
563
|
+
# operation.
|
|
564
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
565
|
+
# to the HTTP request.
|
|
566
|
+
#
|
|
567
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
568
|
+
#
|
|
569
|
+
def begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
570
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
571
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
572
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
573
|
+
api_version = '2016-04-30-preview'
|
|
574
|
+
fail ArgumentError, 'disk is nil' if disk.nil?
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
request_headers = {}
|
|
578
|
+
|
|
579
|
+
# Set Headers
|
|
580
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
581
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
582
|
+
|
|
583
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
584
|
+
|
|
585
|
+
# Serialize Request
|
|
586
|
+
request_mapper = Disk.mapper()
|
|
587
|
+
request_content = @client.serialize(request_mapper, disk, 'disk')
|
|
588
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
589
|
+
|
|
590
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
|
|
591
|
+
|
|
592
|
+
request_url = @base_url || @client.base_url
|
|
593
|
+
|
|
594
|
+
options = {
|
|
595
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
596
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
597
|
+
query_params: {'api-version' => api_version},
|
|
598
|
+
body: request_content,
|
|
599
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
600
|
+
base_url: request_url
|
|
601
|
+
}
|
|
602
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
603
|
+
|
|
604
|
+
promise = promise.then do |result|
|
|
605
|
+
http_response = result.response
|
|
606
|
+
status_code = http_response.status
|
|
607
|
+
response_content = http_response.body
|
|
608
|
+
unless status_code == 200 || status_code == 202
|
|
609
|
+
error_model = JSON.load(response_content)
|
|
610
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
614
|
+
# Deserialize Response
|
|
615
|
+
if status_code == 200
|
|
616
|
+
begin
|
|
617
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
618
|
+
result_mapper = Disk.mapper()
|
|
619
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
620
|
+
rescue Exception => e
|
|
621
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
622
|
+
end
|
|
623
|
+
end
|
|
624
|
+
# Deserialize Response
|
|
625
|
+
if status_code == 202
|
|
626
|
+
begin
|
|
627
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
628
|
+
result_mapper = Disk.mapper()
|
|
629
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
630
|
+
rescue Exception => e
|
|
631
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
632
|
+
end
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
result
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
promise.execute
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
#
|
|
642
|
+
# Updates (patches) a disk.
|
|
643
|
+
#
|
|
644
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
645
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
646
|
+
# and resource group.
|
|
647
|
+
# @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
|
|
648
|
+
# operation.
|
|
649
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
650
|
+
# will be added to the HTTP request.
|
|
651
|
+
#
|
|
652
|
+
# @return [Disk] operation results.
|
|
653
|
+
#
|
|
654
|
+
def begin_update(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
655
|
+
response = begin_update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
656
|
+
response.body unless response.nil?
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
#
|
|
660
|
+
# Updates (patches) a disk.
|
|
661
|
+
#
|
|
662
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
663
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
664
|
+
# and resource group.
|
|
665
|
+
# @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
|
|
666
|
+
# operation.
|
|
667
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
668
|
+
# will be added to the HTTP request.
|
|
669
|
+
#
|
|
670
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
671
|
+
#
|
|
672
|
+
def begin_update_with_http_info(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
673
|
+
begin_update_async(resource_group_name, disk_name, disk, custom_headers).value!
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
#
|
|
677
|
+
# Updates (patches) a disk.
|
|
678
|
+
#
|
|
679
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
680
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
681
|
+
# and resource group.
|
|
682
|
+
# @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
|
|
683
|
+
# operation.
|
|
684
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
685
|
+
# to the HTTP request.
|
|
686
|
+
#
|
|
687
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
688
|
+
#
|
|
689
|
+
def begin_update_async(resource_group_name, disk_name, disk, custom_headers = nil)
|
|
690
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
691
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
692
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
693
|
+
api_version = '2016-04-30-preview'
|
|
694
|
+
fail ArgumentError, 'disk is nil' if disk.nil?
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
request_headers = {}
|
|
698
|
+
|
|
699
|
+
# Set Headers
|
|
700
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
701
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
702
|
+
|
|
703
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
704
|
+
|
|
705
|
+
# Serialize Request
|
|
706
|
+
request_mapper = DiskUpdate.mapper()
|
|
707
|
+
request_content = @client.serialize(request_mapper, disk, 'disk')
|
|
708
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
709
|
+
|
|
710
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
|
|
711
|
+
|
|
712
|
+
request_url = @base_url || @client.base_url
|
|
713
|
+
|
|
714
|
+
options = {
|
|
715
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
716
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
717
|
+
query_params: {'api-version' => api_version},
|
|
718
|
+
body: request_content,
|
|
719
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
720
|
+
base_url: request_url
|
|
721
|
+
}
|
|
722
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
|
723
|
+
|
|
724
|
+
promise = promise.then do |result|
|
|
725
|
+
http_response = result.response
|
|
726
|
+
status_code = http_response.status
|
|
727
|
+
response_content = http_response.body
|
|
728
|
+
unless status_code == 200 || status_code == 202
|
|
729
|
+
error_model = JSON.load(response_content)
|
|
730
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
734
|
+
# Deserialize Response
|
|
735
|
+
if status_code == 200
|
|
736
|
+
begin
|
|
737
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
738
|
+
result_mapper = Disk.mapper()
|
|
739
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
740
|
+
rescue Exception => e
|
|
741
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
742
|
+
end
|
|
743
|
+
end
|
|
744
|
+
# Deserialize Response
|
|
745
|
+
if status_code == 202
|
|
746
|
+
begin
|
|
747
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
748
|
+
result_mapper = Disk.mapper()
|
|
749
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
750
|
+
rescue Exception => e
|
|
751
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
752
|
+
end
|
|
753
|
+
end
|
|
754
|
+
|
|
755
|
+
result
|
|
756
|
+
end
|
|
757
|
+
|
|
758
|
+
promise.execute
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
#
|
|
762
|
+
# Deletes a disk.
|
|
763
|
+
#
|
|
764
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
765
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
766
|
+
# and resource group.
|
|
767
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
768
|
+
# will be added to the HTTP request.
|
|
769
|
+
#
|
|
770
|
+
# @return [OperationStatusResponse] operation results.
|
|
771
|
+
#
|
|
772
|
+
def begin_delete(resource_group_name, disk_name, custom_headers = nil)
|
|
773
|
+
response = begin_delete_async(resource_group_name, disk_name, custom_headers).value!
|
|
774
|
+
response.body unless response.nil?
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
#
|
|
778
|
+
# Deletes a disk.
|
|
779
|
+
#
|
|
780
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
781
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
782
|
+
# and resource group.
|
|
783
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
784
|
+
# will be added to the HTTP request.
|
|
785
|
+
#
|
|
786
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
787
|
+
#
|
|
788
|
+
def begin_delete_with_http_info(resource_group_name, disk_name, custom_headers = nil)
|
|
789
|
+
begin_delete_async(resource_group_name, disk_name, custom_headers).value!
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
#
|
|
793
|
+
# Deletes a disk.
|
|
794
|
+
#
|
|
795
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
796
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
797
|
+
# and resource group.
|
|
798
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
799
|
+
# to the HTTP request.
|
|
800
|
+
#
|
|
801
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
802
|
+
#
|
|
803
|
+
def begin_delete_async(resource_group_name, disk_name, custom_headers = nil)
|
|
804
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
805
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
806
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
807
|
+
api_version = '2016-04-30-preview'
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
request_headers = {}
|
|
811
|
+
|
|
812
|
+
# Set Headers
|
|
813
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
814
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
815
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
|
|
816
|
+
|
|
817
|
+
request_url = @base_url || @client.base_url
|
|
818
|
+
|
|
819
|
+
options = {
|
|
820
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
821
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
822
|
+
query_params: {'api-version' => api_version},
|
|
823
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
824
|
+
base_url: request_url
|
|
825
|
+
}
|
|
826
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
827
|
+
|
|
828
|
+
promise = promise.then do |result|
|
|
829
|
+
http_response = result.response
|
|
830
|
+
status_code = http_response.status
|
|
831
|
+
response_content = http_response.body
|
|
832
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
|
833
|
+
error_model = JSON.load(response_content)
|
|
834
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
838
|
+
# Deserialize Response
|
|
839
|
+
if status_code == 200
|
|
840
|
+
begin
|
|
841
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
842
|
+
result_mapper = OperationStatusResponse.mapper()
|
|
843
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
844
|
+
rescue Exception => e
|
|
845
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
846
|
+
end
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
result
|
|
850
|
+
end
|
|
851
|
+
|
|
852
|
+
promise.execute
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
#
|
|
856
|
+
# Grants access to a disk.
|
|
857
|
+
#
|
|
858
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
859
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
860
|
+
# and resource group.
|
|
861
|
+
# @param grant_access_data [GrantAccessData] Access data object supplied in the
|
|
862
|
+
# body of the get disk access operation.
|
|
863
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
864
|
+
# will be added to the HTTP request.
|
|
865
|
+
#
|
|
866
|
+
# @return [AccessUri] operation results.
|
|
867
|
+
#
|
|
868
|
+
def begin_grant_access(resource_group_name, disk_name, grant_access_data, custom_headers = nil)
|
|
869
|
+
response = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers).value!
|
|
870
|
+
response.body unless response.nil?
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
#
|
|
874
|
+
# Grants access to a disk.
|
|
875
|
+
#
|
|
876
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
877
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
878
|
+
# and resource group.
|
|
879
|
+
# @param grant_access_data [GrantAccessData] Access data object supplied in the
|
|
880
|
+
# body of the get disk access operation.
|
|
881
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
882
|
+
# will be added to the HTTP request.
|
|
883
|
+
#
|
|
884
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
885
|
+
#
|
|
886
|
+
def begin_grant_access_with_http_info(resource_group_name, disk_name, grant_access_data, custom_headers = nil)
|
|
887
|
+
begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers).value!
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
#
|
|
891
|
+
# Grants access to a disk.
|
|
892
|
+
#
|
|
893
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
894
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
895
|
+
# and resource group.
|
|
896
|
+
# @param grant_access_data [GrantAccessData] Access data object supplied in the
|
|
897
|
+
# body of the get disk access operation.
|
|
898
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
899
|
+
# to the HTTP request.
|
|
900
|
+
#
|
|
901
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
902
|
+
#
|
|
903
|
+
def begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers = nil)
|
|
904
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
905
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
906
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
907
|
+
api_version = '2016-04-30-preview'
|
|
908
|
+
fail ArgumentError, 'grant_access_data is nil' if grant_access_data.nil?
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
request_headers = {}
|
|
912
|
+
|
|
913
|
+
# Set Headers
|
|
914
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
915
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
916
|
+
|
|
917
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
918
|
+
|
|
919
|
+
# Serialize Request
|
|
920
|
+
request_mapper = GrantAccessData.mapper()
|
|
921
|
+
request_content = @client.serialize(request_mapper, grant_access_data, 'grant_access_data')
|
|
922
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
923
|
+
|
|
924
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'
|
|
925
|
+
|
|
926
|
+
request_url = @base_url || @client.base_url
|
|
927
|
+
|
|
928
|
+
options = {
|
|
929
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
930
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
931
|
+
query_params: {'api-version' => api_version},
|
|
932
|
+
body: request_content,
|
|
933
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
934
|
+
base_url: request_url
|
|
935
|
+
}
|
|
936
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
937
|
+
|
|
938
|
+
promise = promise.then do |result|
|
|
939
|
+
http_response = result.response
|
|
940
|
+
status_code = http_response.status
|
|
941
|
+
response_content = http_response.body
|
|
942
|
+
unless status_code == 200 || status_code == 202
|
|
943
|
+
error_model = JSON.load(response_content)
|
|
944
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
945
|
+
end
|
|
946
|
+
|
|
947
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
948
|
+
# Deserialize Response
|
|
949
|
+
if status_code == 200
|
|
950
|
+
begin
|
|
951
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
952
|
+
result_mapper = AccessUri.mapper()
|
|
953
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
954
|
+
rescue Exception => e
|
|
955
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
956
|
+
end
|
|
957
|
+
end
|
|
958
|
+
|
|
959
|
+
result
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
promise.execute
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
#
|
|
966
|
+
# Revokes access to a disk.
|
|
967
|
+
#
|
|
968
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
969
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
970
|
+
# and resource group.
|
|
971
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
972
|
+
# will be added to the HTTP request.
|
|
973
|
+
#
|
|
974
|
+
# @return [OperationStatusResponse] operation results.
|
|
975
|
+
#
|
|
976
|
+
def begin_revoke_access(resource_group_name, disk_name, custom_headers = nil)
|
|
977
|
+
response = begin_revoke_access_async(resource_group_name, disk_name, custom_headers).value!
|
|
978
|
+
response.body unless response.nil?
|
|
979
|
+
end
|
|
980
|
+
|
|
981
|
+
#
|
|
982
|
+
# Revokes access to a disk.
|
|
983
|
+
#
|
|
984
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
985
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
986
|
+
# and resource group.
|
|
987
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
988
|
+
# will be added to the HTTP request.
|
|
989
|
+
#
|
|
990
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
991
|
+
#
|
|
992
|
+
def begin_revoke_access_with_http_info(resource_group_name, disk_name, custom_headers = nil)
|
|
993
|
+
begin_revoke_access_async(resource_group_name, disk_name, custom_headers).value!
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
#
|
|
997
|
+
# Revokes access to a disk.
|
|
998
|
+
#
|
|
999
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
1000
|
+
# @param disk_name [String] The name of the disk within the given subscription
|
|
1001
|
+
# and resource group.
|
|
1002
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
1003
|
+
# to the HTTP request.
|
|
1004
|
+
#
|
|
1005
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
1006
|
+
#
|
|
1007
|
+
def begin_revoke_access_async(resource_group_name, disk_name, custom_headers = nil)
|
|
1008
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
1009
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
1010
|
+
fail ArgumentError, 'disk_name is nil' if disk_name.nil?
|
|
1011
|
+
api_version = '2016-04-30-preview'
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
request_headers = {}
|
|
1015
|
+
|
|
1016
|
+
# Set Headers
|
|
1017
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
1018
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
1019
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'
|
|
1020
|
+
|
|
1021
|
+
request_url = @base_url || @client.base_url
|
|
1022
|
+
|
|
1023
|
+
options = {
|
|
1024
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
1025
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
|
|
1026
|
+
query_params: {'api-version' => api_version},
|
|
1027
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
1028
|
+
base_url: request_url
|
|
1029
|
+
}
|
|
1030
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
1031
|
+
|
|
1032
|
+
promise = promise.then do |result|
|
|
1033
|
+
http_response = result.response
|
|
1034
|
+
status_code = http_response.status
|
|
1035
|
+
response_content = http_response.body
|
|
1036
|
+
unless status_code == 200 || status_code == 202
|
|
1037
|
+
error_model = JSON.load(response_content)
|
|
1038
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
1042
|
+
# Deserialize Response
|
|
1043
|
+
if status_code == 200
|
|
1044
|
+
begin
|
|
1045
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
1046
|
+
result_mapper = OperationStatusResponse.mapper()
|
|
1047
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
1048
|
+
rescue Exception => e
|
|
1049
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
1050
|
+
end
|
|
1051
|
+
end
|
|
1052
|
+
|
|
1053
|
+
result
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
promise.execute
|
|
1057
|
+
end
|
|
1058
|
+
|
|
1059
|
+
#
|
|
1060
|
+
# Lists all the disks under a resource group.
|
|
1061
|
+
#
|
|
1062
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1063
|
+
# to List operation.
|
|
1064
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1065
|
+
# will be added to the HTTP request.
|
|
1066
|
+
#
|
|
1067
|
+
# @return [DiskList] operation results.
|
|
1068
|
+
#
|
|
1069
|
+
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
|
1070
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
|
1071
|
+
response.body unless response.nil?
|
|
1072
|
+
end
|
|
1073
|
+
|
|
1074
|
+
#
|
|
1075
|
+
# Lists all the disks under a resource group.
|
|
1076
|
+
#
|
|
1077
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1078
|
+
# to List operation.
|
|
1079
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1080
|
+
# will be added to the HTTP request.
|
|
1081
|
+
#
|
|
1082
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
1083
|
+
#
|
|
1084
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
|
1085
|
+
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
|
1086
|
+
end
|
|
1087
|
+
|
|
1088
|
+
#
|
|
1089
|
+
# Lists all the disks under a resource group.
|
|
1090
|
+
#
|
|
1091
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1092
|
+
# to List operation.
|
|
1093
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
1094
|
+
# to the HTTP request.
|
|
1095
|
+
#
|
|
1096
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
1097
|
+
#
|
|
1098
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
|
|
1099
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
request_headers = {}
|
|
1103
|
+
|
|
1104
|
+
# Set Headers
|
|
1105
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
1106
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
1107
|
+
path_template = '{nextLink}'
|
|
1108
|
+
|
|
1109
|
+
request_url = @base_url || @client.base_url
|
|
1110
|
+
|
|
1111
|
+
options = {
|
|
1112
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
1113
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
1114
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
1115
|
+
base_url: request_url
|
|
1116
|
+
}
|
|
1117
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
1118
|
+
|
|
1119
|
+
promise = promise.then do |result|
|
|
1120
|
+
http_response = result.response
|
|
1121
|
+
status_code = http_response.status
|
|
1122
|
+
response_content = http_response.body
|
|
1123
|
+
unless status_code == 200
|
|
1124
|
+
error_model = JSON.load(response_content)
|
|
1125
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
1129
|
+
# Deserialize Response
|
|
1130
|
+
if status_code == 200
|
|
1131
|
+
begin
|
|
1132
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
1133
|
+
result_mapper = DiskList.mapper()
|
|
1134
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
1135
|
+
rescue Exception => e
|
|
1136
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
1137
|
+
end
|
|
1138
|
+
end
|
|
1139
|
+
|
|
1140
|
+
result
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
promise.execute
|
|
1144
|
+
end
|
|
1145
|
+
|
|
1146
|
+
#
|
|
1147
|
+
# Lists all the disks under a subscription.
|
|
1148
|
+
#
|
|
1149
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1150
|
+
# to List operation.
|
|
1151
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1152
|
+
# will be added to the HTTP request.
|
|
1153
|
+
#
|
|
1154
|
+
# @return [DiskList] operation results.
|
|
1155
|
+
#
|
|
1156
|
+
def list_next(next_page_link, custom_headers = nil)
|
|
1157
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
|
1158
|
+
response.body unless response.nil?
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
#
|
|
1162
|
+
# Lists all the disks under a subscription.
|
|
1163
|
+
#
|
|
1164
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1165
|
+
# to List operation.
|
|
1166
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1167
|
+
# will be added to the HTTP request.
|
|
1168
|
+
#
|
|
1169
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
1170
|
+
#
|
|
1171
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
|
1172
|
+
list_next_async(next_page_link, custom_headers).value!
|
|
1173
|
+
end
|
|
1174
|
+
|
|
1175
|
+
#
|
|
1176
|
+
# Lists all the disks under a subscription.
|
|
1177
|
+
#
|
|
1178
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
1179
|
+
# to List operation.
|
|
1180
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
1181
|
+
# to the HTTP request.
|
|
1182
|
+
#
|
|
1183
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
1184
|
+
#
|
|
1185
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
|
1186
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
request_headers = {}
|
|
1190
|
+
|
|
1191
|
+
# Set Headers
|
|
1192
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
1193
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
1194
|
+
path_template = '{nextLink}'
|
|
1195
|
+
|
|
1196
|
+
request_url = @base_url || @client.base_url
|
|
1197
|
+
|
|
1198
|
+
options = {
|
|
1199
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
1200
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
1201
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
1202
|
+
base_url: request_url
|
|
1203
|
+
}
|
|
1204
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
1205
|
+
|
|
1206
|
+
promise = promise.then do |result|
|
|
1207
|
+
http_response = result.response
|
|
1208
|
+
status_code = http_response.status
|
|
1209
|
+
response_content = http_response.body
|
|
1210
|
+
unless status_code == 200
|
|
1211
|
+
error_model = JSON.load(response_content)
|
|
1212
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
1216
|
+
# Deserialize Response
|
|
1217
|
+
if status_code == 200
|
|
1218
|
+
begin
|
|
1219
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
1220
|
+
result_mapper = DiskList.mapper()
|
|
1221
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
1222
|
+
rescue Exception => e
|
|
1223
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
1224
|
+
end
|
|
1225
|
+
end
|
|
1226
|
+
|
|
1227
|
+
result
|
|
1228
|
+
end
|
|
1229
|
+
|
|
1230
|
+
promise.execute
|
|
1231
|
+
end
|
|
1232
|
+
|
|
1233
|
+
#
|
|
1234
|
+
# Lists all the disks under a resource group.
|
|
1235
|
+
#
|
|
1236
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
1237
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1238
|
+
# will be added to the HTTP request.
|
|
1239
|
+
#
|
|
1240
|
+
# @return [DiskList] which provide lazy access to pages of the response.
|
|
1241
|
+
#
|
|
1242
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
|
1243
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
|
|
1244
|
+
unless response.nil?
|
|
1245
|
+
page = response.body
|
|
1246
|
+
page.next_method = Proc.new do |next_page_link|
|
|
1247
|
+
list_by_resource_group_next_async(next_page_link, custom_headers)
|
|
1248
|
+
end
|
|
1249
|
+
page
|
|
1250
|
+
end
|
|
1251
|
+
end
|
|
1252
|
+
|
|
1253
|
+
#
|
|
1254
|
+
# Lists all the disks under a subscription.
|
|
1255
|
+
#
|
|
1256
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1257
|
+
# will be added to the HTTP request.
|
|
1258
|
+
#
|
|
1259
|
+
# @return [DiskList] which provide lazy access to pages of the response.
|
|
1260
|
+
#
|
|
1261
|
+
def list_as_lazy(custom_headers = nil)
|
|
1262
|
+
response = list_async(custom_headers).value!
|
|
1263
|
+
unless response.nil?
|
|
1264
|
+
page = response.body
|
|
1265
|
+
page.next_method = Proc.new do |next_page_link|
|
|
1266
|
+
list_next_async(next_page_link, custom_headers)
|
|
1267
|
+
end
|
|
1268
|
+
page
|
|
1269
|
+
end
|
|
1270
|
+
end
|
|
1271
|
+
|
|
1272
|
+
end
|
|
1273
|
+
end
|