azure_mgmt_resources 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_resources.gemspec +4 -4
- data/lib/azure_mgmt_resources.rb +3 -73
- data/lib/generated/azure_mgmt_resources.rb +77 -0
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/deployment_operations.rb +39 -15
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/deployments.rb +113 -60
- data/lib/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
- data/lib/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
- data/lib/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
- data/lib/generated/azure_mgmt_resources/models/debug_setting.rb +44 -0
- data/lib/generated/azure_mgmt_resources/models/dependency.rb +82 -0
- data/lib/generated/azure_mgmt_resources/models/deployment.rb +45 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb +93 -0
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/models/deployment_mode.rb +0 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
- data/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
- data/lib/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
- data/lib/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
- data/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
- data/lib/generated/azure_mgmt_resources/models/http_message.rb +44 -0
- data/lib/generated/azure_mgmt_resources/models/identity.rb +68 -0
- data/lib/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
- data/lib/generated/azure_mgmt_resources/models/plan.rb +74 -0
- data/lib/generated/azure_mgmt_resources/models/provider.rb +83 -0
- data/lib/generated/azure_mgmt_resources/models/provider_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb +55 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
- data/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
- data/lib/generated/azure_mgmt_resources/models/resource_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +82 -0
- data/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
- data/lib/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
- data/lib/generated/azure_mgmt_resources/models/sku.rb +94 -0
- data/lib/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
- data/lib/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
- data/lib/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
- data/lib/generated/azure_mgmt_resources/models/tags_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
- data/lib/generated/azure_mgmt_resources/models/template_link.rb +55 -0
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/module_definition.rb +0 -0
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/providers.rb +70 -34
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resource_groups.rb +136 -68
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resource_management_client.rb +8 -12
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resources.rb +88 -43
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/tags.rb +46 -27
- data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/version.rb +1 -1
- metadata +76 -78
- data/lib/azure_mgmt_resources/models/basic_dependency.rb +0 -74
- data/lib/azure_mgmt_resources/models/debug_setting.rb +0 -56
- data/lib/azure_mgmt_resources/models/dependency.rb +0 -103
- data/lib/azure_mgmt_resources/models/deployment.rb +0 -62
- data/lib/azure_mgmt_resources/models/deployment_export_result.rb +0 -56
- data/lib/azure_mgmt_resources/models/deployment_extended.rb +0 -82
- data/lib/azure_mgmt_resources/models/deployment_extended_filter.rb +0 -56
- data/lib/azure_mgmt_resources/models/deployment_list_result.rb +0 -86
- data/lib/azure_mgmt_resources/models/deployment_operation.rb +0 -81
- data/lib/azure_mgmt_resources/models/deployment_operation_properties.rb +0 -141
- data/lib/azure_mgmt_resources/models/deployment_operations_list_result.rb +0 -86
- data/lib/azure_mgmt_resources/models/deployment_properties.rb +0 -131
- data/lib/azure_mgmt_resources/models/deployment_properties_extended.rb +0 -231
- data/lib/azure_mgmt_resources/models/deployment_validate_result.rb +0 -80
- data/lib/azure_mgmt_resources/models/export_template_request.rb +0 -69
- data/lib/azure_mgmt_resources/models/generic_resource.rb +0 -101
- data/lib/azure_mgmt_resources/models/generic_resource_filter.rb +0 -74
- data/lib/azure_mgmt_resources/models/http_message.rb +0 -56
- data/lib/azure_mgmt_resources/models/parameters_link.rb +0 -66
- data/lib/azure_mgmt_resources/models/plan.rb +0 -83
- data/lib/azure_mgmt_resources/models/provider.rb +0 -104
- data/lib/azure_mgmt_resources/models/provider_list_result.rb +0 -85
- data/lib/azure_mgmt_resources/models/provider_resource_type.rb +0 -86
- data/lib/azure_mgmt_resources/models/resource_group.rb +0 -104
- data/lib/azure_mgmt_resources/models/resource_group_export_result.rb +0 -71
- data/lib/azure_mgmt_resources/models/resource_group_filter.rb +0 -65
- data/lib/azure_mgmt_resources/models/resource_group_list_result.rb +0 -87
- data/lib/azure_mgmt_resources/models/resource_group_properties.rb +0 -56
- data/lib/azure_mgmt_resources/models/resource_list_result.rb +0 -87
- data/lib/azure_mgmt_resources/models/resource_management_error_with_details.rb +0 -107
- data/lib/azure_mgmt_resources/models/resource_provider_operation_definition.rb +0 -72
- data/lib/azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb +0 -78
- data/lib/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +0 -93
- data/lib/azure_mgmt_resources/models/resources_move_info.rb +0 -65
- data/lib/azure_mgmt_resources/models/tag_count.rb +0 -65
- data/lib/azure_mgmt_resources/models/tag_details.rb +0 -110
- data/lib/azure_mgmt_resources/models/tag_value.rb +0 -80
- data/lib/azure_mgmt_resources/models/tags_list_result.rb +0 -86
- data/lib/azure_mgmt_resources/models/target_resource.rb +0 -74
- data/lib/azure_mgmt_resources/models/template_link.rb +0 -66
- data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +0 -233
@@ -28,10 +28,24 @@ module Azure::ARM::Resources
|
|
28
28
|
#
|
29
29
|
# @param source_resource_group_name [String] Source resource group name.
|
30
30
|
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
def move_resources(source_resource_group_name, parameters, custom_headers = nil)
|
35
|
+
response = move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
36
|
+
nil
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# @param source_resource_group_name [String] Source resource group name.
|
41
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
31
45
|
# @return [Concurrent::Promise] promise which provides async access to http
|
32
46
|
# response.
|
33
47
|
#
|
34
|
-
def
|
48
|
+
def move_resources_async(source_resource_group_name, parameters, custom_headers = nil)
|
35
49
|
# Send request
|
36
50
|
promise = begin_move_resources_async(source_resource_group_name, parameters, custom_headers)
|
37
51
|
|
@@ -40,8 +54,8 @@ module Azure::ARM::Resources
|
|
40
54
|
deserialize_method = lambda do |parsed_response|
|
41
55
|
end
|
42
56
|
|
43
|
-
|
44
|
-
|
57
|
+
# Waiting for response.
|
58
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
45
59
|
end
|
46
60
|
|
47
61
|
promise
|
@@ -91,21 +105,23 @@ module Azure::ARM::Resources
|
|
91
105
|
def begin_move_resources_async(source_resource_group_name, parameters, custom_headers = nil)
|
92
106
|
fail ArgumentError, 'source_resource_group_name is nil' if source_resource_group_name.nil?
|
93
107
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
94
|
-
parameters.validate unless parameters.nil?
|
95
108
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
96
109
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
110
|
+
|
111
|
+
|
97
112
|
request_headers = {}
|
98
113
|
|
99
114
|
# Set Headers
|
100
115
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
101
116
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
102
117
|
|
103
|
-
# Serialize Request
|
104
118
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
request_content =
|
119
|
+
|
120
|
+
# Serialize Request
|
121
|
+
request_mapper = ResourcesMoveInfo.mapper()
|
122
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
123
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
124
|
+
|
109
125
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'
|
110
126
|
options = {
|
111
127
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -144,22 +160,48 @@ module Azure::ARM::Resources
|
|
144
160
|
# Get all of the resources under a subscription.
|
145
161
|
#
|
146
162
|
# @param filter [String] The filter to apply on the operation.
|
163
|
+
# @param expand [String] The $expand query parameter.
|
147
164
|
# @param top [Integer] Query parameters. If null is passed returns all
|
148
165
|
# resource groups.
|
149
166
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
150
167
|
# will be added to the HTTP request.
|
151
168
|
#
|
152
|
-
# @return [ResourceListResult]
|
169
|
+
# @return [ResourceListResult] which provide lazy access to pages of the
|
170
|
+
# response.
|
153
171
|
#
|
154
|
-
def
|
155
|
-
response = list_async(filter, top, custom_headers).value!
|
156
|
-
|
172
|
+
def list_as_lazy(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
173
|
+
response = list_async(filter, expand, top, custom_headers).value!
|
174
|
+
unless response.nil?
|
175
|
+
page = response.body
|
176
|
+
page.next_method = Proc.new do |next_link|
|
177
|
+
list_next_async(next_link, custom_headers)
|
178
|
+
end
|
179
|
+
page
|
180
|
+
end
|
157
181
|
end
|
158
182
|
|
159
183
|
#
|
160
184
|
# Get all of the resources under a subscription.
|
161
185
|
#
|
162
186
|
# @param filter [String] The filter to apply on the operation.
|
187
|
+
# @param expand [String] The $expand query parameter.
|
188
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
189
|
+
# resource groups.
|
190
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
191
|
+
# will be added to the HTTP request.
|
192
|
+
#
|
193
|
+
# @return [Array<GenericResource>] operation results.
|
194
|
+
#
|
195
|
+
def list(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
196
|
+
first_page = list_as_lazy(filter, expand, top, custom_headers)
|
197
|
+
first_page.get_all_items
|
198
|
+
end
|
199
|
+
|
200
|
+
#
|
201
|
+
# Get all of the resources under a subscription.
|
202
|
+
#
|
203
|
+
# @param filter [String] The filter to apply on the operation.
|
204
|
+
# @param expand [String] The $expand query parameter.
|
163
205
|
# @param top [Integer] Query parameters. If null is passed returns all
|
164
206
|
# resource groups.
|
165
207
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -167,14 +209,15 @@ module Azure::ARM::Resources
|
|
167
209
|
#
|
168
210
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
169
211
|
#
|
170
|
-
def list_with_http_info(filter = nil, top = nil, custom_headers = nil)
|
171
|
-
list_async(filter, top, custom_headers).value!
|
212
|
+
def list_with_http_info(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
213
|
+
list_async(filter, expand, top, custom_headers).value!
|
172
214
|
end
|
173
215
|
|
174
216
|
#
|
175
217
|
# Get all of the resources under a subscription.
|
176
218
|
#
|
177
219
|
# @param filter [String] The filter to apply on the operation.
|
220
|
+
# @param expand [String] The $expand query parameter.
|
178
221
|
# @param top [Integer] Query parameters. If null is passed returns all
|
179
222
|
# resource groups.
|
180
223
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -182,9 +225,11 @@ module Azure::ARM::Resources
|
|
182
225
|
#
|
183
226
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
184
227
|
#
|
185
|
-
def list_async(filter = nil, top = nil, custom_headers = nil)
|
228
|
+
def list_async(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
186
229
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
187
230
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
231
|
+
|
232
|
+
|
188
233
|
request_headers = {}
|
189
234
|
|
190
235
|
# Set Headers
|
@@ -194,7 +239,7 @@ module Azure::ARM::Resources
|
|
194
239
|
options = {
|
195
240
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
196
241
|
path_params: {'subscriptionId' => @client.subscription_id},
|
197
|
-
query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
|
242
|
+
query_params: {'$filter' => filter,'$expand' => expand,'$top' => top,'api-version' => @client.api_version},
|
198
243
|
headers: request_headers.merge(custom_headers || {})
|
199
244
|
}
|
200
245
|
|
@@ -220,10 +265,8 @@ module Azure::ARM::Resources
|
|
220
265
|
if status_code == 200
|
221
266
|
begin
|
222
267
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
223
|
-
|
224
|
-
|
225
|
-
end
|
226
|
-
result.body = parsed_response
|
268
|
+
result_mapper = ResourceListResult.mapper()
|
269
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
227
270
|
rescue Exception => e
|
228
271
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
229
272
|
end
|
@@ -297,6 +340,8 @@ module Azure::ARM::Resources
|
|
297
340
|
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
298
341
|
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
299
342
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
343
|
+
|
344
|
+
|
300
345
|
request_headers = {}
|
301
346
|
|
302
347
|
# Set Headers
|
@@ -398,6 +443,8 @@ module Azure::ARM::Resources
|
|
398
443
|
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
399
444
|
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
400
445
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
446
|
+
|
447
|
+
|
401
448
|
request_headers = {}
|
402
449
|
|
403
450
|
# Set Headers
|
@@ -502,20 +549,22 @@ module Azure::ARM::Resources
|
|
502
549
|
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
503
550
|
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
504
551
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
505
|
-
parameters.validate unless parameters.nil?
|
506
552
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
553
|
+
|
554
|
+
|
507
555
|
request_headers = {}
|
508
556
|
|
509
557
|
# Set Headers
|
510
558
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
511
559
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
512
560
|
|
513
|
-
# Serialize Request
|
514
561
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
request_content =
|
562
|
+
|
563
|
+
# Serialize Request
|
564
|
+
request_mapper = GenericResource.mapper()
|
565
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
566
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
567
|
+
|
519
568
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
520
569
|
options = {
|
521
570
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -548,10 +597,8 @@ module Azure::ARM::Resources
|
|
548
597
|
if status_code == 201
|
549
598
|
begin
|
550
599
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
551
|
-
|
552
|
-
|
553
|
-
end
|
554
|
-
result.body = parsed_response
|
600
|
+
result_mapper = GenericResource.mapper()
|
601
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
555
602
|
rescue Exception => e
|
556
603
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
557
604
|
end
|
@@ -560,10 +607,8 @@ module Azure::ARM::Resources
|
|
560
607
|
if status_code == 200
|
561
608
|
begin
|
562
609
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
563
|
-
|
564
|
-
|
565
|
-
end
|
566
|
-
result.body = parsed_response
|
610
|
+
result_mapper = GenericResource.mapper()
|
611
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
567
612
|
rescue Exception => e
|
568
613
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
569
614
|
end
|
@@ -637,6 +682,8 @@ module Azure::ARM::Resources
|
|
637
682
|
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
638
683
|
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
639
684
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
685
|
+
|
686
|
+
|
640
687
|
request_headers = {}
|
641
688
|
|
642
689
|
# Set Headers
|
@@ -673,10 +720,8 @@ module Azure::ARM::Resources
|
|
673
720
|
if status_code == 200
|
674
721
|
begin
|
675
722
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
676
|
-
|
677
|
-
|
678
|
-
end
|
679
|
-
result.body = parsed_response
|
723
|
+
result_mapper = GenericResource.mapper()
|
724
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
680
725
|
rescue Exception => e
|
681
726
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
682
727
|
end
|
@@ -729,6 +774,8 @@ module Azure::ARM::Resources
|
|
729
774
|
#
|
730
775
|
def list_next_async(next_page_link, custom_headers = nil)
|
731
776
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
777
|
+
|
778
|
+
|
732
779
|
request_headers = {}
|
733
780
|
|
734
781
|
# Set Headers
|
@@ -763,10 +810,8 @@ module Azure::ARM::Resources
|
|
763
810
|
if status_code == 200
|
764
811
|
begin
|
765
812
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
766
|
-
|
767
|
-
|
768
|
-
end
|
769
|
-
result.body = parsed_response
|
813
|
+
result_mapper = ResourceListResult.mapper()
|
814
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
770
815
|
rescue Exception => e
|
771
816
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
772
817
|
end
|
@@ -65,6 +65,8 @@ module Azure::ARM::Resources
|
|
65
65
|
fail ArgumentError, 'tag_value is nil' if tag_value.nil?
|
66
66
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
67
67
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
|
69
|
+
|
68
70
|
request_headers = {}
|
69
71
|
|
70
72
|
# Set Headers
|
@@ -147,6 +149,8 @@ module Azure::ARM::Resources
|
|
147
149
|
fail ArgumentError, 'tag_value is nil' if tag_value.nil?
|
148
150
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
149
151
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
152
|
+
|
153
|
+
|
150
154
|
request_headers = {}
|
151
155
|
|
152
156
|
# Set Headers
|
@@ -182,10 +186,8 @@ module Azure::ARM::Resources
|
|
182
186
|
if status_code == 200
|
183
187
|
begin
|
184
188
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
-
|
186
|
-
|
187
|
-
end
|
188
|
-
result.body = parsed_response
|
189
|
+
result_mapper = TagValue.mapper()
|
190
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
189
191
|
rescue Exception => e
|
190
192
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
191
193
|
end
|
@@ -194,10 +196,8 @@ module Azure::ARM::Resources
|
|
194
196
|
if status_code == 201
|
195
197
|
begin
|
196
198
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
197
|
-
|
198
|
-
|
199
|
-
end
|
200
|
-
result.body = parsed_response
|
199
|
+
result_mapper = TagValue.mapper()
|
200
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
201
201
|
rescue Exception => e
|
202
202
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
203
203
|
end
|
@@ -249,6 +249,8 @@ module Azure::ARM::Resources
|
|
249
249
|
fail ArgumentError, 'tag_name is nil' if tag_name.nil?
|
250
250
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
251
251
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
252
|
+
|
253
|
+
|
252
254
|
request_headers = {}
|
253
255
|
|
254
256
|
# Set Headers
|
@@ -284,10 +286,8 @@ module Azure::ARM::Resources
|
|
284
286
|
if status_code == 200
|
285
287
|
begin
|
286
288
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
287
|
-
|
288
|
-
|
289
|
-
end
|
290
|
-
result.body = parsed_response
|
289
|
+
result_mapper = TagDetails.mapper()
|
290
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
291
291
|
rescue Exception => e
|
292
292
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
293
293
|
end
|
@@ -296,10 +296,8 @@ module Azure::ARM::Resources
|
|
296
296
|
if status_code == 201
|
297
297
|
begin
|
298
298
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
299
|
-
|
300
|
-
|
301
|
-
end
|
302
|
-
result.body = parsed_response
|
299
|
+
result_mapper = TagDetails.mapper()
|
300
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
303
301
|
rescue Exception => e
|
304
302
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
305
303
|
end
|
@@ -350,6 +348,8 @@ module Azure::ARM::Resources
|
|
350
348
|
fail ArgumentError, 'tag_name is nil' if tag_name.nil?
|
351
349
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
352
350
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
351
|
+
|
352
|
+
|
353
353
|
request_headers = {}
|
354
354
|
|
355
355
|
# Set Headers
|
@@ -394,11 +394,30 @@ module Azure::ARM::Resources
|
|
394
394
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
395
395
|
# will be added to the HTTP request.
|
396
396
|
#
|
397
|
-
# @return [TagsListResult]
|
397
|
+
# @return [TagsListResult] which provide lazy access to pages of the response.
|
398
398
|
#
|
399
|
-
def
|
399
|
+
def list_as_lazy(custom_headers = nil)
|
400
400
|
response = list_async(custom_headers).value!
|
401
|
-
|
401
|
+
unless response.nil?
|
402
|
+
page = response.body
|
403
|
+
page.next_method = Proc.new do |next_link|
|
404
|
+
list_next_async(next_link, custom_headers)
|
405
|
+
end
|
406
|
+
page
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
#
|
411
|
+
# Get a list of subscription resource tags.
|
412
|
+
#
|
413
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
414
|
+
# will be added to the HTTP request.
|
415
|
+
#
|
416
|
+
# @return [Array<TagDetails>] operation results.
|
417
|
+
#
|
418
|
+
def list(custom_headers = nil)
|
419
|
+
first_page = list_as_lazy(custom_headers)
|
420
|
+
first_page.get_all_items
|
402
421
|
end
|
403
422
|
|
404
423
|
#
|
@@ -424,6 +443,8 @@ module Azure::ARM::Resources
|
|
424
443
|
def list_async(custom_headers = nil)
|
425
444
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
426
445
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
446
|
+
|
447
|
+
|
427
448
|
request_headers = {}
|
428
449
|
|
429
450
|
# Set Headers
|
@@ -459,10 +480,8 @@ module Azure::ARM::Resources
|
|
459
480
|
if status_code == 200
|
460
481
|
begin
|
461
482
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
462
|
-
|
463
|
-
|
464
|
-
end
|
465
|
-
result.body = parsed_response
|
483
|
+
result_mapper = TagsListResult.mapper()
|
484
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
466
485
|
rescue Exception => e
|
467
486
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
468
487
|
end
|
@@ -515,6 +534,8 @@ module Azure::ARM::Resources
|
|
515
534
|
#
|
516
535
|
def list_next_async(next_page_link, custom_headers = nil)
|
517
536
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
537
|
+
|
538
|
+
|
518
539
|
request_headers = {}
|
519
540
|
|
520
541
|
# Set Headers
|
@@ -549,10 +570,8 @@ module Azure::ARM::Resources
|
|
549
570
|
if status_code == 200
|
550
571
|
begin
|
551
572
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
552
|
-
|
553
|
-
|
554
|
-
end
|
555
|
-
result.body = parsed_response
|
573
|
+
result_mapper = TagsListResult.mapper()
|
574
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
556
575
|
rescue Exception => e
|
557
576
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
558
577
|
end
|
metadata
CHANGED
@@ -1,155 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
MC4zLjE=
|
4
|
+
version: 0.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Microsoft Corporation
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2016-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
|
-
- - ~>
|
17
|
+
- - "~>"
|
19
18
|
- !ruby/object:Gem::Version
|
20
19
|
version: '1.9'
|
21
20
|
type: :development
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
|
-
- - ~>
|
24
|
+
- - "~>"
|
26
25
|
- !ruby/object:Gem::Version
|
27
26
|
version: '1.9'
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
28
|
name: rake
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
32
|
-
- - ~>
|
31
|
+
- - "~>"
|
33
32
|
- !ruby/object:Gem::Version
|
34
33
|
version: '10'
|
35
34
|
type: :development
|
36
35
|
prerelease: false
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
38
37
|
requirements:
|
39
|
-
- - ~>
|
38
|
+
- - "~>"
|
40
39
|
- !ruby/object:Gem::Version
|
41
40
|
version: '10'
|
42
41
|
- !ruby/object:Gem::Dependency
|
43
42
|
name: rspec
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
45
44
|
requirements:
|
46
|
-
- - ~>
|
45
|
+
- - "~>"
|
47
46
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
49
|
-
Mw==
|
47
|
+
version: '3'
|
50
48
|
type: :development
|
51
49
|
prerelease: false
|
52
50
|
version_requirements: !ruby/object:Gem::Requirement
|
53
51
|
requirements:
|
54
|
-
- - ~>
|
52
|
+
- - "~>"
|
55
53
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
57
|
-
Mw==
|
54
|
+
version: '3'
|
58
55
|
- !ruby/object:Gem::Dependency
|
59
56
|
name: dotenv
|
60
57
|
requirement: !ruby/object:Gem::Requirement
|
61
58
|
requirements:
|
62
|
-
- - ~>
|
59
|
+
- - "~>"
|
63
60
|
- !ruby/object:Gem::Version
|
64
61
|
version: '2'
|
65
62
|
type: :development
|
66
63
|
prerelease: false
|
67
64
|
version_requirements: !ruby/object:Gem::Requirement
|
68
65
|
requirements:
|
69
|
-
- - ~>
|
66
|
+
- - "~>"
|
70
67
|
- !ruby/object:Gem::Version
|
71
68
|
version: '2'
|
72
69
|
- !ruby/object:Gem::Dependency
|
73
70
|
name: ms_rest_azure
|
74
71
|
requirement: !ruby/object:Gem::Requirement
|
75
72
|
requirements:
|
76
|
-
- - ~>
|
73
|
+
- - "~>"
|
77
74
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
79
|
-
MC4yLjM=
|
75
|
+
version: 0.3.0
|
80
76
|
type: :runtime
|
81
77
|
prerelease: false
|
82
78
|
version_requirements: !ruby/object:Gem::Requirement
|
83
79
|
requirements:
|
84
|
-
- - ~>
|
80
|
+
- - "~>"
|
85
81
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
87
|
-
MC4yLjM=
|
82
|
+
version: 0.3.0
|
88
83
|
description: Microsoft Azure Resource Management Client Library for Ruby
|
89
84
|
email: azrubyteam@microsoft.com
|
90
85
|
executables: []
|
91
86
|
extensions: []
|
92
87
|
extra_rdoc_files: []
|
93
88
|
files:
|
94
|
-
- .gitignore
|
95
|
-
- .rspec
|
89
|
+
- ".gitignore"
|
90
|
+
- ".rspec"
|
96
91
|
- LICENSE.txt
|
97
92
|
- README.md
|
98
93
|
- Rakefile
|
99
94
|
- azure_mgmt_resources.gemspec
|
100
95
|
- lib/azure_mgmt_resources.rb
|
101
|
-
- lib/azure_mgmt_resources
|
102
|
-
- lib/azure_mgmt_resources/
|
103
|
-
- lib/azure_mgmt_resources/
|
104
|
-
- lib/azure_mgmt_resources/models/
|
105
|
-
- lib/azure_mgmt_resources/models/
|
106
|
-
- lib/azure_mgmt_resources/models/
|
107
|
-
- lib/azure_mgmt_resources/models/
|
108
|
-
- lib/azure_mgmt_resources/models/
|
109
|
-
- lib/azure_mgmt_resources/models/
|
110
|
-
- lib/azure_mgmt_resources/models/
|
111
|
-
- lib/azure_mgmt_resources/models/
|
112
|
-
- lib/azure_mgmt_resources/models/
|
113
|
-
- lib/azure_mgmt_resources/models/
|
114
|
-
- lib/azure_mgmt_resources/models/
|
115
|
-
- lib/azure_mgmt_resources/models/
|
116
|
-
- lib/azure_mgmt_resources/models/
|
117
|
-
- lib/azure_mgmt_resources/models/
|
118
|
-
- lib/azure_mgmt_resources/models/
|
119
|
-
- lib/azure_mgmt_resources/models/
|
120
|
-
- lib/azure_mgmt_resources/models/
|
121
|
-
- lib/azure_mgmt_resources/models/
|
122
|
-
- lib/azure_mgmt_resources/models/
|
123
|
-
- lib/azure_mgmt_resources/models/
|
124
|
-
- lib/azure_mgmt_resources/models/
|
125
|
-
- lib/azure_mgmt_resources/models/
|
126
|
-
- lib/azure_mgmt_resources/models/
|
127
|
-
- lib/azure_mgmt_resources/models/
|
128
|
-
- lib/azure_mgmt_resources/models/
|
129
|
-
- lib/azure_mgmt_resources/models/
|
130
|
-
- lib/azure_mgmt_resources/models/
|
131
|
-
- lib/azure_mgmt_resources/models/
|
132
|
-
- lib/azure_mgmt_resources/models/
|
133
|
-
- lib/azure_mgmt_resources/models/
|
134
|
-
- lib/azure_mgmt_resources/models/
|
135
|
-
- lib/azure_mgmt_resources/models/
|
136
|
-
- lib/azure_mgmt_resources/models/
|
137
|
-
- lib/azure_mgmt_resources/models/
|
138
|
-
- lib/azure_mgmt_resources/models/
|
139
|
-
- lib/azure_mgmt_resources/models/
|
140
|
-
- lib/azure_mgmt_resources/models/
|
141
|
-
- lib/azure_mgmt_resources/models/
|
142
|
-
- lib/azure_mgmt_resources/models/
|
143
|
-
- lib/azure_mgmt_resources/models/
|
144
|
-
- lib/azure_mgmt_resources/
|
145
|
-
- lib/azure_mgmt_resources/
|
146
|
-
- lib/azure_mgmt_resources/
|
147
|
-
- lib/azure_mgmt_resources/
|
148
|
-
- lib/azure_mgmt_resources/
|
149
|
-
- lib/azure_mgmt_resources/
|
150
|
-
- lib/azure_mgmt_resources/
|
151
|
-
- lib/azure_mgmt_resources/
|
152
|
-
|
96
|
+
- lib/generated/azure_mgmt_resources.rb
|
97
|
+
- lib/generated/azure_mgmt_resources/deployment_operations.rb
|
98
|
+
- lib/generated/azure_mgmt_resources/deployments.rb
|
99
|
+
- lib/generated/azure_mgmt_resources/models/alias_path_type.rb
|
100
|
+
- lib/generated/azure_mgmt_resources/models/alias_type.rb
|
101
|
+
- lib/generated/azure_mgmt_resources/models/basic_dependency.rb
|
102
|
+
- lib/generated/azure_mgmt_resources/models/debug_setting.rb
|
103
|
+
- lib/generated/azure_mgmt_resources/models/dependency.rb
|
104
|
+
- lib/generated/azure_mgmt_resources/models/deployment.rb
|
105
|
+
- lib/generated/azure_mgmt_resources/models/deployment_export_result.rb
|
106
|
+
- lib/generated/azure_mgmt_resources/models/deployment_extended.rb
|
107
|
+
- lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb
|
108
|
+
- lib/generated/azure_mgmt_resources/models/deployment_list_result.rb
|
109
|
+
- lib/generated/azure_mgmt_resources/models/deployment_mode.rb
|
110
|
+
- lib/generated/azure_mgmt_resources/models/deployment_operation.rb
|
111
|
+
- lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb
|
112
|
+
- lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb
|
113
|
+
- lib/generated/azure_mgmt_resources/models/deployment_properties.rb
|
114
|
+
- lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb
|
115
|
+
- lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb
|
116
|
+
- lib/generated/azure_mgmt_resources/models/export_template_request.rb
|
117
|
+
- lib/generated/azure_mgmt_resources/models/generic_resource.rb
|
118
|
+
- lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb
|
119
|
+
- lib/generated/azure_mgmt_resources/models/http_message.rb
|
120
|
+
- lib/generated/azure_mgmt_resources/models/identity.rb
|
121
|
+
- lib/generated/azure_mgmt_resources/models/parameters_link.rb
|
122
|
+
- lib/generated/azure_mgmt_resources/models/plan.rb
|
123
|
+
- lib/generated/azure_mgmt_resources/models/provider.rb
|
124
|
+
- lib/generated/azure_mgmt_resources/models/provider_list_result.rb
|
125
|
+
- lib/generated/azure_mgmt_resources/models/provider_resource_type.rb
|
126
|
+
- lib/generated/azure_mgmt_resources/models/resource_group.rb
|
127
|
+
- lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb
|
128
|
+
- lib/generated/azure_mgmt_resources/models/resource_group_filter.rb
|
129
|
+
- lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb
|
130
|
+
- lib/generated/azure_mgmt_resources/models/resource_group_properties.rb
|
131
|
+
- lib/generated/azure_mgmt_resources/models/resource_identity_type.rb
|
132
|
+
- lib/generated/azure_mgmt_resources/models/resource_list_result.rb
|
133
|
+
- lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb
|
134
|
+
- lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb
|
135
|
+
- lib/generated/azure_mgmt_resources/models/resources_move_info.rb
|
136
|
+
- lib/generated/azure_mgmt_resources/models/sku.rb
|
137
|
+
- lib/generated/azure_mgmt_resources/models/tag_count.rb
|
138
|
+
- lib/generated/azure_mgmt_resources/models/tag_details.rb
|
139
|
+
- lib/generated/azure_mgmt_resources/models/tag_value.rb
|
140
|
+
- lib/generated/azure_mgmt_resources/models/tags_list_result.rb
|
141
|
+
- lib/generated/azure_mgmt_resources/models/target_resource.rb
|
142
|
+
- lib/generated/azure_mgmt_resources/models/template_link.rb
|
143
|
+
- lib/generated/azure_mgmt_resources/module_definition.rb
|
144
|
+
- lib/generated/azure_mgmt_resources/providers.rb
|
145
|
+
- lib/generated/azure_mgmt_resources/resource_groups.rb
|
146
|
+
- lib/generated/azure_mgmt_resources/resource_management_client.rb
|
147
|
+
- lib/generated/azure_mgmt_resources/resources.rb
|
148
|
+
- lib/generated/azure_mgmt_resources/tags.rb
|
149
|
+
- lib/generated/azure_mgmt_resources/version.rb
|
150
|
+
homepage: https://aka.ms/azure-sdk-for-ruby
|
153
151
|
licenses:
|
154
152
|
- MIT
|
155
153
|
metadata: {}
|
@@ -159,17 +157,17 @@ require_paths:
|
|
159
157
|
- lib
|
160
158
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
159
|
requirements:
|
162
|
-
- -
|
160
|
+
- - ">="
|
163
161
|
- !ruby/object:Gem::Version
|
164
162
|
version: 1.9.3
|
165
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
164
|
requirements:
|
167
|
-
- -
|
165
|
+
- - ">="
|
168
166
|
- !ruby/object:Gem::Version
|
169
167
|
version: '0'
|
170
168
|
requirements: []
|
171
169
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.4.
|
170
|
+
rubygems_version: 2.4.6
|
173
171
|
signing_key:
|
174
172
|
specification_version: 4
|
175
173
|
summary: Official ruby client library to consume Microsoft Azure Resource Management
|