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.
- checksums.yaml +13 -5
- data/README.md +1 -27
- data/azure_mgmt_compute.gemspec +1 -1
- data/lib/azure_mgmt_compute/availability_sets.rb +184 -141
- data/lib/azure_mgmt_compute/compute_management_client.rb +2 -2
- data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
- data/lib/azure_mgmt_compute/models/api_entity_reference.rb +2 -3
- data/lib/azure_mgmt_compute/models/api_error.rb +1 -1
- data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -1
- data/lib/azure_mgmt_compute/models/availability_set.rb +1 -1
- data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/availability_set_properties.rb +2 -2
- data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +3 -3
- data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/data_disk.rb +1 -1
- data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -1
- data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +11 -2
- data/lib/azure_mgmt_compute/models/disk_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/hardware_profile.rb +9 -6
- data/lib/azure_mgmt_compute/models/image_reference.rb +1 -1
- data/lib/azure_mgmt_compute/models/inner_error.rb +1 -1
- data/lib/azure_mgmt_compute/models/instance_view_status.rb +4 -4
- data/lib/azure_mgmt_compute/models/instance_view_types.rb +15 -0
- data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +1 -1
- data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +1 -1
- data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -1
- data/lib/azure_mgmt_compute/models/list_usages_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -1
- data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/network_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/osdisk.rb +1 -1
- data/lib/azure_mgmt_compute/models/osdisk_image.rb +1 -1
- data/lib/azure_mgmt_compute/models/osprofile.rb +1 -1
- data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/plan.rb +1 -1
- data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/purchase_plan.rb +1 -1
- data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/sku.rb +1 -1
- data/lib/azure_mgmt_compute/models/ssh_configuration.rb +1 -1
- data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
- data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/storage_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
- data/lib/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
- data/lib/azure_mgmt_compute/models/usage.rb +1 -1
- data/lib/azure_mgmt_compute/models/usage_name.rb +1 -1
- data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -1
- data/lib/azure_mgmt_compute/models/vault_secret_group.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +20 -27
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -11
- data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +8 -21
- data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +10 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +43 -12
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +11 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +1 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +12 -1
- data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
- data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +1 -1
- data/lib/azure_mgmt_compute/models/win_rmlistener.rb +1 -1
- data/lib/azure_mgmt_compute/models/windows_configuration.rb +1 -1
- data/lib/azure_mgmt_compute/module_definition.rb +1 -1
- data/lib/azure_mgmt_compute/usage_operations.rb +71 -11
- data/lib/azure_mgmt_compute/version.rb +2 -2
- data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +123 -18
- data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +132 -22
- data/lib/azure_mgmt_compute/virtual_machine_images.rb +197 -26
- data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +419 -79
- data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +736 -147
- data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +36 -64
- data/lib/azure_mgmt_compute/virtual_machines.rb +531 -200
- data/lib/azure_mgmt_compute.rb +3 -6
- metadata +26 -24
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +0 -123
- data/lib/azure_mgmt_compute/models/compute_operation_status.rb +0 -18
- data/lib/azure_mgmt_compute/models/delete_operation_result.rb +0 -110
- data/lib/azure_mgmt_compute/models/operation_status.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YjZhNGZiZjkxZDRiZGNhMzIxODBmZGJkYmU4NjA4NWI0NmZhYjZiMA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZDAxNjY2N2Y4ZmFhYzgwMDU4YmYxNTFmNzA0M2M5NjBkYjMwNDhhMQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
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.
|
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.
|
data/azure_mgmt_compute.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 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}]
|
34
|
-
#
|
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 [
|
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
|
-
|
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}]
|
107
|
-
#
|
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
|
-
|
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}]
|
158
|
-
#
|
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 [
|
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
|
-
|
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}]
|
220
|
-
#
|
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 [
|
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
|
-
|
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
|
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}]
|
282
|
-
#
|
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 [
|
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
|
-
|
289
|
-
|
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
|
-
#
|
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
|
343
|
-
#
|
344
|
-
# @param [Hash{String => String}]
|
345
|
-
#
|
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 [
|
348
|
-
# response.
|
428
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
349
429
|
#
|
350
|
-
def
|
351
|
-
|
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
|
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
|
402
|
-
#
|
403
|
-
# @param [Hash{String => String}]
|
404
|
-
#
|
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
|
407
|
-
# response.
|
443
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
408
444
|
#
|
409
|
-
def
|
410
|
-
fail ArgumentError, '
|
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 = '{
|
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
|
-
|
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
|
-
|
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.
|
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 = '
|
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.
|
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
|
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.
|
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
|
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.
|
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
|
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
|