azure_mgmt_resources 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_resources.rb +24 -23
- data/lib/generated/azure_mgmt_resources/deployment_operations.rb +9 -10
- data/lib/generated/azure_mgmt_resources/deployments.rb +44 -45
- data/lib/generated/azure_mgmt_resources/models/alias_path_type.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/alias_type.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/basic_dependency.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/debug_setting.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/dependency.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment.rb +3 -2
- data/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_extended.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_mode.rb +1 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_operation.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_properties.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/export_template_request.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/generic_resource.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/http_message.rb +3 -3
- data/lib/generated/azure_mgmt_resources/models/identity.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/parameters_link.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/plan.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/provider.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/provider_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_group.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb +3 -3
- data/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_group_patchable.rb +85 -0
- data/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb +1 -1
- data/lib/generated/azure_mgmt_resources/models/resource_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +3 -3
- data/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/resources_move_info.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/sku.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/tag_count.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/tag_details.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/tag_value.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/tags_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/target_resource.rb +2 -1
- data/lib/generated/azure_mgmt_resources/models/template_link.rb +2 -1
- data/lib/generated/azure_mgmt_resources/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_resources/providers.rb +15 -16
- data/lib/generated/azure_mgmt_resources/resource_groups.rb +42 -258
- data/lib/generated/azure_mgmt_resources/resource_management_client.rb +6 -6
- data/lib/generated/azure_mgmt_resources/resources.rb +252 -38
- data/lib/generated/azure_mgmt_resources/tags.rb +18 -19
- data/lib/generated/azure_mgmt_resources/version.rb +2 -2
- metadata +5 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -40,12 +40,12 @@ module Azure::ARM::Resources
|
|
40
40
|
# @return [Providers] providers
|
41
41
|
attr_reader :providers
|
42
42
|
|
43
|
-
# @return [ResourceGroups] resource_groups
|
44
|
-
attr_reader :resource_groups
|
45
|
-
|
46
43
|
# @return [Resources] resources
|
47
44
|
attr_reader :resources
|
48
45
|
|
46
|
+
# @return [ResourceGroups] resource_groups
|
47
|
+
attr_reader :resource_groups
|
48
|
+
|
49
49
|
# @return [Tags] tags
|
50
50
|
attr_reader :tags
|
51
51
|
|
@@ -67,11 +67,11 @@ module Azure::ARM::Resources
|
|
67
67
|
|
68
68
|
@deployments = Deployments.new(self)
|
69
69
|
@providers = Providers.new(self)
|
70
|
-
@resource_groups = ResourceGroups.new(self)
|
71
70
|
@resources = Resources.new(self)
|
71
|
+
@resource_groups = ResourceGroups.new(self)
|
72
72
|
@tags = Tags.new(self)
|
73
73
|
@deployment_operations = DeploymentOperations.new(self)
|
74
|
-
@api_version = '
|
74
|
+
@api_version = '2017-05-10'
|
75
75
|
@accept_language = 'en-US'
|
76
76
|
@long_running_operation_retry_timeout = 30
|
77
77
|
@generate_client_request_id = true
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -8,7 +8,6 @@ module Azure::ARM::Resources
|
|
8
8
|
# Provides operations for working with resources and resource groups.
|
9
9
|
#
|
10
10
|
class Resources
|
11
|
-
include Azure::ARM::Resources::Models
|
12
11
|
include MsRestAzure
|
13
12
|
|
14
13
|
#
|
@@ -22,6 +21,108 @@ module Azure::ARM::Resources
|
|
22
21
|
# @return [ResourceManagementClient] reference to the ResourceManagementClient
|
23
22
|
attr_reader :client
|
24
23
|
|
24
|
+
#
|
25
|
+
# Get all the resources for a resource group.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The resource group with the resources to
|
28
|
+
# get.
|
29
|
+
# @param filter [String] The filter to apply on the operation.
|
30
|
+
# @param expand [String] The $expand query parameter
|
31
|
+
# @param top [Integer] The number of results to return. If null is passed,
|
32
|
+
# returns all resources.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [Array<GenericResource>] operation results.
|
37
|
+
#
|
38
|
+
def list_by_resource_group(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
|
39
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, filter, expand, top, custom_headers)
|
40
|
+
first_page.get_all_items
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Get all the resources for a resource group.
|
45
|
+
#
|
46
|
+
# @param resource_group_name [String] The resource group with the resources to
|
47
|
+
# get.
|
48
|
+
# @param filter [String] The filter to apply on the operation.
|
49
|
+
# @param expand [String] The $expand query parameter
|
50
|
+
# @param top [Integer] The number of results to return. If null is passed,
|
51
|
+
# returns all resources.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def list_by_resource_group_with_http_info(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
|
58
|
+
list_by_resource_group_async(resource_group_name, filter, expand, top, custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Get all the resources for a resource group.
|
63
|
+
#
|
64
|
+
# @param resource_group_name [String] The resource group with the resources to
|
65
|
+
# get.
|
66
|
+
# @param filter [String] The filter to apply on the operation.
|
67
|
+
# @param expand [String] The $expand query parameter
|
68
|
+
# @param top [Integer] The number of results to return. If null is passed,
|
69
|
+
# returns all resources.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def list_by_resource_group_async(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
|
76
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
77
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
78
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
79
|
+
|
80
|
+
|
81
|
+
request_headers = {}
|
82
|
+
|
83
|
+
# Set Headers
|
84
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
85
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
86
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'
|
87
|
+
|
88
|
+
request_url = @base_url || @client.base_url
|
89
|
+
|
90
|
+
options = {
|
91
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
92
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
93
|
+
query_params: {'$filter' => filter,'$expand' => expand,'$top' => top,'api-version' => @client.api_version},
|
94
|
+
headers: request_headers.merge(custom_headers || {}),
|
95
|
+
base_url: request_url
|
96
|
+
}
|
97
|
+
promise = @client.make_request_async(:get, path_template, options)
|
98
|
+
|
99
|
+
promise = promise.then do |result|
|
100
|
+
http_response = result.response
|
101
|
+
status_code = http_response.status
|
102
|
+
response_content = http_response.body
|
103
|
+
unless status_code == 200
|
104
|
+
error_model = JSON.load(response_content)
|
105
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
106
|
+
end
|
107
|
+
|
108
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
109
|
+
# Deserialize Response
|
110
|
+
if status_code == 200
|
111
|
+
begin
|
112
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
113
|
+
result_mapper = Azure::ARM::Resources::Models::ResourceListResult.mapper()
|
114
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
115
|
+
rescue Exception => e
|
116
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
result
|
121
|
+
end
|
122
|
+
|
123
|
+
promise.execute
|
124
|
+
end
|
125
|
+
|
25
126
|
#
|
26
127
|
# Moves resources from one resource group to another resource group.
|
27
128
|
#
|
@@ -123,7 +224,7 @@ module Azure::ARM::Resources
|
|
123
224
|
# Set Headers
|
124
225
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
125
226
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
126
|
-
path_template = '
|
227
|
+
path_template = 'subscriptions/{subscriptionId}/resources'
|
127
228
|
|
128
229
|
request_url = @base_url || @client.base_url
|
129
230
|
|
@@ -150,8 +251,8 @@ module Azure::ARM::Resources
|
|
150
251
|
if status_code == 200
|
151
252
|
begin
|
152
253
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
153
|
-
result_mapper = ResourceListResult.mapper()
|
154
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
254
|
+
result_mapper = Azure::ARM::Resources::Models::ResourceListResult.mapper()
|
255
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
155
256
|
rescue Exception => e
|
156
257
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
157
258
|
end
|
@@ -238,7 +339,7 @@ module Azure::ARM::Resources
|
|
238
339
|
# Set Headers
|
239
340
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
240
341
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
241
|
-
path_template = '
|
342
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
242
343
|
|
243
344
|
request_url = @base_url || @client.base_url
|
244
345
|
|
@@ -367,8 +468,8 @@ module Azure::ARM::Resources
|
|
367
468
|
promise = promise.then do |response|
|
368
469
|
# Defining deserialization method.
|
369
470
|
deserialize_method = lambda do |parsed_response|
|
370
|
-
result_mapper = GenericResource.mapper()
|
371
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response
|
471
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
472
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
372
473
|
end
|
373
474
|
|
374
475
|
# Waiting for response.
|
@@ -450,7 +551,7 @@ module Azure::ARM::Resources
|
|
450
551
|
# Set Headers
|
451
552
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
452
553
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
453
|
-
path_template = '
|
554
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
454
555
|
|
455
556
|
request_url = @base_url || @client.base_url
|
456
557
|
|
@@ -478,8 +579,8 @@ module Azure::ARM::Resources
|
|
478
579
|
if status_code == 200
|
479
580
|
begin
|
480
581
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
481
|
-
result_mapper = GenericResource.mapper()
|
482
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
582
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
583
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
483
584
|
rescue Exception => e
|
484
585
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
485
586
|
end
|
@@ -546,7 +647,7 @@ module Azure::ARM::Resources
|
|
546
647
|
# Set Headers
|
547
648
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
548
649
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
549
|
-
path_template = '
|
650
|
+
path_template = '{resourceId}'
|
550
651
|
|
551
652
|
request_url = @base_url || @client.base_url
|
552
653
|
|
@@ -656,8 +757,8 @@ module Azure::ARM::Resources
|
|
656
757
|
promise = promise.then do |response|
|
657
758
|
# Defining deserialization method.
|
658
759
|
deserialize_method = lambda do |parsed_response|
|
659
|
-
result_mapper = GenericResource.mapper()
|
660
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response
|
760
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
761
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
661
762
|
end
|
662
763
|
|
663
764
|
# Waiting for response.
|
@@ -722,7 +823,7 @@ module Azure::ARM::Resources
|
|
722
823
|
# Set Headers
|
723
824
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
724
825
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
725
|
-
path_template = '
|
826
|
+
path_template = '{resourceId}'
|
726
827
|
|
727
828
|
request_url = @base_url || @client.base_url
|
728
829
|
|
@@ -749,8 +850,8 @@ module Azure::ARM::Resources
|
|
749
850
|
if status_code == 200
|
750
851
|
begin
|
751
852
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
752
|
-
result_mapper = GenericResource.mapper()
|
753
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
853
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
854
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
754
855
|
rescue Exception => e
|
755
856
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
756
857
|
end
|
@@ -837,11 +938,11 @@ module Azure::ARM::Resources
|
|
837
938
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
838
939
|
|
839
940
|
# Serialize Request
|
840
|
-
request_mapper = ResourcesMoveInfo.mapper()
|
841
|
-
request_content = @client.serialize(request_mapper, parameters
|
941
|
+
request_mapper = Azure::ARM::Resources::Models::ResourcesMoveInfo.mapper()
|
942
|
+
request_content = @client.serialize(request_mapper, parameters)
|
842
943
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
843
944
|
|
844
|
-
path_template = '
|
945
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'
|
845
946
|
|
846
947
|
request_url = @base_url || @client.base_url
|
847
948
|
|
@@ -943,7 +1044,7 @@ module Azure::ARM::Resources
|
|
943
1044
|
# Set Headers
|
944
1045
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
945
1046
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
946
|
-
path_template = '
|
1047
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
947
1048
|
|
948
1049
|
request_url = @base_url || @client.base_url
|
949
1050
|
|
@@ -1057,11 +1158,11 @@ module Azure::ARM::Resources
|
|
1057
1158
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1058
1159
|
|
1059
1160
|
# Serialize Request
|
1060
|
-
request_mapper = GenericResource.mapper()
|
1061
|
-
request_content = @client.serialize(request_mapper, parameters
|
1161
|
+
request_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1162
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1062
1163
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1063
1164
|
|
1064
|
-
path_template = '
|
1165
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
1065
1166
|
|
1066
1167
|
request_url = @base_url || @client.base_url
|
1067
1168
|
|
@@ -1090,8 +1191,8 @@ module Azure::ARM::Resources
|
|
1090
1191
|
if status_code == 201
|
1091
1192
|
begin
|
1092
1193
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1093
|
-
result_mapper = GenericResource.mapper()
|
1094
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1194
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1195
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1095
1196
|
rescue Exception => e
|
1096
1197
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1097
1198
|
end
|
@@ -1100,8 +1201,8 @@ module Azure::ARM::Resources
|
|
1100
1201
|
if status_code == 200
|
1101
1202
|
begin
|
1102
1203
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1103
|
-
result_mapper = GenericResource.mapper()
|
1104
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1204
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1205
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1105
1206
|
rescue Exception => e
|
1106
1207
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1107
1208
|
end
|
@@ -1167,7 +1268,7 @@ module Azure::ARM::Resources
|
|
1167
1268
|
# Set Headers
|
1168
1269
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1169
1270
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1170
|
-
path_template = '
|
1271
|
+
path_template = '{resourceId}'
|
1171
1272
|
|
1172
1273
|
request_url = @base_url || @client.base_url
|
1173
1274
|
|
@@ -1260,11 +1361,11 @@ module Azure::ARM::Resources
|
|
1260
1361
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1261
1362
|
|
1262
1363
|
# Serialize Request
|
1263
|
-
request_mapper = GenericResource.mapper()
|
1264
|
-
request_content = @client.serialize(request_mapper, parameters
|
1364
|
+
request_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1365
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1265
1366
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1266
1367
|
|
1267
|
-
path_template = '
|
1368
|
+
path_template = '{resourceId}'
|
1268
1369
|
|
1269
1370
|
request_url = @base_url || @client.base_url
|
1270
1371
|
|
@@ -1292,8 +1393,8 @@ module Azure::ARM::Resources
|
|
1292
1393
|
if status_code == 201
|
1293
1394
|
begin
|
1294
1395
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1295
|
-
result_mapper = GenericResource.mapper()
|
1296
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1396
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1397
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1297
1398
|
rescue Exception => e
|
1298
1399
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1299
1400
|
end
|
@@ -1302,8 +1403,95 @@ module Azure::ARM::Resources
|
|
1302
1403
|
if status_code == 200
|
1303
1404
|
begin
|
1304
1405
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1305
|
-
result_mapper = GenericResource.mapper()
|
1306
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1406
|
+
result_mapper = Azure::ARM::Resources::Models::GenericResource.mapper()
|
1407
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1408
|
+
rescue Exception => e
|
1409
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1410
|
+
end
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
result
|
1414
|
+
end
|
1415
|
+
|
1416
|
+
promise.execute
|
1417
|
+
end
|
1418
|
+
|
1419
|
+
#
|
1420
|
+
# Get all the resources for a resource group.
|
1421
|
+
#
|
1422
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1423
|
+
# to List operation.
|
1424
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1425
|
+
# will be added to the HTTP request.
|
1426
|
+
#
|
1427
|
+
# @return [ResourceListResult] operation results.
|
1428
|
+
#
|
1429
|
+
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1430
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1431
|
+
response.body unless response.nil?
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
#
|
1435
|
+
# Get all the resources for a resource group.
|
1436
|
+
#
|
1437
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1438
|
+
# to List operation.
|
1439
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1440
|
+
# will be added to the HTTP request.
|
1441
|
+
#
|
1442
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1443
|
+
#
|
1444
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
1445
|
+
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
#
|
1449
|
+
# Get all the resources for a resource group.
|
1450
|
+
#
|
1451
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1452
|
+
# to List operation.
|
1453
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1454
|
+
# to the HTTP request.
|
1455
|
+
#
|
1456
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1457
|
+
#
|
1458
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
|
1459
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1460
|
+
|
1461
|
+
|
1462
|
+
request_headers = {}
|
1463
|
+
|
1464
|
+
# Set Headers
|
1465
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1466
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1467
|
+
path_template = '{nextLink}'
|
1468
|
+
|
1469
|
+
request_url = @base_url || @client.base_url
|
1470
|
+
|
1471
|
+
options = {
|
1472
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1473
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1474
|
+
headers: request_headers.merge(custom_headers || {}),
|
1475
|
+
base_url: request_url
|
1476
|
+
}
|
1477
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1478
|
+
|
1479
|
+
promise = promise.then do |result|
|
1480
|
+
http_response = result.response
|
1481
|
+
status_code = http_response.status
|
1482
|
+
response_content = http_response.body
|
1483
|
+
unless status_code == 200
|
1484
|
+
error_model = JSON.load(response_content)
|
1485
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1489
|
+
# Deserialize Response
|
1490
|
+
if status_code == 200
|
1491
|
+
begin
|
1492
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1493
|
+
result_mapper = Azure::ARM::Resources::Models::ResourceListResult.mapper()
|
1494
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1307
1495
|
rescue Exception => e
|
1308
1496
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1309
1497
|
end
|
@@ -1389,8 +1577,8 @@ module Azure::ARM::Resources
|
|
1389
1577
|
if status_code == 200
|
1390
1578
|
begin
|
1391
1579
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1392
|
-
result_mapper = ResourceListResult.mapper()
|
1393
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1580
|
+
result_mapper = Azure::ARM::Resources::Models::ResourceListResult.mapper()
|
1581
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1394
1582
|
rescue Exception => e
|
1395
1583
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1396
1584
|
end
|
@@ -1402,6 +1590,32 @@ module Azure::ARM::Resources
|
|
1402
1590
|
promise.execute
|
1403
1591
|
end
|
1404
1592
|
|
1593
|
+
#
|
1594
|
+
# Get all the resources for a resource group.
|
1595
|
+
#
|
1596
|
+
# @param resource_group_name [String] The resource group with the resources to
|
1597
|
+
# get.
|
1598
|
+
# @param filter [String] The filter to apply on the operation.
|
1599
|
+
# @param expand [String] The $expand query parameter
|
1600
|
+
# @param top [Integer] The number of results to return. If null is passed,
|
1601
|
+
# returns all resources.
|
1602
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1603
|
+
# will be added to the HTTP request.
|
1604
|
+
#
|
1605
|
+
# @return [ResourceListResult] which provide lazy access to pages of the
|
1606
|
+
# response.
|
1607
|
+
#
|
1608
|
+
def list_by_resource_group_as_lazy(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
|
1609
|
+
response = list_by_resource_group_async(resource_group_name, filter, expand, top, custom_headers).value!
|
1610
|
+
unless response.nil?
|
1611
|
+
page = response.body
|
1612
|
+
page.next_method = Proc.new do |next_page_link|
|
1613
|
+
list_by_resource_group_next_async(next_page_link, custom_headers)
|
1614
|
+
end
|
1615
|
+
page
|
1616
|
+
end
|
1617
|
+
end
|
1618
|
+
|
1405
1619
|
#
|
1406
1620
|
# Get all the resources in a subscription.
|
1407
1621
|
#
|