azure_mgmt_compute 0.18.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  4. data/lib/2015-06-15/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  5. data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  6. data/lib/2016-03-30/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  7. data/lib/2016-03-30/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  8. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  9. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  10. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  11. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -1
  12. data/lib/2017-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  13. data/lib/2017-03-30/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  14. data/lib/2017-03-30/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  15. data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -1
  16. data/lib/2017-09-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  17. data/lib/2017-12-01/generated/azure_mgmt_compute.rb +55 -55
  18. data/lib/2017-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  19. data/lib/2017-12-01/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  20. data/lib/2017-12-01/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  21. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb +2 -3
  22. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -1
  23. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +3 -2
  24. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +2 -3
  25. data/lib/2018-04-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  26. data/lib/2018-04-01/generated/azure_mgmt_compute/models/access_uri.rb +1 -1
  27. data/lib/2018-04-01/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  28. data/lib/2018-04-01/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  29. data/lib/2018-06-01/generated/azure_mgmt_compute.rb +108 -85
  30. data/lib/2018-06-01/generated/azure_mgmt_compute/compute_management_client.rb +9 -1
  31. data/lib/2018-06-01/generated/azure_mgmt_compute/disks.rb +1274 -0
  32. data/lib/2018-06-01/generated/azure_mgmt_compute/models/{scale_tier.rb → access_level.rb} +4 -4
  33. data/lib/2018-06-01/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  34. data/lib/2018-06-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  35. data/lib/2018-06-01/generated/azure_mgmt_compute/models/creation_data.rb +97 -0
  36. data/lib/2018-06-01/generated/azure_mgmt_compute/models/data_disk.rb +1 -1
  37. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk.rb +233 -0
  38. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk_create_option.rb +20 -0
  39. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  40. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk_sku.rb +62 -0
  41. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  42. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk_update.rb +132 -0
  43. data/lib/2018-06-01/generated/azure_mgmt_compute/models/encryption_settings.rb +76 -0
  44. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +9 -8
  45. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +1 -1
  46. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image.rb +3 -3
  47. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +3 -3
  48. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version.rb +1 -1
  49. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +11 -11
  50. data/lib/2018-06-01/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  51. data/lib/2018-06-01/generated/azure_mgmt_compute/models/image_data_disk.rb +1 -1
  52. data/lib/2018-06-01/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  53. data/lib/2018-06-01/generated/azure_mgmt_compute/models/image_osdisk.rb +1 -1
  54. data/lib/2018-06-01/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  55. data/lib/2018-06-01/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  56. data/lib/2018-06-01/generated/azure_mgmt_compute/models/managed_artifact.rb +1 -1
  57. data/lib/2018-06-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +3 -3
  58. data/lib/2018-06-01/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  59. data/lib/2018-06-01/generated/azure_mgmt_compute/models/snapshot.rb +187 -0
  60. data/lib/2018-06-01/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  61. data/lib/2018-06-01/generated/azure_mgmt_compute/models/snapshot_sku.rb +61 -0
  62. data/lib/2018-06-01/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  63. data/lib/2018-06-01/generated/azure_mgmt_compute/models/snapshot_update.rb +106 -0
  64. data/lib/2018-06-01/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  65. data/lib/2018-06-01/generated/azure_mgmt_compute/models/storage_account_types.rb +1 -0
  66. data/lib/2018-06-01/generated/azure_mgmt_compute/models/target_region.rb +58 -0
  67. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +15 -0
  68. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -1
  69. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +1 -1
  70. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +14 -0
  71. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +13 -0
  72. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +14 -0
  73. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +35 -0
  74. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +15 -0
  75. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +15 -0
  76. data/lib/2018-06-01/generated/azure_mgmt_compute/snapshots.rb +1274 -0
  77. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +127 -0
  78. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +12 -0
  79. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +6 -3
  80. data/lib/profiles/latest/modules/compute_profile_module.rb +360 -352
  81. data/lib/version.rb +1 -1
  82. metadata +26 -3
@@ -33,7 +33,7 @@ module Azure::Compute::Mgmt::V2018_04_01
33
33
  client_side_validation: true,
34
34
  required: false,
35
35
  read_only: true,
36
- serialized_name: 'properties.output.accessSAS',
36
+ serialized_name: 'accessSAS',
37
37
  type: {
38
38
  name: 'String'
39
39
  }
@@ -52,7 +52,7 @@ module Azure::Compute::Mgmt::V2018_04_01
52
52
  attr_accessor :create_option
53
53
 
54
54
  # @return [Integer] Specifies the size of an empty data disk in
55
- # gigabytes. This element can be used to overwrite the name of the disk
55
+ # gigabytes. This element can be used to overwrite the size of the disk
56
56
  # in a virtual machine image. <br><br> This value cannot be larger than
57
57
  # 1023 GB
58
58
  attr_accessor :disk_size_gb
@@ -61,7 +61,7 @@ module Azure::Compute::Mgmt::V2018_04_01
61
61
  attr_accessor :create_option
62
62
 
63
63
  # @return [Integer] Specifies the size of an empty data disk in
64
- # gigabytes. This element can be used to overwrite the name of the disk
64
+ # gigabytes. This element can be used to overwrite the size of the disk
65
65
  # in a virtual machine image. <br><br> This value cannot be larger than
66
66
  # 1023 GB
67
67
  attr_accessor :disk_size_gb
@@ -38,139 +38,157 @@ module Azure::Compute::Mgmt::V2018_06_01
38
38
  autoload :Galleries, '2018-06-01/generated/azure_mgmt_compute/galleries.rb'
39
39
  autoload :GalleryImages, '2018-06-01/generated/azure_mgmt_compute/gallery_images.rb'
40
40
  autoload :GalleryImageVersions, '2018-06-01/generated/azure_mgmt_compute/gallery_image_versions.rb'
41
+ autoload :Disks, '2018-06-01/generated/azure_mgmt_compute/disks.rb'
42
+ autoload :Snapshots, '2018-06-01/generated/azure_mgmt_compute/snapshots.rb'
41
43
  autoload :ComputeManagementClient, '2018-06-01/generated/azure_mgmt_compute/compute_management_client.rb'
42
44
 
43
45
  module Models
44
46
  autoload :VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb'
47
+ autoload :ComputeOperationValue, '2018-06-01/generated/azure_mgmt_compute/models/compute_operation_value.rb'
45
48
  autoload :VirtualMachineScaleSetIpTag, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb'
46
- autoload :ComputeOperationListResult, '2018-06-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb'
49
+ autoload :InstanceViewStatus, '2018-06-01/generated/azure_mgmt_compute/models/instance_view_status.rb'
47
50
  autoload :VirtualMachineScaleSetPublicIPAddressConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb'
48
- autoload :SubResource, '2018-06-01/generated/azure_mgmt_compute/models/sub_resource.rb'
51
+ autoload :Sku, '2018-06-01/generated/azure_mgmt_compute/models/sku.rb'
49
52
  autoload :VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb'
50
- autoload :RecommendedMachineConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb'
51
- autoload :ImageListResult, '2018-06-01/generated/azure_mgmt_compute/models/image_list_result.rb'
52
- autoload :VirtualMachineSize, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb'
53
- autoload :VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb'
54
- autoload :GalleryImageVersionList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_list.rb'
55
- autoload :VirtualMachineScaleSetIdentity, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb'
56
- autoload :VirtualMachineExtensionInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb'
57
- autoload :VirtualMachineScaleSetOSProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb'
58
- autoload :GalleryDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/gallery_disk_image.rb'
59
- autoload :VirtualMachineScaleSetUpdateOSProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb'
60
- autoload :PurchasePlan, '2018-06-01/generated/azure_mgmt_compute/models/purchase_plan.rb'
61
- autoload :VirtualMachineScaleSetManagedDiskParameters, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb'
62
- autoload :DataDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/data_disk_image.rb'
63
- autoload :VirtualMachineScaleSetOSDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb'
64
- autoload :UsageName, '2018-06-01/generated/azure_mgmt_compute/models/usage_name.rb'
65
53
  autoload :VirtualMachineScaleSetUpdateOSDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb'
66
- autoload :ListUsagesResult, '2018-06-01/generated/azure_mgmt_compute/models/list_usages_result.rb'
54
+ autoload :AvailabilitySetListResult, '2018-06-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb'
67
55
  autoload :VirtualMachineScaleSetDataDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb'
68
- autoload :GalleryArtifactSource, '2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_source.rb'
56
+ autoload :VirtualMachineSizeListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb'
69
57
  autoload :VirtualMachineScaleSetStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb'
70
- autoload :HardwareProfile, '2018-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb'
58
+ autoload :GalleryImageList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_list.rb'
71
59
  autoload :VirtualMachineScaleSetUpdateStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb'
72
- autoload :KeyVaultSecretReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb'
60
+ autoload :GalleryList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_list.rb'
73
61
  autoload :ApiEntityReference, '2018-06-01/generated/azure_mgmt_compute/models/api_entity_reference.rb'
62
+ autoload :VirtualMachineExtensionsListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb'
63
+ autoload :ComputeOperationListResult, '2018-06-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb'
64
+ autoload :OSDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/osdisk_image.rb'
65
+ autoload :SubResource, '2018-06-01/generated/azure_mgmt_compute/models/sub_resource.rb'
66
+ autoload :GalleryArtifactPublishingProfileBase, '2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb'
67
+ autoload :UsageName, '2018-06-01/generated/azure_mgmt_compute/models/usage_name.rb'
68
+ autoload :Disallowed, '2018-06-01/generated/azure_mgmt_compute/models/disallowed.rb'
69
+ autoload :ListUsagesResult, '2018-06-01/generated/azure_mgmt_compute/models/list_usages_result.rb'
70
+ autoload :ImageDiskReference, '2018-06-01/generated/azure_mgmt_compute/models/image_disk_reference.rb'
71
+ autoload :GalleryArtifactSource, '2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_source.rb'
72
+ autoload :CreationData, '2018-06-01/generated/azure_mgmt_compute/models/creation_data.rb'
73
+ autoload :HardwareProfile, '2018-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb'
74
+ autoload :SourceVault, '2018-06-01/generated/azure_mgmt_compute/models/source_vault.rb'
75
+ autoload :KeyVaultSecretReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb'
76
+ autoload :VirtualMachineScaleSetNetworkConfigurationDnsSettings, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb'
74
77
  autoload :DiskEncryptionSettings, '2018-06-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb'
75
- autoload :ComputeOperationValue, '2018-06-01/generated/azure_mgmt_compute/models/compute_operation_value.rb'
76
- autoload :ReplicationStatus, '2018-06-01/generated/azure_mgmt_compute/models/replication_status.rb'
77
- autoload :InstanceViewStatus, '2018-06-01/generated/azure_mgmt_compute/models/instance_view_status.rb'
78
+ autoload :ImagePurchasePlan, '2018-06-01/generated/azure_mgmt_compute/models/image_purchase_plan.rb'
79
+ autoload :TargetRegion, '2018-06-01/generated/azure_mgmt_compute/models/target_region.rb'
80
+ autoload :SnapshotList, '2018-06-01/generated/azure_mgmt_compute/models/snapshot_list.rb'
78
81
  autoload :DataDisk, '2018-06-01/generated/azure_mgmt_compute/models/data_disk.rb'
79
- autoload :Sku, '2018-06-01/generated/azure_mgmt_compute/models/sku.rb'
80
- autoload :AdditionalUnattendContent, '2018-06-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb'
81
- autoload :ResourceRange, '2018-06-01/generated/azure_mgmt_compute/models/resource_range.rb'
82
- autoload :WinRMConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb'
83
- autoload :GalleryImageIdentifier, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_identifier.rb'
84
- autoload :SshPublicKey, '2018-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb'
85
- autoload :GalleryIdentifier, '2018-06-01/generated/azure_mgmt_compute/models/gallery_identifier.rb'
86
- autoload :LinuxConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/linux_configuration.rb'
87
- autoload :VirtualMachineScaleSetNetworkConfigurationDnsSettings, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb'
88
- autoload :VaultSecretGroup, '2018-06-01/generated/azure_mgmt_compute/models/vault_secret_group.rb'
89
- autoload :RunCommandResult, '2018-06-01/generated/azure_mgmt_compute/models/run_command_result.rb'
90
- autoload :RegionalReplicationStatus, '2018-06-01/generated/azure_mgmt_compute/models/regional_replication_status.rb'
91
- autoload :RunCommandListResult, '2018-06-01/generated/azure_mgmt_compute/models/run_command_list_result.rb'
92
- autoload :BootDiagnostics, '2018-06-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb'
93
82
  autoload :VirtualMachineScaleSetNetworkProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb'
94
- autoload :VirtualMachineExtensionHandlerInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb'
83
+ autoload :AdditionalCapabilities, '2018-06-01/generated/azure_mgmt_compute/models/additional_capabilities.rb'
95
84
  autoload :VirtualMachineScaleSetUpdateNetworkProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb'
96
- autoload :DiskInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/disk_instance_view.rb'
97
- autoload :RunCommandDocumentBase, '2018-06-01/generated/azure_mgmt_compute/models/run_command_document_base.rb'
98
- autoload :VirtualMachineIdentityUserAssignedIdentitiesValue, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb'
85
+ autoload :WinRMListener, '2018-06-01/generated/azure_mgmt_compute/models/win_rmlistener.rb'
86
+ autoload :SnapshotUpdate, '2018-06-01/generated/azure_mgmt_compute/models/snapshot_update.rb'
87
+ autoload :WindowsConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/windows_configuration.rb'
99
88
  autoload :VirtualMachineScaleSetExtensionListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb'
100
- autoload :MaintenanceRedeployStatus, '2018-06-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb'
89
+ autoload :SshConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/ssh_configuration.rb'
101
90
  autoload :VirtualMachineScaleSetExtensionProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb'
102
- autoload :GalleryImageVersionStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb'
91
+ autoload :VaultCertificate, '2018-06-01/generated/azure_mgmt_compute/models/vault_certificate.rb'
103
92
  autoload :VirtualMachineScaleSetVMProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb'
104
- autoload :VirtualMachineListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb'
93
+ autoload :OSProfile, '2018-06-01/generated/azure_mgmt_compute/models/osprofile.rb'
105
94
  autoload :VirtualMachineScaleSetUpdateVMProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb'
106
- autoload :RollingUpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb'
107
- autoload :RunCommandParameterDefinition, '2018-06-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb'
108
- autoload :ImageOSDisk, '2018-06-01/generated/azure_mgmt_compute/models/image_osdisk.rb'
109
- autoload :RunCommandInput, '2018-06-01/generated/azure_mgmt_compute/models/run_command_input.rb'
110
- autoload :ImageStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/image_storage_profile.rb'
95
+ autoload :NetworkProfile, '2018-06-01/generated/azure_mgmt_compute/models/network_profile.rb'
96
+ autoload :AccessUri, '2018-06-01/generated/azure_mgmt_compute/models/access_uri.rb'
97
+ autoload :DiagnosticsProfile, '2018-06-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb'
98
+ autoload :GrantAccessData, '2018-06-01/generated/azure_mgmt_compute/models/grant_access_data.rb'
99
+ autoload :VirtualMachineAgentInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb'
111
100
  autoload :VirtualMachineScaleSetVMInstanceIDs, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb'
112
- autoload :AvailabilitySetListResult, '2018-06-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb'
101
+ autoload :BootDiagnosticsInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb'
113
102
  autoload :VirtualMachineScaleSetVMInstanceRequiredIDs, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb'
114
- autoload :GalleryImageList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_list.rb'
103
+ autoload :VirtualMachineIdentity, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb'
115
104
  autoload :VirtualMachineStatusCodeCount, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb'
116
- autoload :VirtualMachineExtensionsListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb'
105
+ autoload :VirtualMachineInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb'
117
106
  autoload :VirtualMachineScaleSetInstanceViewStatusesSummary, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb'
118
- autoload :GalleryArtifactPublishingProfileBase, '2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb'
107
+ autoload :RegionalReplicationStatus, '2018-06-01/generated/azure_mgmt_compute/models/regional_replication_status.rb'
119
108
  autoload :VirtualMachineScaleSetVMExtensionsSummary, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb'
120
- autoload :VirtualMachineCaptureParameters, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb'
109
+ autoload :AutoOSUpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/auto_osupgrade_policy.rb'
121
110
  autoload :VirtualMachineScaleSetInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb'
122
- autoload :ManagedArtifact, '2018-06-01/generated/azure_mgmt_compute/models/managed_artifact.rb'
111
+ autoload :UpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/upgrade_policy.rb'
123
112
  autoload :VirtualMachineScaleSetListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb'
124
- autoload :VirtualHardDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb'
113
+ autoload :ImageDataDisk, '2018-06-01/generated/azure_mgmt_compute/models/image_data_disk.rb'
125
114
  autoload :VirtualMachineScaleSetListWithLinkResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb'
126
- autoload :StorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/storage_profile.rb'
115
+ autoload :GalleryImageVersionStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb'
127
116
  autoload :VirtualMachineScaleSetSkuCapacity, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb'
128
- autoload :WindowsConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/windows_configuration.rb'
117
+ autoload :ImageListResult, '2018-06-01/generated/azure_mgmt_compute/models/image_list_result.rb'
129
118
  autoload :VirtualMachineScaleSetSku, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb'
130
- autoload :VaultCertificate, '2018-06-01/generated/azure_mgmt_compute/models/vault_certificate.rb'
119
+ autoload :VirtualMachineScaleSetIdentity, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb'
131
120
  autoload :VirtualMachineScaleSetListSkusResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb'
132
- autoload :NetworkProfile, '2018-06-01/generated/azure_mgmt_compute/models/network_profile.rb'
121
+ autoload :VirtualMachineScaleSetUpdateOSProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb'
133
122
  autoload :ApiErrorBase, '2018-06-01/generated/azure_mgmt_compute/models/api_error_base.rb'
134
- autoload :VirtualMachineAgentInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb'
123
+ autoload :VirtualMachineScaleSetOSDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb'
135
124
  autoload :InnerError, '2018-06-01/generated/azure_mgmt_compute/models/inner_error.rb'
136
- autoload :VirtualMachineIdentity, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb'
125
+ autoload :GalleryImageVersionList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_list.rb'
137
126
  autoload :ApiError, '2018-06-01/generated/azure_mgmt_compute/models/api_error.rb'
138
- autoload :ImagePurchasePlan, '2018-06-01/generated/azure_mgmt_compute/models/image_purchase_plan.rb'
127
+ autoload :GalleryDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/gallery_disk_image.rb'
139
128
  autoload :RollbackStatusInfo, '2018-06-01/generated/azure_mgmt_compute/models/rollback_status_info.rb'
140
- autoload :UpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/upgrade_policy.rb'
129
+ autoload :DataDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/data_disk_image.rb'
141
130
  autoload :UpgradeOperationHistoryStatus, '2018-06-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb'
142
- autoload :Disallowed, '2018-06-01/generated/azure_mgmt_compute/models/disallowed.rb'
131
+ autoload :VirtualMachineCaptureParameters, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb'
143
132
  autoload :RollingUpgradeProgressInfo, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb'
144
- autoload :GalleryList, '2018-06-01/generated/azure_mgmt_compute/models/gallery_list.rb'
133
+ autoload :ManagedArtifact, '2018-06-01/generated/azure_mgmt_compute/models/managed_artifact.rb'
145
134
  autoload :UpgradeOperationHistoricalStatusInfoProperties, '2018-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb'
146
- autoload :Usage, '2018-06-01/generated/azure_mgmt_compute/models/usage.rb'
135
+ autoload :VirtualHardDisk, '2018-06-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb'
147
136
  autoload :UpgradeOperationHistoricalStatusInfo, '2018-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb'
148
- autoload :KeyVaultKeyReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb'
137
+ autoload :StorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/storage_profile.rb'
149
138
  autoload :VirtualMachineScaleSetListOSUpgradeHistory, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb'
150
- autoload :WinRMListener, '2018-06-01/generated/azure_mgmt_compute/models/win_rmlistener.rb'
139
+ autoload :WinRMConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb'
151
140
  autoload :VirtualMachineHealthStatus, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb'
152
- autoload :OSProfile, '2018-06-01/generated/azure_mgmt_compute/models/osprofile.rb'
141
+ autoload :LinuxConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/linux_configuration.rb'
153
142
  autoload :VirtualMachineScaleSetVMInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb'
154
- autoload :BootDiagnosticsInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb'
155
- autoload :RunCommandInputParameter, '2018-06-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb'
156
- autoload :AutoOSUpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/auto_osupgrade_policy.rb'
143
+ autoload :SnapshotSku, '2018-06-01/generated/azure_mgmt_compute/models/snapshot_sku.rb'
144
+ autoload :VirtualMachineExtensionHandlerInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb'
157
145
  autoload :VirtualMachineScaleSetVMListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb'
158
- autoload :VirtualMachineSizeListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb'
146
+ autoload :VirtualMachineIdentityUserAssignedIdentitiesValue, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb'
159
147
  autoload :RollingUpgradeRunningStatus, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb'
160
- autoload :Plan, '2018-06-01/generated/azure_mgmt_compute/models/plan.rb'
161
- autoload :LogAnalyticsOperationResult, '2018-06-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb'
162
- autoload :SshConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/ssh_configuration.rb'
148
+ autoload :ReplicationStatus, '2018-06-01/generated/azure_mgmt_compute/models/replication_status.rb'
149
+ autoload :DiskList, '2018-06-01/generated/azure_mgmt_compute/models/disk_list.rb'
150
+ autoload :RollingUpgradePolicy, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb'
163
151
  autoload :Resource, '2018-06-01/generated/azure_mgmt_compute/models/resource.rb'
164
- autoload :VirtualMachineInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb'
152
+ autoload :ImageStorageProfile, '2018-06-01/generated/azure_mgmt_compute/models/image_storage_profile.rb'
165
153
  autoload :UpdateResource, '2018-06-01/generated/azure_mgmt_compute/models/update_resource.rb'
166
- autoload :OSDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/osdisk_image.rb'
154
+ autoload :VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb'
167
155
  autoload :SubResourceReadOnly, '2018-06-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb'
168
- autoload :DiagnosticsProfile, '2018-06-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb'
156
+ autoload :VirtualMachineScaleSetManagedDiskParameters, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb'
169
157
  autoload :RecoveryWalkResponse, '2018-06-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb'
170
- autoload :OSDisk, '2018-06-01/generated/azure_mgmt_compute/models/osdisk.rb'
171
- autoload :LogAnalyticsOutput, '2018-06-01/generated/azure_mgmt_compute/models/log_analytics_output.rb'
172
- autoload :ImageDataDisk, '2018-06-01/generated/azure_mgmt_compute/models/image_data_disk.rb'
158
+ autoload :VirtualMachineExtensionInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb'
159
+ autoload :DiskUpdate, '2018-06-01/generated/azure_mgmt_compute/models/disk_update.rb'
160
+ autoload :Usage, '2018-06-01/generated/azure_mgmt_compute/models/usage.rb'
161
+ autoload :EncryptionSettings, '2018-06-01/generated/azure_mgmt_compute/models/encryption_settings.rb'
162
+ autoload :KeyVaultKeyReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb'
173
163
  autoload :LogAnalyticsInputBase, '2018-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb'
164
+ autoload :AdditionalUnattendContent, '2018-06-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb'
165
+ autoload :LogAnalyticsOutput, '2018-06-01/generated/azure_mgmt_compute/models/log_analytics_output.rb'
166
+ autoload :VaultSecretGroup, '2018-06-01/generated/azure_mgmt_compute/models/vault_secret_group.rb'
167
+ autoload :LogAnalyticsOperationResult, '2018-06-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb'
168
+ autoload :DiskInstanceView, '2018-06-01/generated/azure_mgmt_compute/models/disk_instance_view.rb'
169
+ autoload :RunCommandInputParameter, '2018-06-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb'
170
+ autoload :VirtualMachineListResult, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb'
171
+ autoload :RunCommandInput, '2018-06-01/generated/azure_mgmt_compute/models/run_command_input.rb'
172
+ autoload :DiskSku, '2018-06-01/generated/azure_mgmt_compute/models/disk_sku.rb'
173
+ autoload :RunCommandParameterDefinition, '2018-06-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb'
174
+ autoload :VirtualMachineSize, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb'
175
+ autoload :RunCommandDocumentBase, '2018-06-01/generated/azure_mgmt_compute/models/run_command_document_base.rb'
176
+ autoload :Plan, '2018-06-01/generated/azure_mgmt_compute/models/plan.rb'
177
+ autoload :KeyVaultAndKeyReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb'
178
+ autoload :SshPublicKey, '2018-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb'
179
+ autoload :RunCommandListResult, '2018-06-01/generated/azure_mgmt_compute/models/run_command_list_result.rb'
180
+ autoload :MaintenanceRedeployStatus, '2018-06-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb'
181
+ autoload :RunCommandResult, '2018-06-01/generated/azure_mgmt_compute/models/run_command_result.rb'
182
+ autoload :VirtualMachineScaleSetOSProfile, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb'
183
+ autoload :GalleryIdentifier, '2018-06-01/generated/azure_mgmt_compute/models/gallery_identifier.rb'
184
+ autoload :OSDisk, '2018-06-01/generated/azure_mgmt_compute/models/osdisk.rb'
185
+ autoload :KeyVaultAndSecretReference, '2018-06-01/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb'
186
+ autoload :ImageOSDisk, '2018-06-01/generated/azure_mgmt_compute/models/image_osdisk.rb'
187
+ autoload :GalleryImageIdentifier, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_identifier.rb'
188
+ autoload :BootDiagnostics, '2018-06-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb'
189
+ autoload :ResourceRange, '2018-06-01/generated/azure_mgmt_compute/models/resource_range.rb'
190
+ autoload :PurchasePlan, '2018-06-01/generated/azure_mgmt_compute/models/purchase_plan.rb'
191
+ autoload :RecommendedMachineConfiguration, '2018-06-01/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb'
174
192
  autoload :AvailabilitySet, '2018-06-01/generated/azure_mgmt_compute/models/availability_set.rb'
175
193
  autoload :AvailabilitySetUpdate, '2018-06-01/generated/azure_mgmt_compute/models/availability_set_update.rb'
176
194
  autoload :VirtualMachineExtensionImage, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb'
@@ -204,6 +222,8 @@ module Azure::Compute::Mgmt::V2018_06_01
204
222
  autoload :GalleryOSDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb'
205
223
  autoload :GalleryDataDiskImage, '2018-06-01/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb'
206
224
  autoload :GalleryImageVersion, '2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version.rb'
225
+ autoload :Disk, '2018-06-01/generated/azure_mgmt_compute/models/disk.rb'
226
+ autoload :Snapshot, '2018-06-01/generated/azure_mgmt_compute/models/snapshot.rb'
207
227
  autoload :StatusLevelTypes, '2018-06-01/generated/azure_mgmt_compute/models/status_level_types.rb'
208
228
  autoload :OperatingSystemTypes, '2018-06-01/generated/azure_mgmt_compute/models/operating_system_types.rb'
209
229
  autoload :VirtualMachineSizeTypes, '2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb'
@@ -227,10 +247,13 @@ module Azure::Compute::Mgmt::V2018_06_01
227
247
  autoload :RollingUpgradeStatusCode, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb'
228
248
  autoload :RollingUpgradeActionType, '2018-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb'
229
249
  autoload :IntervalInMins, '2018-06-01/generated/azure_mgmt_compute/models/interval_in_mins.rb'
230
- autoload :ScaleTier, '2018-06-01/generated/azure_mgmt_compute/models/scale_tier.rb'
231
250
  autoload :AggregatedReplicationState, '2018-06-01/generated/azure_mgmt_compute/models/aggregated_replication_state.rb'
232
251
  autoload :ReplicationState, '2018-06-01/generated/azure_mgmt_compute/models/replication_state.rb'
233
252
  autoload :HostCaching, '2018-06-01/generated/azure_mgmt_compute/models/host_caching.rb'
253
+ autoload :DiskStorageAccountTypes, '2018-06-01/generated/azure_mgmt_compute/models/disk_storage_account_types.rb'
254
+ autoload :DiskCreateOption, '2018-06-01/generated/azure_mgmt_compute/models/disk_create_option.rb'
255
+ autoload :SnapshotStorageAccountTypes, '2018-06-01/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb'
256
+ autoload :AccessLevel, '2018-06-01/generated/azure_mgmt_compute/models/access_level.rb'
234
257
  autoload :InstanceViewTypes, '2018-06-01/generated/azure_mgmt_compute/models/instance_view_types.rb'
235
258
  autoload :ReplicationStatusTypes, '2018-06-01/generated/azure_mgmt_compute/models/replication_status_types.rb'
236
259
  end
@@ -93,6 +93,12 @@ module Azure::Compute::Mgmt::V2018_06_01
93
93
  # @return [GalleryImageVersions] gallery_image_versions
94
94
  attr_reader :gallery_image_versions
95
95
 
96
+ # @return [Disks] disks
97
+ attr_reader :disks
98
+
99
+ # @return [Snapshots] snapshots
100
+ attr_reader :snapshots
101
+
96
102
  #
97
103
  # Creates initializes a new instance of the ComputeManagementClient class.
98
104
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -124,6 +130,8 @@ module Azure::Compute::Mgmt::V2018_06_01
124
130
  @galleries = Galleries.new(self)
125
131
  @gallery_images = GalleryImages.new(self)
126
132
  @gallery_image_versions = GalleryImageVersions.new(self)
133
+ @disks = Disks.new(self)
134
+ @snapshots = Snapshots.new(self)
127
135
  @api_version = '2018-06-01'
128
136
  @accept_language = 'en-US'
129
137
  @long_running_operation_retry_timeout = 30
@@ -196,7 +204,7 @@ module Azure::Compute::Mgmt::V2018_06_01
196
204
  #
197
205
  def add_telemetry
198
206
  sdk_information = 'azure_mgmt_compute'
199
- sdk_information = "#{sdk_information}/0.18.1"
207
+ sdk_information = "#{sdk_information}/0.18.2"
200
208
  add_user_agent_information(sdk_information)
201
209
  end
202
210
  end
@@ -0,0 +1,1274 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Compute::Mgmt::V2018_06_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class Disks
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Disks class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Creates or updates a disk.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param disk_name [String] The name of the managed disk that is being created.
29
+ # The name can't be changed after the disk is created. Supported characters for
30
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
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: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 managed disk that is being created.
46
+ # The name can't be changed after the disk is created. Supported characters for
47
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
48
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
49
+ # operation.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [Concurrent::Promise] promise which provides async access to http
54
+ # response.
55
+ #
56
+ def create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
57
+ # Send request
58
+ promise = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
59
+
60
+ promise = promise.then do |response|
61
+ # Defining deserialization method.
62
+ deserialize_method = lambda do |parsed_response|
63
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
64
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
65
+ end
66
+
67
+ # Waiting for response.
68
+ @client.get_long_running_operation_result(response, deserialize_method)
69
+ end
70
+
71
+ promise
72
+ end
73
+
74
+ #
75
+ # Updates (patches) a disk.
76
+ #
77
+ # @param resource_group_name [String] The name of the resource group.
78
+ # @param disk_name [String] The name of the managed disk that is being created.
79
+ # The name can't be changed after the disk is created. Supported characters for
80
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
81
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
82
+ # operation.
83
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
84
+ # will be added to the HTTP request.
85
+ #
86
+ # @return [Disk] operation results.
87
+ #
88
+ def update(resource_group_name, disk_name, disk, custom_headers:nil)
89
+ response = update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
90
+ response.body unless response.nil?
91
+ end
92
+
93
+ #
94
+ # @param resource_group_name [String] The name of the resource group.
95
+ # @param disk_name [String] The name of the managed disk that is being created.
96
+ # The name can't be changed after the disk is created. Supported characters for
97
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
98
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
99
+ # operation.
100
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
101
+ # will be added to the HTTP request.
102
+ #
103
+ # @return [Concurrent::Promise] promise which provides async access to http
104
+ # response.
105
+ #
106
+ def update_async(resource_group_name, disk_name, disk, custom_headers:nil)
107
+ # Send request
108
+ promise = begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
109
+
110
+ promise = promise.then do |response|
111
+ # Defining deserialization method.
112
+ deserialize_method = lambda do |parsed_response|
113
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
114
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
115
+ end
116
+
117
+ # Waiting for response.
118
+ @client.get_long_running_operation_result(response, deserialize_method)
119
+ end
120
+
121
+ promise
122
+ end
123
+
124
+ #
125
+ # Gets information about a disk.
126
+ #
127
+ # @param resource_group_name [String] The name of the resource group.
128
+ # @param disk_name [String] The name of the managed disk that is being created.
129
+ # The name can't be changed after the disk is created. Supported characters for
130
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Disk] operation results.
135
+ #
136
+ def get(resource_group_name, disk_name, custom_headers:nil)
137
+ response = get_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # Gets information about a disk.
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group.
145
+ # @param disk_name [String] The name of the managed disk that is being created.
146
+ # The name can't be changed after the disk is created. Supported characters for
147
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
152
+ #
153
+ def get_with_http_info(resource_group_name, disk_name, custom_headers:nil)
154
+ get_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
155
+ end
156
+
157
+ #
158
+ # Gets information about a disk.
159
+ #
160
+ # @param resource_group_name [String] The name of the resource group.
161
+ # @param disk_name [String] The name of the managed disk that is being created.
162
+ # The name can't be changed after the disk is created. Supported characters for
163
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
165
+ # to the HTTP request.
166
+ #
167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
168
+ #
169
+ def get_async(resource_group_name, disk_name, custom_headers:nil)
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
172
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
189
+ query_params: {'api-version' => @client.api_version},
190
+ headers: request_headers.merge(custom_headers || {}),
191
+ base_url: request_url
192
+ }
193
+ promise = @client.make_request_async(:get, path_template, options)
194
+
195
+ promise = promise.then do |result|
196
+ http_response = result.response
197
+ status_code = http_response.status
198
+ response_content = http_response.body
199
+ unless status_code == 200
200
+ error_model = JSON.load(response_content)
201
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
202
+ end
203
+
204
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
205
+ # Deserialize Response
206
+ if status_code == 200
207
+ begin
208
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
209
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
210
+ result.body = @client.deserialize(result_mapper, parsed_response)
211
+ rescue Exception => e
212
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
213
+ end
214
+ end
215
+
216
+ result
217
+ end
218
+
219
+ promise.execute
220
+ end
221
+
222
+ #
223
+ # Deletes a disk.
224
+ #
225
+ # @param resource_group_name [String] The name of the resource group.
226
+ # @param disk_name [String] The name of the managed disk that is being created.
227
+ # The name can't be changed after the disk is created. Supported characters for
228
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
229
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
230
+ # will be added to the HTTP request.
231
+ #
232
+ def delete(resource_group_name, disk_name, custom_headers:nil)
233
+ response = delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
234
+ nil
235
+ end
236
+
237
+ #
238
+ # @param resource_group_name [String] The name of the resource group.
239
+ # @param disk_name [String] The name of the managed disk that is being created.
240
+ # The name can't be changed after the disk is created. Supported characters for
241
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
242
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
243
+ # will be added to the HTTP request.
244
+ #
245
+ # @return [Concurrent::Promise] promise which provides async access to http
246
+ # response.
247
+ #
248
+ def delete_async(resource_group_name, disk_name, custom_headers:nil)
249
+ # Send request
250
+ promise = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers)
251
+
252
+ promise = promise.then do |response|
253
+ # Defining deserialization method.
254
+ deserialize_method = lambda do |parsed_response|
255
+ end
256
+
257
+ # Waiting for response.
258
+ @client.get_long_running_operation_result(response, deserialize_method)
259
+ end
260
+
261
+ promise
262
+ end
263
+
264
+ #
265
+ # Lists all the disks under a resource group.
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group.
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ # @return [Array<Disk>] operation results.
272
+ #
273
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
274
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
275
+ first_page.get_all_items
276
+ end
277
+
278
+ #
279
+ # Lists all the disks under a resource group.
280
+ #
281
+ # @param resource_group_name [String] The name of the resource group.
282
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
283
+ # will be added to the HTTP request.
284
+ #
285
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
286
+ #
287
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
288
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
289
+ end
290
+
291
+ #
292
+ # Lists all the disks under a resource group.
293
+ #
294
+ # @param resource_group_name [String] The name of the resource group.
295
+ # @param [Hash{String => String}] A hash of custom headers that will be added
296
+ # to the HTTP request.
297
+ #
298
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
299
+ #
300
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
301
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
302
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
303
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
304
+
305
+
306
+ request_headers = {}
307
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
308
+
309
+ # Set Headers
310
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
311
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
312
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'
313
+
314
+ request_url = @base_url || @client.base_url
315
+
316
+ options = {
317
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
318
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
319
+ query_params: {'api-version' => @client.api_version},
320
+ headers: request_headers.merge(custom_headers || {}),
321
+ base_url: request_url
322
+ }
323
+ promise = @client.make_request_async(:get, path_template, options)
324
+
325
+ promise = promise.then do |result|
326
+ http_response = result.response
327
+ status_code = http_response.status
328
+ response_content = http_response.body
329
+ unless status_code == 200
330
+ error_model = JSON.load(response_content)
331
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
332
+ end
333
+
334
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
335
+ # Deserialize Response
336
+ if status_code == 200
337
+ begin
338
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
339
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::DiskList.mapper()
340
+ result.body = @client.deserialize(result_mapper, parsed_response)
341
+ rescue Exception => e
342
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
343
+ end
344
+ end
345
+
346
+ result
347
+ end
348
+
349
+ promise.execute
350
+ end
351
+
352
+ #
353
+ # Lists all the disks under a subscription.
354
+ #
355
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
356
+ # will be added to the HTTP request.
357
+ #
358
+ # @return [Array<Disk>] operation results.
359
+ #
360
+ def list(custom_headers:nil)
361
+ first_page = list_as_lazy(custom_headers:custom_headers)
362
+ first_page.get_all_items
363
+ end
364
+
365
+ #
366
+ # Lists all the disks under a subscription.
367
+ #
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
372
+ #
373
+ def list_with_http_info(custom_headers:nil)
374
+ list_async(custom_headers:custom_headers).value!
375
+ end
376
+
377
+ #
378
+ # Lists all the disks under a subscription.
379
+ #
380
+ # @param [Hash{String => String}] A hash of custom headers that will be added
381
+ # to the HTTP request.
382
+ #
383
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
384
+ #
385
+ def list_async(custom_headers:nil)
386
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
387
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
388
+
389
+
390
+ request_headers = {}
391
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
392
+
393
+ # Set Headers
394
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
395
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
396
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'
397
+
398
+ request_url = @base_url || @client.base_url
399
+
400
+ options = {
401
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
402
+ path_params: {'subscriptionId' => @client.subscription_id},
403
+ query_params: {'api-version' => @client.api_version},
404
+ headers: request_headers.merge(custom_headers || {}),
405
+ base_url: request_url
406
+ }
407
+ promise = @client.make_request_async(:get, path_template, options)
408
+
409
+ promise = promise.then do |result|
410
+ http_response = result.response
411
+ status_code = http_response.status
412
+ response_content = http_response.body
413
+ unless status_code == 200
414
+ error_model = JSON.load(response_content)
415
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
416
+ end
417
+
418
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
419
+ # Deserialize Response
420
+ if status_code == 200
421
+ begin
422
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
423
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::DiskList.mapper()
424
+ result.body = @client.deserialize(result_mapper, parsed_response)
425
+ rescue Exception => e
426
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
427
+ end
428
+ end
429
+
430
+ result
431
+ end
432
+
433
+ promise.execute
434
+ end
435
+
436
+ #
437
+ # Grants access to a disk.
438
+ #
439
+ # @param resource_group_name [String] The name of the resource group.
440
+ # @param disk_name [String] The name of the managed disk that is being created.
441
+ # The name can't be changed after the disk is created. Supported characters for
442
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
443
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
444
+ # body of the get disk access operation.
445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
+ # will be added to the HTTP request.
447
+ #
448
+ # @return [AccessUri] operation results.
449
+ #
450
+ def grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
451
+ response = grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
452
+ response.body unless response.nil?
453
+ end
454
+
455
+ #
456
+ # @param resource_group_name [String] The name of the resource group.
457
+ # @param disk_name [String] The name of the managed disk that is being created.
458
+ # The name can't be changed after the disk is created. Supported characters for
459
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
460
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
461
+ # body of the get disk access operation.
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [Concurrent::Promise] promise which provides async access to http
466
+ # response.
467
+ #
468
+ def grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
469
+ # Send request
470
+ promise = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers)
471
+
472
+ promise = promise.then do |response|
473
+ # Defining deserialization method.
474
+ deserialize_method = lambda do |parsed_response|
475
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::AccessUri.mapper()
476
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
477
+ end
478
+
479
+ # Waiting for response.
480
+ @client.get_long_running_operation_result(response, deserialize_method)
481
+ end
482
+
483
+ promise
484
+ end
485
+
486
+ #
487
+ # Revokes access to a disk.
488
+ #
489
+ # @param resource_group_name [String] The name of the resource group.
490
+ # @param disk_name [String] The name of the managed disk that is being created.
491
+ # The name can't be changed after the disk is created. Supported characters for
492
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
493
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
494
+ # will be added to the HTTP request.
495
+ #
496
+ def revoke_access(resource_group_name, disk_name, custom_headers:nil)
497
+ response = revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
498
+ nil
499
+ end
500
+
501
+ #
502
+ # @param resource_group_name [String] The name of the resource group.
503
+ # @param disk_name [String] The name of the managed disk that is being created.
504
+ # The name can't be changed after the disk is created. Supported characters for
505
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
507
+ # will be added to the HTTP request.
508
+ #
509
+ # @return [Concurrent::Promise] promise which provides async access to http
510
+ # response.
511
+ #
512
+ def revoke_access_async(resource_group_name, disk_name, custom_headers:nil)
513
+ # Send request
514
+ promise = begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers)
515
+
516
+ promise = promise.then do |response|
517
+ # Defining deserialization method.
518
+ deserialize_method = lambda do |parsed_response|
519
+ end
520
+
521
+ # Waiting for response.
522
+ @client.get_long_running_operation_result(response, deserialize_method)
523
+ end
524
+
525
+ promise
526
+ end
527
+
528
+ #
529
+ # Creates or updates a disk.
530
+ #
531
+ # @param resource_group_name [String] The name of the resource group.
532
+ # @param disk_name [String] The name of the managed disk that is being created.
533
+ # The name can't be changed after the disk is created. Supported characters for
534
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
535
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
536
+ # operation.
537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
538
+ # will be added to the HTTP request.
539
+ #
540
+ # @return [Disk] operation results.
541
+ #
542
+ def begin_create_or_update(resource_group_name, disk_name, disk, custom_headers:nil)
543
+ response = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
544
+ response.body unless response.nil?
545
+ end
546
+
547
+ #
548
+ # Creates or updates a disk.
549
+ #
550
+ # @param resource_group_name [String] The name of the resource group.
551
+ # @param disk_name [String] The name of the managed disk that is being created.
552
+ # The name can't be changed after the disk is created. Supported characters for
553
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
554
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
555
+ # operation.
556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
557
+ # will be added to the HTTP request.
558
+ #
559
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
560
+ #
561
+ def begin_create_or_update_with_http_info(resource_group_name, disk_name, disk, custom_headers:nil)
562
+ begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
563
+ end
564
+
565
+ #
566
+ # Creates or updates a disk.
567
+ #
568
+ # @param resource_group_name [String] The name of the resource group.
569
+ # @param disk_name [String] The name of the managed disk that is being created.
570
+ # The name can't be changed after the disk is created. Supported characters for
571
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
572
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
573
+ # operation.
574
+ # @param [Hash{String => String}] A hash of custom headers that will be added
575
+ # to the HTTP request.
576
+ #
577
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
578
+ #
579
+ def begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
580
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
581
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
582
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
583
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
584
+ fail ArgumentError, 'disk is nil' if disk.nil?
585
+
586
+
587
+ request_headers = {}
588
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
589
+
590
+ # Set Headers
591
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
592
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
593
+
594
+ # Serialize Request
595
+ request_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
596
+ request_content = @client.serialize(request_mapper, disk)
597
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
598
+
599
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
600
+
601
+ request_url = @base_url || @client.base_url
602
+
603
+ options = {
604
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
605
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
606
+ query_params: {'api-version' => @client.api_version},
607
+ body: request_content,
608
+ headers: request_headers.merge(custom_headers || {}),
609
+ base_url: request_url
610
+ }
611
+ promise = @client.make_request_async(:put, path_template, options)
612
+
613
+ promise = promise.then do |result|
614
+ http_response = result.response
615
+ status_code = http_response.status
616
+ response_content = http_response.body
617
+ unless status_code == 200 || status_code == 202
618
+ error_model = JSON.load(response_content)
619
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
620
+ end
621
+
622
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
623
+ # Deserialize Response
624
+ if status_code == 200
625
+ begin
626
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
627
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
628
+ result.body = @client.deserialize(result_mapper, parsed_response)
629
+ rescue Exception => e
630
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
631
+ end
632
+ end
633
+ # Deserialize Response
634
+ if status_code == 202
635
+ begin
636
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
637
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
638
+ result.body = @client.deserialize(result_mapper, parsed_response)
639
+ rescue Exception => e
640
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
641
+ end
642
+ end
643
+
644
+ result
645
+ end
646
+
647
+ promise.execute
648
+ end
649
+
650
+ #
651
+ # Updates (patches) a disk.
652
+ #
653
+ # @param resource_group_name [String] The name of the resource group.
654
+ # @param disk_name [String] The name of the managed disk that is being created.
655
+ # The name can't be changed after the disk is created. Supported characters for
656
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
657
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
658
+ # operation.
659
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
660
+ # will be added to the HTTP request.
661
+ #
662
+ # @return [Disk] operation results.
663
+ #
664
+ def begin_update(resource_group_name, disk_name, disk, custom_headers:nil)
665
+ response = begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
666
+ response.body unless response.nil?
667
+ end
668
+
669
+ #
670
+ # Updates (patches) a disk.
671
+ #
672
+ # @param resource_group_name [String] The name of the resource group.
673
+ # @param disk_name [String] The name of the managed disk that is being created.
674
+ # The name can't be changed after the disk is created. Supported characters for
675
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
676
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
677
+ # operation.
678
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
679
+ # will be added to the HTTP request.
680
+ #
681
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
682
+ #
683
+ def begin_update_with_http_info(resource_group_name, disk_name, disk, custom_headers:nil)
684
+ begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
685
+ end
686
+
687
+ #
688
+ # Updates (patches) a disk.
689
+ #
690
+ # @param resource_group_name [String] The name of the resource group.
691
+ # @param disk_name [String] The name of the managed disk that is being created.
692
+ # The name can't be changed after the disk is created. Supported characters for
693
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
694
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
695
+ # operation.
696
+ # @param [Hash{String => String}] A hash of custom headers that will be added
697
+ # to the HTTP request.
698
+ #
699
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
700
+ #
701
+ def begin_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
702
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
703
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
704
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
705
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
706
+ fail ArgumentError, 'disk is nil' if disk.nil?
707
+
708
+
709
+ request_headers = {}
710
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
711
+
712
+ # Set Headers
713
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
714
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
715
+
716
+ # Serialize Request
717
+ request_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::DiskUpdate.mapper()
718
+ request_content = @client.serialize(request_mapper, disk)
719
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
720
+
721
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
722
+
723
+ request_url = @base_url || @client.base_url
724
+
725
+ options = {
726
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
727
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
728
+ query_params: {'api-version' => @client.api_version},
729
+ body: request_content,
730
+ headers: request_headers.merge(custom_headers || {}),
731
+ base_url: request_url
732
+ }
733
+ promise = @client.make_request_async(:patch, path_template, options)
734
+
735
+ promise = promise.then do |result|
736
+ http_response = result.response
737
+ status_code = http_response.status
738
+ response_content = http_response.body
739
+ unless status_code == 200 || status_code == 202
740
+ error_model = JSON.load(response_content)
741
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
742
+ end
743
+
744
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
745
+ # Deserialize Response
746
+ if status_code == 200
747
+ begin
748
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
749
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
750
+ result.body = @client.deserialize(result_mapper, parsed_response)
751
+ rescue Exception => e
752
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
753
+ end
754
+ end
755
+ # Deserialize Response
756
+ if status_code == 202
757
+ begin
758
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
759
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::Disk.mapper()
760
+ result.body = @client.deserialize(result_mapper, parsed_response)
761
+ rescue Exception => e
762
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
763
+ end
764
+ end
765
+
766
+ result
767
+ end
768
+
769
+ promise.execute
770
+ end
771
+
772
+ #
773
+ # Deletes a disk.
774
+ #
775
+ # @param resource_group_name [String] The name of the resource group.
776
+ # @param disk_name [String] The name of the managed disk that is being created.
777
+ # The name can't be changed after the disk is created. Supported characters for
778
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
780
+ # will be added to the HTTP request.
781
+ #
782
+ #
783
+ def begin_delete(resource_group_name, disk_name, custom_headers:nil)
784
+ response = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
785
+ nil
786
+ end
787
+
788
+ #
789
+ # Deletes a disk.
790
+ #
791
+ # @param resource_group_name [String] The name of the resource group.
792
+ # @param disk_name [String] The name of the managed disk that is being created.
793
+ # The name can't be changed after the disk is created. Supported characters for
794
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
795
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
796
+ # will be added to the HTTP request.
797
+ #
798
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
799
+ #
800
+ def begin_delete_with_http_info(resource_group_name, disk_name, custom_headers:nil)
801
+ begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
802
+ end
803
+
804
+ #
805
+ # Deletes a disk.
806
+ #
807
+ # @param resource_group_name [String] The name of the resource group.
808
+ # @param disk_name [String] The name of the managed disk that is being created.
809
+ # The name can't be changed after the disk is created. Supported characters for
810
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
811
+ # @param [Hash{String => String}] A hash of custom headers that will be added
812
+ # to the HTTP request.
813
+ #
814
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
815
+ #
816
+ def begin_delete_async(resource_group_name, disk_name, custom_headers:nil)
817
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
818
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
819
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
820
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
821
+
822
+
823
+ request_headers = {}
824
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
825
+
826
+ # Set Headers
827
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
828
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
829
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
830
+
831
+ request_url = @base_url || @client.base_url
832
+
833
+ options = {
834
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
835
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
836
+ query_params: {'api-version' => @client.api_version},
837
+ headers: request_headers.merge(custom_headers || {}),
838
+ base_url: request_url
839
+ }
840
+ promise = @client.make_request_async(:delete, path_template, options)
841
+
842
+ promise = promise.then do |result|
843
+ http_response = result.response
844
+ status_code = http_response.status
845
+ response_content = http_response.body
846
+ unless status_code == 200 || status_code == 202 || status_code == 204
847
+ error_model = JSON.load(response_content)
848
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
849
+ end
850
+
851
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
852
+
853
+ result
854
+ end
855
+
856
+ promise.execute
857
+ end
858
+
859
+ #
860
+ # Grants access to a disk.
861
+ #
862
+ # @param resource_group_name [String] The name of the resource group.
863
+ # @param disk_name [String] The name of the managed disk that is being created.
864
+ # The name can't be changed after the disk is created. Supported characters for
865
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
866
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
867
+ # body of the get disk access operation.
868
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
869
+ # will be added to the HTTP request.
870
+ #
871
+ # @return [AccessUri] operation results.
872
+ #
873
+ def begin_grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
874
+ response = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
875
+ response.body unless response.nil?
876
+ end
877
+
878
+ #
879
+ # Grants access to a disk.
880
+ #
881
+ # @param resource_group_name [String] The name of the resource group.
882
+ # @param disk_name [String] The name of the managed disk that is being created.
883
+ # The name can't be changed after the disk is created. Supported characters for
884
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
885
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
886
+ # body of the get disk access operation.
887
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
888
+ # will be added to the HTTP request.
889
+ #
890
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
891
+ #
892
+ def begin_grant_access_with_http_info(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
893
+ begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
894
+ end
895
+
896
+ #
897
+ # Grants access to a disk.
898
+ #
899
+ # @param resource_group_name [String] The name of the resource group.
900
+ # @param disk_name [String] The name of the managed disk that is being created.
901
+ # The name can't be changed after the disk is created. Supported characters for
902
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
903
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
904
+ # body of the get disk access operation.
905
+ # @param [Hash{String => String}] A hash of custom headers that will be added
906
+ # to the HTTP request.
907
+ #
908
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
909
+ #
910
+ def begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
911
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
912
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
913
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
914
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
915
+ fail ArgumentError, 'grant_access_data is nil' if grant_access_data.nil?
916
+
917
+
918
+ request_headers = {}
919
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
920
+
921
+ # Set Headers
922
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
923
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
924
+
925
+ # Serialize Request
926
+ request_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::GrantAccessData.mapper()
927
+ request_content = @client.serialize(request_mapper, grant_access_data)
928
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
929
+
930
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'
931
+
932
+ request_url = @base_url || @client.base_url
933
+
934
+ options = {
935
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
936
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
937
+ query_params: {'api-version' => @client.api_version},
938
+ body: request_content,
939
+ headers: request_headers.merge(custom_headers || {}),
940
+ base_url: request_url
941
+ }
942
+ promise = @client.make_request_async(:post, path_template, options)
943
+
944
+ promise = promise.then do |result|
945
+ http_response = result.response
946
+ status_code = http_response.status
947
+ response_content = http_response.body
948
+ unless status_code == 200 || status_code == 202
949
+ error_model = JSON.load(response_content)
950
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
951
+ end
952
+
953
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
954
+ # Deserialize Response
955
+ if status_code == 200
956
+ begin
957
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
958
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::AccessUri.mapper()
959
+ result.body = @client.deserialize(result_mapper, parsed_response)
960
+ rescue Exception => e
961
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
962
+ end
963
+ end
964
+
965
+ result
966
+ end
967
+
968
+ promise.execute
969
+ end
970
+
971
+ #
972
+ # Revokes access to a disk.
973
+ #
974
+ # @param resource_group_name [String] The name of the resource group.
975
+ # @param disk_name [String] The name of the managed disk that is being created.
976
+ # The name can't be changed after the disk is created. Supported characters for
977
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
978
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
979
+ # will be added to the HTTP request.
980
+ #
981
+ #
982
+ def begin_revoke_access(resource_group_name, disk_name, custom_headers:nil)
983
+ response = begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
984
+ nil
985
+ end
986
+
987
+ #
988
+ # Revokes access to a disk.
989
+ #
990
+ # @param resource_group_name [String] The name of the resource group.
991
+ # @param disk_name [String] The name of the managed disk that is being created.
992
+ # The name can't be changed after the disk is created. Supported characters for
993
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
994
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
995
+ # will be added to the HTTP request.
996
+ #
997
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
998
+ #
999
+ def begin_revoke_access_with_http_info(resource_group_name, disk_name, custom_headers:nil)
1000
+ begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
1001
+ end
1002
+
1003
+ #
1004
+ # Revokes access to a disk.
1005
+ #
1006
+ # @param resource_group_name [String] The name of the resource group.
1007
+ # @param disk_name [String] The name of the managed disk that is being created.
1008
+ # The name can't be changed after the disk is created. Supported characters for
1009
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
1010
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1011
+ # to the HTTP request.
1012
+ #
1013
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1014
+ #
1015
+ def begin_revoke_access_async(resource_group_name, disk_name, custom_headers:nil)
1016
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1017
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1018
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
1019
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1020
+
1021
+
1022
+ request_headers = {}
1023
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1024
+
1025
+ # Set Headers
1026
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1027
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1028
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'
1029
+
1030
+ request_url = @base_url || @client.base_url
1031
+
1032
+ options = {
1033
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1034
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
1035
+ query_params: {'api-version' => @client.api_version},
1036
+ headers: request_headers.merge(custom_headers || {}),
1037
+ base_url: request_url
1038
+ }
1039
+ promise = @client.make_request_async(:post, path_template, options)
1040
+
1041
+ promise = promise.then do |result|
1042
+ http_response = result.response
1043
+ status_code = http_response.status
1044
+ response_content = http_response.body
1045
+ unless status_code == 200 || status_code == 202
1046
+ error_model = JSON.load(response_content)
1047
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1048
+ end
1049
+
1050
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1051
+
1052
+ result
1053
+ end
1054
+
1055
+ promise.execute
1056
+ end
1057
+
1058
+ #
1059
+ # Lists all the disks under a resource group.
1060
+ #
1061
+ # @param next_page_link [String] The NextLink from the previous successful call
1062
+ # to List operation.
1063
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1064
+ # will be added to the HTTP request.
1065
+ #
1066
+ # @return [DiskList] operation results.
1067
+ #
1068
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1069
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1070
+ response.body unless response.nil?
1071
+ end
1072
+
1073
+ #
1074
+ # Lists all the disks under a resource group.
1075
+ #
1076
+ # @param next_page_link [String] The NextLink from the previous successful call
1077
+ # to List operation.
1078
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1079
+ # will be added to the HTTP request.
1080
+ #
1081
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1082
+ #
1083
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1084
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1085
+ end
1086
+
1087
+ #
1088
+ # Lists all the disks under a resource group.
1089
+ #
1090
+ # @param next_page_link [String] The NextLink from the previous successful call
1091
+ # to List operation.
1092
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1093
+ # to the HTTP request.
1094
+ #
1095
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1096
+ #
1097
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1098
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1099
+
1100
+
1101
+ request_headers = {}
1102
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
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 = Azure::Compute::Mgmt::V2018_06_01::Models::DiskList.mapper()
1134
+ result.body = @client.deserialize(result_mapper, parsed_response)
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: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: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
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1191
+
1192
+ # Set Headers
1193
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1194
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1195
+ path_template = '{nextLink}'
1196
+
1197
+ request_url = @base_url || @client.base_url
1198
+
1199
+ options = {
1200
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1201
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1202
+ headers: request_headers.merge(custom_headers || {}),
1203
+ base_url: request_url
1204
+ }
1205
+ promise = @client.make_request_async(:get, path_template, options)
1206
+
1207
+ promise = promise.then do |result|
1208
+ http_response = result.response
1209
+ status_code = http_response.status
1210
+ response_content = http_response.body
1211
+ unless status_code == 200
1212
+ error_model = JSON.load(response_content)
1213
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1214
+ end
1215
+
1216
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1217
+ # Deserialize Response
1218
+ if status_code == 200
1219
+ begin
1220
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1221
+ result_mapper = Azure::Compute::Mgmt::V2018_06_01::Models::DiskList.mapper()
1222
+ result.body = @client.deserialize(result_mapper, parsed_response)
1223
+ rescue Exception => e
1224
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1225
+ end
1226
+ end
1227
+
1228
+ result
1229
+ end
1230
+
1231
+ promise.execute
1232
+ end
1233
+
1234
+ #
1235
+ # Lists all the disks under a resource group.
1236
+ #
1237
+ # @param resource_group_name [String] The name of the resource group.
1238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1239
+ # will be added to the HTTP request.
1240
+ #
1241
+ # @return [DiskList] which provide lazy access to pages of the response.
1242
+ #
1243
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1244
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1245
+ unless response.nil?
1246
+ page = response.body
1247
+ page.next_method = Proc.new do |next_page_link|
1248
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1249
+ end
1250
+ page
1251
+ end
1252
+ end
1253
+
1254
+ #
1255
+ # Lists all the disks under a subscription.
1256
+ #
1257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1258
+ # will be added to the HTTP request.
1259
+ #
1260
+ # @return [DiskList] which provide lazy access to pages of the response.
1261
+ #
1262
+ def list_as_lazy(custom_headers:nil)
1263
+ response = list_async(custom_headers:custom_headers).value!
1264
+ unless response.nil?
1265
+ page = response.body
1266
+ page.next_method = Proc.new do |next_page_link|
1267
+ list_next_async(next_page_link, custom_headers:custom_headers)
1268
+ end
1269
+ page
1270
+ end
1271
+ end
1272
+
1273
+ end
1274
+ end