azure_mgmt_resources 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2016-02-01/generated/azure_mgmt_resources/deployment_operations.rb +21 -18
- data/lib/2016-02-01/generated/azure_mgmt_resources/deployments.rb +65 -60
- data/lib/2016-02-01/generated/azure_mgmt_resources/providers.rb +33 -28
- data/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb +70 -66
- data/lib/2016-02-01/generated/azure_mgmt_resources/resource_management_client.rb +4 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb +233 -46
- data/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb +39 -33
- data/lib/2016-07-01/generated/azure_mgmt_resources/deployment_operations.rb +21 -18
- data/lib/2016-07-01/generated/azure_mgmt_resources/deployments.rb +65 -60
- data/lib/2016-07-01/generated/azure_mgmt_resources/providers.rb +33 -28
- data/lib/2016-07-01/generated/azure_mgmt_resources/resource_groups.rb +70 -66
- data/lib/2016-07-01/generated/azure_mgmt_resources/resource_management_client.rb +4 -1
- data/lib/2016-07-01/generated/azure_mgmt_resources/resources.rb +233 -46
- data/lib/2016-07-01/generated/azure_mgmt_resources/tags.rb +39 -33
- data/lib/2016-09-01/generated/azure_mgmt_resources/deployment_operations.rb +21 -18
- data/lib/2016-09-01/generated/azure_mgmt_resources/deployments.rb +65 -60
- data/lib/2016-09-01/generated/azure_mgmt_resources/providers.rb +33 -28
- data/lib/2016-09-01/generated/azure_mgmt_resources/resource_groups.rb +70 -66
- data/lib/2016-09-01/generated/azure_mgmt_resources/resource_management_client.rb +4 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/resources.rb +428 -84
- data/lib/2016-09-01/generated/azure_mgmt_resources/tags.rb +39 -33
- data/lib/2017-05-10/generated/azure_mgmt_resources/deployment_operations.rb +21 -18
- data/lib/2017-05-10/generated/azure_mgmt_resources/deployments.rb +65 -60
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/plan.rb +11 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/providers.rb +33 -28
- data/lib/2017-05-10/generated/azure_mgmt_resources/resource_groups.rb +55 -53
- data/lib/2017-05-10/generated/azure_mgmt_resources/resource_management_client.rb +4 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/resources.rb +453 -108
- data/lib/2017-05-10/generated/azure_mgmt_resources/tags.rb +39 -33
- data/lib/profiles/latest/modules/resources_profile_module.rb +174 -155
- data/lib/profiles/latest/resources_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/resources_module_definition.rb +0 -1
- data/lib/profiles/v2017_03_09/modules/resources_profile_module.rb +171 -152
- data/lib/profiles/v2017_03_09/resources_module_definition.rb +0 -1
- data/lib/profiles/v2017_03_09/resources_v2017_03_09_profile_client.rb +28 -9
- data/lib/version.rb +1 -1
- metadata +3 -3
@@ -126,6 +126,9 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
126
126
|
fail ArgumentError, 'path is nil' if path.nil?
|
127
127
|
|
128
128
|
request_url = options[:base_url] || @base_url
|
129
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
130
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
131
|
+
end
|
129
132
|
|
130
133
|
request_headers = @request_headers
|
131
134
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -142,7 +145,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
142
145
|
#
|
143
146
|
def add_telemetry
|
144
147
|
sdk_information = 'azure_mgmt_resources'
|
145
|
-
sdk_information = "#{sdk_information}/0.
|
148
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
146
149
|
add_user_agent_information(sdk_information)
|
147
150
|
end
|
148
151
|
end
|
@@ -30,8 +30,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
30
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
31
|
# will be added to the HTTP request.
|
32
32
|
#
|
33
|
-
def move_resources(source_resource_group_name, parameters, custom_headers
|
34
|
-
response = move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
33
|
+
def move_resources(source_resource_group_name, parameters, custom_headers:nil)
|
34
|
+
response = move_resources_async(source_resource_group_name, parameters, custom_headers:custom_headers).value!
|
35
35
|
nil
|
36
36
|
end
|
37
37
|
|
@@ -44,9 +44,9 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
44
44
|
# @return [Concurrent::Promise] promise which provides async access to http
|
45
45
|
# response.
|
46
46
|
#
|
47
|
-
def move_resources_async(source_resource_group_name, parameters, custom_headers
|
47
|
+
def move_resources_async(source_resource_group_name, parameters, custom_headers:nil)
|
48
48
|
# Send request
|
49
|
-
promise = begin_move_resources_async(source_resource_group_name, parameters, custom_headers)
|
49
|
+
promise = begin_move_resources_async(source_resource_group_name, parameters, custom_headers:custom_headers)
|
50
50
|
|
51
51
|
promise = promise.then do |response|
|
52
52
|
# Defining deserialization method.
|
@@ -72,8 +72,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
72
72
|
#
|
73
73
|
# @return [Array<GenericResource>] operation results.
|
74
74
|
#
|
75
|
-
def list(filter
|
76
|
-
first_page = list_as_lazy(filter, expand, top, custom_headers)
|
75
|
+
def list(filter:nil, expand:nil, top:nil, custom_headers:nil)
|
76
|
+
first_page = list_as_lazy(filter:filter, expand:expand, top:top, custom_headers:custom_headers)
|
77
77
|
first_page.get_all_items
|
78
78
|
end
|
79
79
|
|
@@ -89,8 +89,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
89
89
|
#
|
90
90
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
91
91
|
#
|
92
|
-
def list_with_http_info(filter
|
93
|
-
list_async(filter, expand, top, custom_headers).value!
|
92
|
+
def list_with_http_info(filter:nil, expand:nil, top:nil, custom_headers:nil)
|
93
|
+
list_async(filter:filter, expand:expand, top:top, custom_headers:custom_headers).value!
|
94
94
|
end
|
95
95
|
|
96
96
|
#
|
@@ -105,12 +105,13 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
105
105
|
#
|
106
106
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
107
107
|
#
|
108
|
-
def list_async(filter
|
108
|
+
def list_async(filter:nil, expand:nil, top:nil, custom_headers:nil)
|
109
109
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
110
110
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
111
111
|
|
112
112
|
|
113
113
|
request_headers = {}
|
114
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
114
115
|
|
115
116
|
# Set Headers
|
116
117
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -170,8 +171,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
170
171
|
#
|
171
172
|
# @return [Boolean] operation results.
|
172
173
|
#
|
173
|
-
def check_existence(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
174
|
-
response = check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
174
|
+
def check_existence(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
175
|
+
response = check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
175
176
|
response.body unless response.nil?
|
176
177
|
end
|
177
178
|
|
@@ -190,8 +191,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
190
191
|
#
|
191
192
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
192
193
|
#
|
193
|
-
def check_existence_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
194
|
-
check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
194
|
+
def check_existence_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
195
|
+
check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
195
196
|
end
|
196
197
|
|
197
198
|
#
|
@@ -209,7 +210,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
209
210
|
#
|
210
211
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
211
212
|
#
|
212
|
-
def check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
213
|
+
def check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
213
214
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
214
215
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
215
216
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -223,6 +224,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
223
224
|
|
224
225
|
|
225
226
|
request_headers = {}
|
227
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
226
228
|
|
227
229
|
# Set Headers
|
228
230
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -273,8 +275,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
273
275
|
# will be added to the HTTP request.
|
274
276
|
#
|
275
277
|
#
|
276
|
-
def delete(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
277
|
-
response = delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
278
|
+
def delete(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
279
|
+
response = delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
278
280
|
nil
|
279
281
|
end
|
280
282
|
|
@@ -293,8 +295,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
293
295
|
#
|
294
296
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
295
297
|
#
|
296
|
-
def delete_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
297
|
-
delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
298
|
+
def delete_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
299
|
+
delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
298
300
|
end
|
299
301
|
|
300
302
|
#
|
@@ -312,7 +314,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
312
314
|
#
|
313
315
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
314
316
|
#
|
315
|
-
def delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
317
|
+
def delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
316
318
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
317
319
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
318
320
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -326,6 +328,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
326
328
|
|
327
329
|
|
328
330
|
request_headers = {}
|
331
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
329
332
|
|
330
333
|
# Set Headers
|
331
334
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -377,8 +380,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
377
380
|
#
|
378
381
|
# @return [GenericResource] operation results.
|
379
382
|
#
|
380
|
-
def create_or_update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers
|
381
|
-
response = create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers).value!
|
383
|
+
def create_or_update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
384
|
+
response = create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
|
382
385
|
response.body unless response.nil?
|
383
386
|
end
|
384
387
|
|
@@ -398,8 +401,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
398
401
|
#
|
399
402
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
400
403
|
#
|
401
|
-
def create_or_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers
|
402
|
-
create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers).value!
|
404
|
+
def create_or_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
405
|
+
create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
|
403
406
|
end
|
404
407
|
|
405
408
|
#
|
@@ -418,7 +421,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
418
421
|
#
|
419
422
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
420
423
|
#
|
421
|
-
def create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers
|
424
|
+
def create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
422
425
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
423
426
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
424
427
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -433,13 +436,12 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
433
436
|
|
434
437
|
|
435
438
|
request_headers = {}
|
439
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
436
440
|
|
437
441
|
# Set Headers
|
438
442
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
439
443
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
440
444
|
|
441
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
442
|
-
|
443
445
|
# Serialize Request
|
444
446
|
request_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::GenericResource.mapper()
|
445
447
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -497,6 +499,62 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
497
499
|
promise.execute
|
498
500
|
end
|
499
501
|
|
502
|
+
#
|
503
|
+
# Updates a resource.
|
504
|
+
#
|
505
|
+
# @param resource_group_name [String] The name of the resource group for the
|
506
|
+
# resource. The name is case insensitive.
|
507
|
+
# @param resource_provider_namespace [String] The namespace of the resource
|
508
|
+
# provider.
|
509
|
+
# @param parent_resource_path [String] The parent resource identity.
|
510
|
+
# @param resource_type [String] The resource type of the resource to update.
|
511
|
+
# @param resource_name [String] The name of the resource to update.
|
512
|
+
# @param api_version [String] The API version to use for the operation.
|
513
|
+
# @param parameters [GenericResource] Parameters for updating the resource.
|
514
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
515
|
+
# will be added to the HTTP request.
|
516
|
+
#
|
517
|
+
# @return [GenericResource] operation results.
|
518
|
+
#
|
519
|
+
def update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
520
|
+
response = update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
|
521
|
+
response.body unless response.nil?
|
522
|
+
end
|
523
|
+
|
524
|
+
#
|
525
|
+
# @param resource_group_name [String] The name of the resource group for the
|
526
|
+
# resource. The name is case insensitive.
|
527
|
+
# @param resource_provider_namespace [String] The namespace of the resource
|
528
|
+
# provider.
|
529
|
+
# @param parent_resource_path [String] The parent resource identity.
|
530
|
+
# @param resource_type [String] The resource type of the resource to update.
|
531
|
+
# @param resource_name [String] The name of the resource to update.
|
532
|
+
# @param api_version [String] The API version to use for the operation.
|
533
|
+
# @param parameters [GenericResource] Parameters for updating the resource.
|
534
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
535
|
+
# will be added to the HTTP request.
|
536
|
+
#
|
537
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
538
|
+
# response.
|
539
|
+
#
|
540
|
+
def update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
541
|
+
# Send request
|
542
|
+
promise = begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers)
|
543
|
+
|
544
|
+
promise = promise.then do |response|
|
545
|
+
# Defining deserialization method.
|
546
|
+
deserialize_method = lambda do |parsed_response|
|
547
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::GenericResource.mapper()
|
548
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
549
|
+
end
|
550
|
+
|
551
|
+
# Waiting for response.
|
552
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
553
|
+
end
|
554
|
+
|
555
|
+
promise
|
556
|
+
end
|
557
|
+
|
500
558
|
#
|
501
559
|
# Returns a resource belonging to a resource group.
|
502
560
|
#
|
@@ -512,8 +570,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
512
570
|
#
|
513
571
|
# @return [GenericResource] operation results.
|
514
572
|
#
|
515
|
-
def get(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
516
|
-
response = get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
573
|
+
def get(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
574
|
+
response = get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
517
575
|
response.body unless response.nil?
|
518
576
|
end
|
519
577
|
|
@@ -532,8 +590,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
532
590
|
#
|
533
591
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
534
592
|
#
|
535
|
-
def get_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
536
|
-
get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
593
|
+
def get_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
594
|
+
get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).value!
|
537
595
|
end
|
538
596
|
|
539
597
|
#
|
@@ -551,7 +609,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
551
609
|
#
|
552
610
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
553
611
|
#
|
554
|
-
def get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers
|
612
|
+
def get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
|
555
613
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
556
614
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
557
615
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -565,6 +623,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
565
623
|
|
566
624
|
|
567
625
|
request_headers = {}
|
626
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
568
627
|
|
569
628
|
# Set Headers
|
570
629
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -620,8 +679,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
620
679
|
# will be added to the HTTP request.
|
621
680
|
#
|
622
681
|
#
|
623
|
-
def begin_move_resources(source_resource_group_name, parameters, custom_headers
|
624
|
-
response = begin_move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
682
|
+
def begin_move_resources(source_resource_group_name, parameters, custom_headers:nil)
|
683
|
+
response = begin_move_resources_async(source_resource_group_name, parameters, custom_headers:custom_headers).value!
|
625
684
|
nil
|
626
685
|
end
|
627
686
|
|
@@ -636,8 +695,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
636
695
|
#
|
637
696
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
638
697
|
#
|
639
|
-
def begin_move_resources_with_http_info(source_resource_group_name, parameters, custom_headers
|
640
|
-
begin_move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
698
|
+
def begin_move_resources_with_http_info(source_resource_group_name, parameters, custom_headers:nil)
|
699
|
+
begin_move_resources_async(source_resource_group_name, parameters, custom_headers:custom_headers).value!
|
641
700
|
end
|
642
701
|
|
643
702
|
#
|
@@ -651,7 +710,7 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
651
710
|
#
|
652
711
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
653
712
|
#
|
654
|
-
def begin_move_resources_async(source_resource_group_name, parameters, custom_headers
|
713
|
+
def begin_move_resources_async(source_resource_group_name, parameters, custom_headers:nil)
|
655
714
|
fail ArgumentError, 'source_resource_group_name is nil' if source_resource_group_name.nil?
|
656
715
|
fail ArgumentError, "'source_resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !source_resource_group_name.nil? && source_resource_group_name.length > 90
|
657
716
|
fail ArgumentError, "'source_resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !source_resource_group_name.nil? && source_resource_group_name.length < 1
|
@@ -662,13 +721,12 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
662
721
|
|
663
722
|
|
664
723
|
request_headers = {}
|
724
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
665
725
|
|
666
726
|
# Set Headers
|
667
727
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
668
728
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
669
729
|
|
670
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
671
|
-
|
672
730
|
# Serialize Request
|
673
731
|
request_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::ResourcesMoveInfo.mapper()
|
674
732
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -705,6 +763,134 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
705
763
|
promise.execute
|
706
764
|
end
|
707
765
|
|
766
|
+
#
|
767
|
+
# Updates a resource.
|
768
|
+
#
|
769
|
+
# @param resource_group_name [String] The name of the resource group for the
|
770
|
+
# resource. The name is case insensitive.
|
771
|
+
# @param resource_provider_namespace [String] The namespace of the resource
|
772
|
+
# provider.
|
773
|
+
# @param parent_resource_path [String] The parent resource identity.
|
774
|
+
# @param resource_type [String] The resource type of the resource to update.
|
775
|
+
# @param resource_name [String] The name of the resource to update.
|
776
|
+
# @param api_version [String] The API version to use for the operation.
|
777
|
+
# @param parameters [GenericResource] Parameters for updating the resource.
|
778
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
779
|
+
# will be added to the HTTP request.
|
780
|
+
#
|
781
|
+
# @return [GenericResource] operation results.
|
782
|
+
#
|
783
|
+
def begin_update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
784
|
+
response = begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
|
785
|
+
response.body unless response.nil?
|
786
|
+
end
|
787
|
+
|
788
|
+
#
|
789
|
+
# Updates a resource.
|
790
|
+
#
|
791
|
+
# @param resource_group_name [String] The name of the resource group for the
|
792
|
+
# resource. The name is case insensitive.
|
793
|
+
# @param resource_provider_namespace [String] The namespace of the resource
|
794
|
+
# provider.
|
795
|
+
# @param parent_resource_path [String] The parent resource identity.
|
796
|
+
# @param resource_type [String] The resource type of the resource to update.
|
797
|
+
# @param resource_name [String] The name of the resource to update.
|
798
|
+
# @param api_version [String] The API version to use for the operation.
|
799
|
+
# @param parameters [GenericResource] Parameters for updating the resource.
|
800
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
801
|
+
# will be added to the HTTP request.
|
802
|
+
#
|
803
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
804
|
+
#
|
805
|
+
def begin_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
806
|
+
begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:custom_headers).value!
|
807
|
+
end
|
808
|
+
|
809
|
+
#
|
810
|
+
# Updates a resource.
|
811
|
+
#
|
812
|
+
# @param resource_group_name [String] The name of the resource group for the
|
813
|
+
# resource. The name is case insensitive.
|
814
|
+
# @param resource_provider_namespace [String] The namespace of the resource
|
815
|
+
# provider.
|
816
|
+
# @param parent_resource_path [String] The parent resource identity.
|
817
|
+
# @param resource_type [String] The resource type of the resource to update.
|
818
|
+
# @param resource_name [String] The name of the resource to update.
|
819
|
+
# @param api_version [String] The API version to use for the operation.
|
820
|
+
# @param parameters [GenericResource] Parameters for updating the resource.
|
821
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
822
|
+
# to the HTTP request.
|
823
|
+
#
|
824
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
825
|
+
#
|
826
|
+
def begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
|
827
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
828
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
829
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
830
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
831
|
+
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
832
|
+
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
833
|
+
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
834
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
835
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
836
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
837
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
838
|
+
|
839
|
+
|
840
|
+
request_headers = {}
|
841
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
842
|
+
|
843
|
+
# Set Headers
|
844
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
845
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
846
|
+
|
847
|
+
# Serialize Request
|
848
|
+
request_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::GenericResource.mapper()
|
849
|
+
request_content = @client.serialize(request_mapper, parameters)
|
850
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
851
|
+
|
852
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
853
|
+
|
854
|
+
request_url = @base_url || @client.base_url
|
855
|
+
|
856
|
+
options = {
|
857
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
858
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
859
|
+
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
860
|
+
query_params: {'api-version' => api_version},
|
861
|
+
body: request_content,
|
862
|
+
headers: request_headers.merge(custom_headers || {}),
|
863
|
+
base_url: request_url
|
864
|
+
}
|
865
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
866
|
+
|
867
|
+
promise = promise.then do |result|
|
868
|
+
http_response = result.response
|
869
|
+
status_code = http_response.status
|
870
|
+
response_content = http_response.body
|
871
|
+
unless status_code == 200 || status_code == 202
|
872
|
+
error_model = JSON.load(response_content)
|
873
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
874
|
+
end
|
875
|
+
|
876
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
877
|
+
# Deserialize Response
|
878
|
+
if status_code == 200
|
879
|
+
begin
|
880
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
881
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::GenericResource.mapper()
|
882
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
883
|
+
rescue Exception => e
|
884
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
885
|
+
end
|
886
|
+
end
|
887
|
+
|
888
|
+
result
|
889
|
+
end
|
890
|
+
|
891
|
+
promise.execute
|
892
|
+
end
|
893
|
+
|
708
894
|
#
|
709
895
|
# Get all of the resources under a subscription.
|
710
896
|
#
|
@@ -715,8 +901,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
715
901
|
#
|
716
902
|
# @return [ResourceListResult] operation results.
|
717
903
|
#
|
718
|
-
def list_next(next_page_link, custom_headers
|
719
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
904
|
+
def list_next(next_page_link, custom_headers:nil)
|
905
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
720
906
|
response.body unless response.nil?
|
721
907
|
end
|
722
908
|
|
@@ -730,8 +916,8 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
730
916
|
#
|
731
917
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
732
918
|
#
|
733
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
734
|
-
list_next_async(next_page_link, custom_headers).value!
|
919
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
920
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
735
921
|
end
|
736
922
|
|
737
923
|
#
|
@@ -744,11 +930,12 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
744
930
|
#
|
745
931
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
746
932
|
#
|
747
|
-
def list_next_async(next_page_link, custom_headers
|
933
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
748
934
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
749
935
|
|
750
936
|
|
751
937
|
request_headers = {}
|
938
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
752
939
|
|
753
940
|
# Set Headers
|
754
941
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -805,12 +992,12 @@ module Azure::Resources::Mgmt::V2016_07_01
|
|
805
992
|
# @return [ResourceListResult] which provide lazy access to pages of the
|
806
993
|
# response.
|
807
994
|
#
|
808
|
-
def list_as_lazy(filter
|
809
|
-
response = list_async(filter, expand, top, custom_headers).value!
|
995
|
+
def list_as_lazy(filter:nil, expand:nil, top:nil, custom_headers:nil)
|
996
|
+
response = list_async(filter:filter, expand:expand, top:top, custom_headers:custom_headers).value!
|
810
997
|
unless response.nil?
|
811
998
|
page = response.body
|
812
999
|
page.next_method = Proc.new do |next_page_link|
|
813
|
-
list_next_async(next_page_link, custom_headers)
|
1000
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
814
1001
|
end
|
815
1002
|
page
|
816
1003
|
end
|