azure_mgmt_compute 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +1 -27
  3. data/azure_mgmt_compute.gemspec +1 -1
  4. data/lib/azure_mgmt_compute/availability_sets.rb +184 -141
  5. data/lib/azure_mgmt_compute/compute_management_client.rb +2 -2
  6. data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
  7. data/lib/azure_mgmt_compute/models/api_entity_reference.rb +2 -3
  8. data/lib/azure_mgmt_compute/models/api_error.rb +1 -1
  9. data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -1
  10. data/lib/azure_mgmt_compute/models/availability_set.rb +1 -1
  11. data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +1 -1
  12. data/lib/azure_mgmt_compute/models/availability_set_properties.rb +2 -2
  13. data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +3 -3
  14. data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +1 -1
  15. data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
  16. data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
  17. data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
  18. data/lib/azure_mgmt_compute/models/data_disk.rb +1 -1
  19. data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -1
  20. data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +1 -1
  21. data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
  22. data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +11 -2
  23. data/lib/azure_mgmt_compute/models/disk_instance_view.rb +1 -1
  24. data/lib/azure_mgmt_compute/models/hardware_profile.rb +9 -6
  25. data/lib/azure_mgmt_compute/models/image_reference.rb +1 -1
  26. data/lib/azure_mgmt_compute/models/inner_error.rb +1 -1
  27. data/lib/azure_mgmt_compute/models/instance_view_status.rb +4 -4
  28. data/lib/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  29. data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +1 -1
  30. data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +1 -1
  31. data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -1
  32. data/lib/azure_mgmt_compute/models/list_usages_result.rb +1 -1
  33. data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -1
  34. data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -1
  35. data/lib/azure_mgmt_compute/models/network_profile.rb +1 -1
  36. data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
  37. data/lib/azure_mgmt_compute/models/osdisk.rb +1 -1
  38. data/lib/azure_mgmt_compute/models/osdisk_image.rb +1 -1
  39. data/lib/azure_mgmt_compute/models/osprofile.rb +1 -1
  40. data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
  41. data/lib/azure_mgmt_compute/models/plan.rb +1 -1
  42. data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
  43. data/lib/azure_mgmt_compute/models/purchase_plan.rb +1 -1
  44. data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
  45. data/lib/azure_mgmt_compute/models/sku.rb +1 -1
  46. data/lib/azure_mgmt_compute/models/ssh_configuration.rb +1 -1
  47. data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
  48. data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
  49. data/lib/azure_mgmt_compute/models/storage_profile.rb +1 -1
  50. data/lib/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
  51. data/lib/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
  52. data/lib/azure_mgmt_compute/models/usage.rb +1 -1
  53. data/lib/azure_mgmt_compute/models/usage_name.rb +1 -1
  54. data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -1
  55. data/lib/azure_mgmt_compute/models/vault_secret_group.rb +1 -1
  56. data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -1
  57. data/lib/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  58. data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +1 -1
  59. data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +1 -1
  60. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
  61. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +1 -1
  62. data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -1
  63. data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -1
  64. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +20 -27
  65. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +1 -1
  66. data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
  67. data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -11
  68. data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +8 -21
  69. data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +1 -1
  70. data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +1 -1
  71. data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +1 -1
  72. data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +1 -1
  73. data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +10 -1
  74. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
  75. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +1 -1
  76. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
  77. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +1 -1
  78. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
  79. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
  80. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
  81. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +43 -12
  82. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
  83. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
  84. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +1 -1
  85. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
  86. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +1 -1
  87. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
  88. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
  89. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +1 -1
  90. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +11 -1
  91. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
  92. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
  93. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
  94. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
  95. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  96. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
  97. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
  98. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
  99. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
  100. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +1 -1
  101. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +1 -1
  102. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +1 -1
  103. data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -1
  104. data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +1 -1
  105. data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +12 -1
  106. data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
  107. data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +1 -1
  108. data/lib/azure_mgmt_compute/models/win_rmlistener.rb +1 -1
  109. data/lib/azure_mgmt_compute/models/windows_configuration.rb +1 -1
  110. data/lib/azure_mgmt_compute/module_definition.rb +1 -1
  111. data/lib/azure_mgmt_compute/usage_operations.rb +71 -11
  112. data/lib/azure_mgmt_compute/version.rb +2 -2
  113. data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +123 -18
  114. data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +132 -22
  115. data/lib/azure_mgmt_compute/virtual_machine_images.rb +197 -26
  116. data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +419 -79
  117. data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +736 -147
  118. data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +36 -64
  119. data/lib/azure_mgmt_compute/virtual_machines.rb +531 -200
  120. data/lib/azure_mgmt_compute.rb +3 -6
  121. metadata +26 -24
  122. data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +0 -123
  123. data/lib/azure_mgmt_compute/models/compute_operation_status.rb +0 -18
  124. data/lib/azure_mgmt_compute/models/delete_operation_result.rb +0 -110
  125. data/lib/azure_mgmt_compute/models/operation_status.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0c6556907902336ce1df90c380e1fa9baf66ee88
4
- data.tar.gz: 51156a07f9afe7e118bbf88bd55c34ebf8ee1fee
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjZhNGZiZjkxZDRiZGNhMzIxODBmZGJkYmU4NjA4NWI0NmZhYjZiMA==
5
+ data.tar.gz: !binary |-
6
+ ZDAxNjY2N2Y4ZmFhYzgwMDU4YmYxNTFmNzA0M2M5NjBkYjMwNDhhMQ==
5
7
  SHA512:
6
- metadata.gz: 13a86f9e986e9881595d67b7971e9fe58e29637ff52d6ce06afc2f89e0e3329d990507106caeb242a779fcfb342f8e58f2560e1cd98bde2a1e2c8e52b95c6a3c
7
- data.tar.gz: 0fa12ad4ba5434097ad09800c3786605ccbb0bfcf93cbc1d8b6acdf05caef3f5a7c55319584e89d7ee46ba83b63c1f4702e36eb0ffba62bbfb8479bcf0f20be2
8
+ metadata.gz: !binary |-
9
+ NzA0ODgzYTQ3NTYwZjY2NDBlZTU5MTAzNmMyNGRhMzU1ZGQxYTZkZmNiNjc0
10
+ NDE1NDk1NTMzZWJkNTEyYTZlNDFiYmZlNzJhNjc3YTYyNGU4Y2U3ZDZkOGU1
11
+ ZmQ1MjUzM2ZjMTYzZThhY2Y3MmQ4NDNjOWE0ZDAwNjBiNmJlMjY=
12
+ data.tar.gz: !binary |-
13
+ NWYwYjg1MmRjYWU0ZTYzOGY5OTEzYTYxYzU5YzVlZmQ4ZjNkZWUzOWE3Y2My
14
+ YzA5YzdiYThiM2NkYzQ4ODAyMDljZDQxMDIzYzMxNjE3NGJiMTYyMDU0Zjk4
15
+ OGJiNGQzMTJiZmExN2U4ZTM5OTdjZWY2NTg5Y2ZmOGY5YWJhMTQ=
data/README.md CHANGED
@@ -83,7 +83,7 @@ params.type = 'Microsoft.Compute/virtualMachines'
83
83
  params.properties = props
84
84
  params.location = 'westus'
85
85
 
86
- promise = client.virtual_machines.create_or_update('existing_resource_group_name', 'name_of_new_vm', params)
86
+ promise = client.virtual_machines.create_or_update_async('existing_resource_group_name', 'name_of_new_vm', params)
87
87
  ```
88
88
 
89
89
  The SDK method returns a promise which you can utilize depending on your needs. E.g. if you need to get result immediately via sync blocking call - do the following:
@@ -111,29 +111,3 @@ p vm.id # id of the new vm
111
111
 
112
112
  Congrats, you've create new virtual machine. We encourage you to try more stuff and let us know your feedback!
113
113
  For advanced SDK usage please reference to the spec files.
114
-
115
- # Running tests
116
-
117
- ## Adding env variables
118
-
119
- To run the tests you would need to set the following environment variables with your real Azure data:
120
-
121
- * AZURE_TENANT_ID="your tenant id or domain"
122
- * AZURE_CLIENT_ID="your client id / application id"
123
- * AZURE_CLIENT_SECRET="your service principal secret"
124
- * AZURE_SUBSCRIPTION_ID="your subscription id"
125
-
126
- * run_long_tasks - set this to '1' only if you would like to run time consuming tests like VM creation.
127
-
128
- ## Starting tests
129
-
130
- Just run 'rspec' command from the current gem folder.
131
-
132
- # Contribution
133
-
134
- All the SDK code was generated by tool 'AutoRest' - https://github.com/Azure/autorest
135
- So if you have found a bug or have an idea for a new feature - suggest, discuss and contribute it into the AutoRest repository. After that SDK maintainers will update the sources and the gem.
136
-
137
- # Provide feedback
138
-
139
- Send email to the azsdkteam@microsoft.com or file new issue in this repository.
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'rspec', '~> 3'
29
29
  spec.add_development_dependency 'dotenv', '~> 2'
30
30
 
31
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.0'
31
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.3'
32
32
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -30,13 +30,47 @@ module Azure::ARM::Compute
30
30
  # operation.
31
31
  # @param parameters [AvailabilitySet] Parameters supplied to the Create
32
32
  # Availability Set operation.
33
- # @param [Hash{String => String}] The hash of custom headers need to be
34
- # applied to HTTP request.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
35
  #
36
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
37
- # response.
36
+ # @return [AvailabilitySet] operation results.
38
37
  #
39
38
  def create_or_update(resource_group_name, name, parameters, custom_headers = nil)
39
+ response = create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # The operation to create or update the availability set.
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group.
47
+ # @param name [String] Parameters supplied to the Create Availability Set
48
+ # operation.
49
+ # @param parameters [AvailabilitySet] Parameters supplied to the Create
50
+ # Availability Set operation.
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
56
+ def create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
57
+ create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
58
+ end
59
+
60
+ #
61
+ # The operation to create or update the availability set.
62
+ #
63
+ # @param resource_group_name [String] The name of the resource group.
64
+ # @param name [String] Parameters supplied to the Create Availability Set
65
+ # operation.
66
+ # @param parameters [AvailabilitySet] Parameters supplied to the Create
67
+ # Availability Set operation.
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
+ #
73
+ def create_or_update_async(resource_group_name, name, parameters, custom_headers = nil)
40
74
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
41
75
  fail ArgumentError, 'name is nil' if name.nil?
42
76
  fail ArgumentError, 'parameters is nil' if parameters.nil?
@@ -54,7 +88,7 @@ module Azure::ARM::Compute
54
88
  unless parameters.nil?
55
89
  parameters = AvailabilitySet.serialize_object(parameters)
56
90
  end
57
- request_content = JSON.generate(parameters, quirks_mode: true)
91
+ request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
58
92
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{name}'
59
93
  options = {
60
94
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -63,7 +97,10 @@ module Azure::ARM::Compute
63
97
  body: request_content,
64
98
  headers: request_headers.merge(custom_headers || {})
65
99
  }
66
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
100
+
101
+ request_url = @base_url || @client.base_url
102
+
103
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
67
104
  promise = request.run_promise do |req|
68
105
  @client.credentials.sign_request(req) unless @client.credentials.nil?
69
106
  end
@@ -103,13 +140,40 @@ module Azure::ARM::Compute
103
140
  #
104
141
  # @param resource_group_name [String] The name of the resource group.
105
142
  # @param availability_set_name [String] The name of the availability set.
106
- # @param [Hash{String => String}] The hash of custom headers need to be
107
- # applied to HTTP request.
143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
+ # will be added to the HTTP request.
108
145
  #
109
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
110
- # response.
111
146
  #
112
147
  def delete(resource_group_name, availability_set_name, custom_headers = nil)
148
+ response = delete_async(resource_group_name, availability_set_name, custom_headers).value!
149
+ nil
150
+ end
151
+
152
+ #
153
+ # The operation to delete the availability set.
154
+ #
155
+ # @param resource_group_name [String] The name of the resource group.
156
+ # @param availability_set_name [String] The name of the availability set.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def delete_with_http_info(resource_group_name, availability_set_name, custom_headers = nil)
163
+ delete_async(resource_group_name, availability_set_name, custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # The operation to delete the availability set.
168
+ #
169
+ # @param resource_group_name [String] The name of the resource group.
170
+ # @param availability_set_name [String] The name of the availability set.
171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
172
+ # to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def delete_async(resource_group_name, availability_set_name, custom_headers = nil)
113
177
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
114
178
  fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
115
179
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -126,7 +190,10 @@ module Azure::ARM::Compute
126
190
  query_params: {'api-version' => @client.api_version},
127
191
  headers: request_headers.merge(custom_headers || {})
128
192
  }
129
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
193
+
194
+ request_url = @base_url || @client.base_url
195
+
196
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
130
197
  promise = request.run_promise do |req|
131
198
  @client.credentials.sign_request(req) unless @client.credentials.nil?
132
199
  end
@@ -154,13 +221,41 @@ module Azure::ARM::Compute
154
221
  #
155
222
  # @param resource_group_name [String] The name of the resource group.
156
223
  # @param availability_set_name [String] The name of the availability set.
157
- # @param [Hash{String => String}] The hash of custom headers need to be
158
- # applied to HTTP request.
224
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
225
+ # will be added to the HTTP request.
159
226
  #
160
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
161
- # response.
227
+ # @return [AvailabilitySet] operation results.
162
228
  #
163
229
  def get(resource_group_name, availability_set_name, custom_headers = nil)
230
+ response = get_async(resource_group_name, availability_set_name, custom_headers).value!
231
+ response.body unless response.nil?
232
+ end
233
+
234
+ #
235
+ # The operation to get the availability set.
236
+ #
237
+ # @param resource_group_name [String] The name of the resource group.
238
+ # @param availability_set_name [String] The name of the availability set.
239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
240
+ # will be added to the HTTP request.
241
+ #
242
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
243
+ #
244
+ def get_with_http_info(resource_group_name, availability_set_name, custom_headers = nil)
245
+ get_async(resource_group_name, availability_set_name, custom_headers).value!
246
+ end
247
+
248
+ #
249
+ # The operation to get the availability set.
250
+ #
251
+ # @param resource_group_name [String] The name of the resource group.
252
+ # @param availability_set_name [String] The name of the availability set.
253
+ # @param [Hash{String => String}] A hash of custom headers that will be added
254
+ # to the HTTP request.
255
+ #
256
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
257
+ #
258
+ def get_async(resource_group_name, availability_set_name, custom_headers = nil)
164
259
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
165
260
  fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
166
261
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -177,7 +272,10 @@ module Azure::ARM::Compute
177
272
  query_params: {'api-version' => @client.api_version},
178
273
  headers: request_headers.merge(custom_headers || {})
179
274
  }
180
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
275
+
276
+ request_url = @base_url || @client.base_url
277
+
278
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
181
279
  promise = request.run_promise do |req|
182
280
  @client.credentials.sign_request(req) unless @client.credentials.nil?
183
281
  end
@@ -216,13 +314,39 @@ module Azure::ARM::Compute
216
314
  # The operation to list the availability sets.
217
315
  #
218
316
  # @param resource_group_name [String] The name of the resource group.
219
- # @param [Hash{String => String}] The hash of custom headers need to be
220
- # applied to HTTP request.
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
221
319
  #
222
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
223
- # response.
320
+ # @return [AvailabilitySetListResult] operation results.
224
321
  #
225
322
  def list(resource_group_name, custom_headers = nil)
323
+ response = list_async(resource_group_name, custom_headers).value!
324
+ response.body unless response.nil?
325
+ end
326
+
327
+ #
328
+ # The operation to list the availability sets.
329
+ #
330
+ # @param resource_group_name [String] The name of the resource group.
331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
332
+ # will be added to the HTTP request.
333
+ #
334
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
335
+ #
336
+ def list_with_http_info(resource_group_name, custom_headers = nil)
337
+ list_async(resource_group_name, custom_headers).value!
338
+ end
339
+
340
+ #
341
+ # The operation to list the availability sets.
342
+ #
343
+ # @param resource_group_name [String] The name of the resource group.
344
+ # @param [Hash{String => String}] A hash of custom headers that will be added
345
+ # to the HTTP request.
346
+ #
347
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
348
+ #
349
+ def list_async(resource_group_name, custom_headers = nil)
226
350
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
227
351
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
228
352
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -238,7 +362,10 @@ module Azure::ARM::Compute
238
362
  query_params: {'api-version' => @client.api_version},
239
363
  headers: request_headers.merge(custom_headers || {})
240
364
  }
241
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
365
+
366
+ request_url = @base_url || @client.base_url
367
+
368
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
242
369
  promise = request.run_promise do |req|
243
370
  @client.credentials.sign_request(req) unless @client.credentials.nil?
244
371
  end
@@ -274,152 +401,68 @@ module Azure::ARM::Compute
274
401
  end
275
402
 
276
403
  #
277
- # Lists virtual-machine-sizes available to be used for an availability set.
404
+ # Lists all available virtual machine sizes that can be used to create a new
405
+ # virtual machine in an existing availability set.
278
406
  #
279
407
  # @param resource_group_name [String] The name of the resource group.
280
408
  # @param availability_set_name [String] The name of the availability set.
281
- # @param [Hash{String => String}] The hash of custom headers need to be
282
- # applied to HTTP request.
409
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
410
+ # will be added to the HTTP request.
283
411
  #
284
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
285
- # response.
412
+ # @return [VirtualMachineSizeListResult] operation results.
286
413
  #
287
414
  def list_available_sizes(resource_group_name, availability_set_name, custom_headers = nil)
288
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
- fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
290
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
291
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
292
- request_headers = {}
293
-
294
- # Set Headers
295
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
296
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
297
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'
298
- options = {
299
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
300
- path_params: {'resourceGroupName' => resource_group_name,'availabilitySetName' => availability_set_name,'subscriptionId' => @client.subscription_id},
301
- query_params: {'api-version' => @client.api_version},
302
- headers: request_headers.merge(custom_headers || {})
303
- }
304
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
305
- promise = request.run_promise do |req|
306
- @client.credentials.sign_request(req) unless @client.credentials.nil?
307
- end
308
-
309
- promise = promise.then do |http_response|
310
- status_code = http_response.status
311
- response_content = http_response.body
312
- unless status_code == 200
313
- error_model = JSON.load(response_content)
314
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
315
- end
316
-
317
- # Create Result
318
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
319
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
320
- # Deserialize Response
321
- if status_code == 200
322
- begin
323
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
324
- unless parsed_response.nil?
325
- parsed_response = VirtualMachineSizeListResult.deserialize_object(parsed_response)
326
- end
327
- result.body = parsed_response
328
- rescue Exception => e
329
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
330
- end
331
- end
332
-
333
- result
334
- end
335
-
336
- promise.execute
415
+ response = list_available_sizes_async(resource_group_name, availability_set_name, custom_headers).value!
416
+ response.body unless response.nil?
337
417
  end
338
418
 
339
419
  #
340
- # The operation to list the availability sets.
420
+ # Lists all available virtual machine sizes that can be used to create a new
421
+ # virtual machine in an existing availability set.
341
422
  #
342
- # @param next_page_link [String] The NextLink from the previous successful
343
- # call to List operation.
344
- # @param [Hash{String => String}] The hash of custom headers need to be
345
- # applied to HTTP request.
423
+ # @param resource_group_name [String] The name of the resource group.
424
+ # @param availability_set_name [String] The name of the availability set.
425
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
426
+ # will be added to the HTTP request.
346
427
  #
347
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
348
- # response.
428
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
349
429
  #
350
- def list_next(next_page_link, custom_headers = nil)
351
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
352
- request_headers = {}
353
-
354
- # Set Headers
355
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
356
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
357
- path_template = '{nextLink}'
358
- options = {
359
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
360
- skip_encoding_path_params: {'nextLink' => next_page_link},
361
- headers: request_headers.merge(custom_headers || {})
362
- }
363
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
364
- promise = request.run_promise do |req|
365
- @client.credentials.sign_request(req) unless @client.credentials.nil?
366
- end
367
-
368
- promise = promise.then do |http_response|
369
- status_code = http_response.status
370
- response_content = http_response.body
371
- unless status_code == 200
372
- error_model = JSON.load(response_content)
373
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
374
- end
375
-
376
- # Create Result
377
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
378
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
379
- # Deserialize Response
380
- if status_code == 200
381
- begin
382
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
383
- unless parsed_response.nil?
384
- parsed_response = AvailabilitySetListResult.deserialize_object(parsed_response)
385
- end
386
- result.body = parsed_response
387
- rescue Exception => e
388
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
389
- end
390
- end
391
-
392
- result
393
- end
394
-
395
- promise.execute
430
+ def list_available_sizes_with_http_info(resource_group_name, availability_set_name, custom_headers = nil)
431
+ list_available_sizes_async(resource_group_name, availability_set_name, custom_headers).value!
396
432
  end
397
433
 
398
434
  #
399
- # Lists virtual-machine-sizes available to be used for an availability set.
435
+ # Lists all available virtual machine sizes that can be used to create a new
436
+ # virtual machine in an existing availability set.
400
437
  #
401
- # @param next_page_link [String] The NextLink from the previous successful
402
- # call to List operation.
403
- # @param [Hash{String => String}] The hash of custom headers need to be
404
- # applied to HTTP request.
438
+ # @param resource_group_name [String] The name of the resource group.
439
+ # @param availability_set_name [String] The name of the availability set.
440
+ # @param [Hash{String => String}] A hash of custom headers that will be added
441
+ # to the HTTP request.
405
442
  #
406
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
407
- # response.
443
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
408
444
  #
409
- def list_available_sizes_next(next_page_link, custom_headers = nil)
410
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
445
+ def list_available_sizes_async(resource_group_name, availability_set_name, custom_headers = nil)
446
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
447
+ fail ArgumentError, 'availability_set_name is nil' if availability_set_name.nil?
448
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
449
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
411
450
  request_headers = {}
412
451
 
413
452
  # Set Headers
414
453
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
454
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
- path_template = '{nextLink}'
455
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'
417
456
  options = {
418
457
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
419
- skip_encoding_path_params: {'nextLink' => next_page_link},
458
+ path_params: {'resourceGroupName' => resource_group_name,'availabilitySetName' => availability_set_name,'subscriptionId' => @client.subscription_id},
459
+ query_params: {'api-version' => @client.api_version},
420
460
  headers: request_headers.merge(custom_headers || {})
421
461
  }
422
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
462
+
463
+ request_url = @base_url || @client.base_url
464
+
465
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
423
466
  promise = request.run_promise do |req|
424
467
  @client.credentials.sign_request(req) unless @client.credentials.nil?
425
468
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -90,7 +90,7 @@ module Azure::ARM::Compute
90
90
  @virtual_machines = VirtualMachines.new(self)
91
91
  @virtual_machine_scale_sets = VirtualMachineScaleSets.new(self)
92
92
  @virtual_machine_scale_set_vms = VirtualMachineScaleSetVMs.new(self)
93
- @api_version = '2015-06-15'
93
+ @api_version = '2016-03-30'
94
94
  @accept_language = 'en-US'
95
95
  @long_running_operation_retry_timeout = 30
96
96
  @generate_client_request_id = true
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,8 +12,7 @@ module Azure::ARM::Compute
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Gets or sets the relative URL in the previous Service
16
- # Management API's namespace. For Example:
15
+ # @return [String] Gets or sets the ARM resource id in the form of
17
16
  # /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/...
18
17
  attr_accessor :id
19
18
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -19,7 +19,7 @@ module Azure::ARM::Compute
19
19
  attr_accessor :platform_fault_domain_count
20
20
 
21
21
  # @return [Array<SubResource>] Gets or sets a list containing reference
22
- # to all Virtual Machines created under this Availability Set.
22
+ # to all Virtual Machines created under this Availability Set.
23
23
  attr_accessor :virtual_machines
24
24
 
25
25
  # @return [Array<InstanceViewStatus>] Gets or sets the resource status
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,8 +12,8 @@ module Azure::ARM::Compute
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Boolean] Gets or sets whether VM Agent should be provisioned
16
- # on the Virtual Machine.
15
+ # @return [Boolean] Gets or sets whether boot diagnostics should be
16
+ # enabled on the Virtual Machine.
17
17
  attr_accessor :enabled
18
18
 
19
19
  # @return [String] Gets or sets the boot diagnostics storage Uri. It
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5