azure_mgmt_policy 0.12.0 → 0.13.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/generated/azure_mgmt_policy.rb +8 -1
- data/lib/generated/azure_mgmt_policy/models/error_response.rb +66 -0
- data/lib/generated/azure_mgmt_policy/models/policy_assignment.rb +43 -2
- data/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_policy/models/policy_definition.rb +26 -4
- data/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_policy/models/policy_definition_reference.rb +56 -0
- data/lib/generated/azure_mgmt_policy/models/policy_mode.rb +17 -0
- data/lib/generated/azure_mgmt_policy/models/policy_set_definition.rb +141 -0
- data/lib/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_policy/models/policy_sku.rb +57 -0
- data/lib/generated/azure_mgmt_policy/models/policy_type.rb +1 -1
- data/lib/generated/azure_mgmt_policy/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_policy/policy_assignments.rb +36 -36
- data/lib/generated/azure_mgmt_policy/policy_client.rb +5 -5
- data/lib/generated/azure_mgmt_policy/policy_definitions.rb +9 -9
- data/lib/generated/azure_mgmt_policy/policy_set_definitions.rb +498 -0
- data/lib/generated/azure_mgmt_policy/version.rb +2 -2
- metadata +9 -2
@@ -0,0 +1,95 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy set definitions.
|
10
|
+
#
|
11
|
+
class PolicySetDefinitionListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<PolicySetDefinition>] An array of policy set
|
17
|
+
# definitions.
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
# @return [String] The URL to use for getting the next set of results.
|
21
|
+
attr_accessor :next_link
|
22
|
+
|
23
|
+
# return [Proc] with next page method call.
|
24
|
+
attr_accessor :next_method
|
25
|
+
|
26
|
+
#
|
27
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
28
|
+
#
|
29
|
+
# @return [Array<PolicySetDefinition>] operation results.
|
30
|
+
#
|
31
|
+
def get_all_items
|
32
|
+
items = @value
|
33
|
+
page = self
|
34
|
+
while page.next_link != nil do
|
35
|
+
page = page.get_next_page
|
36
|
+
items.concat(page.value)
|
37
|
+
end
|
38
|
+
items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Gets the next page of results.
|
43
|
+
#
|
44
|
+
# @return [PolicySetDefinitionListResult] with next page content.
|
45
|
+
#
|
46
|
+
def get_next_page
|
47
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
48
|
+
unless response.nil?
|
49
|
+
@next_link = response.body.next_link
|
50
|
+
@value = response.body.value
|
51
|
+
self
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Mapper for PolicySetDefinitionListResult class as Ruby Hash.
|
57
|
+
# This will be used for serialization/deserialization.
|
58
|
+
#
|
59
|
+
def self.mapper()
|
60
|
+
{
|
61
|
+
required: false,
|
62
|
+
serialized_name: 'PolicySetDefinitionListResult',
|
63
|
+
type: {
|
64
|
+
name: 'Composite',
|
65
|
+
class_name: 'PolicySetDefinitionListResult',
|
66
|
+
model_properties: {
|
67
|
+
value: {
|
68
|
+
required: false,
|
69
|
+
serialized_name: 'value',
|
70
|
+
type: {
|
71
|
+
name: 'Sequence',
|
72
|
+
element: {
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'PolicySetDefinitionElementType',
|
75
|
+
type: {
|
76
|
+
name: 'Composite',
|
77
|
+
class_name: 'PolicySetDefinition'
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
},
|
82
|
+
next_link: {
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'nextLink',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy sku.
|
10
|
+
#
|
11
|
+
class PolicySku
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] The name of the policy sku. Possible values are A0 and
|
17
|
+
# A1.
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# @return [String] The policy sku tier. Possible values are Free and
|
21
|
+
# Standard.
|
22
|
+
attr_accessor :tier
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for PolicySku class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'PolicySku',
|
33
|
+
type: {
|
34
|
+
name: 'Composite',
|
35
|
+
class_name: 'PolicySku',
|
36
|
+
model_properties: {
|
37
|
+
name: {
|
38
|
+
required: true,
|
39
|
+
serialized_name: 'name',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
tier: {
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'tier',
|
47
|
+
type: {
|
48
|
+
name: 'String'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -67,7 +67,7 @@ module Azure::ARM::Policy
|
|
67
67
|
def delete_async(scope, policy_assignment_name, custom_headers = nil)
|
68
68
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
69
69
|
fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
|
70
|
-
|
70
|
+
api_version = '2017-06-01-preview'
|
71
71
|
|
72
72
|
|
73
73
|
request_headers = {}
|
@@ -75,7 +75,7 @@ module Azure::ARM::Policy
|
|
75
75
|
# Set Headers
|
76
76
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
77
77
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
78
|
-
path_template = '{scope}/providers/Microsoft.Authorization/
|
78
|
+
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'
|
79
79
|
|
80
80
|
request_url = @base_url || @client.base_url
|
81
81
|
|
@@ -83,7 +83,7 @@ module Azure::ARM::Policy
|
|
83
83
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
84
84
|
path_params: {'policyAssignmentName' => policy_assignment_name},
|
85
85
|
skip_encoding_path_params: {'scope' => scope},
|
86
|
-
query_params: {'api-version' =>
|
86
|
+
query_params: {'api-version' => api_version},
|
87
87
|
headers: request_headers.merge(custom_headers || {}),
|
88
88
|
base_url: request_url
|
89
89
|
}
|
@@ -95,7 +95,7 @@ module Azure::ARM::Policy
|
|
95
95
|
response_content = http_response.body
|
96
96
|
unless status_code == 200 || status_code == 204
|
97
97
|
error_model = JSON.load(response_content)
|
98
|
-
fail
|
98
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
99
99
|
end
|
100
100
|
|
101
101
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -174,7 +174,7 @@ module Azure::ARM::Policy
|
|
174
174
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
175
175
|
fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
|
176
176
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
177
|
-
|
177
|
+
api_version = '2017-06-01-preview'
|
178
178
|
|
179
179
|
|
180
180
|
request_headers = {}
|
@@ -190,7 +190,7 @@ module Azure::ARM::Policy
|
|
190
190
|
request_content = @client.serialize(request_mapper, parameters)
|
191
191
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
192
192
|
|
193
|
-
path_template = '{scope}/providers/Microsoft.Authorization/
|
193
|
+
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'
|
194
194
|
|
195
195
|
request_url = @base_url || @client.base_url
|
196
196
|
|
@@ -198,7 +198,7 @@ module Azure::ARM::Policy
|
|
198
198
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
199
199
|
path_params: {'policyAssignmentName' => policy_assignment_name},
|
200
200
|
skip_encoding_path_params: {'scope' => scope},
|
201
|
-
query_params: {'api-version' =>
|
201
|
+
query_params: {'api-version' => api_version},
|
202
202
|
body: request_content,
|
203
203
|
headers: request_headers.merge(custom_headers || {}),
|
204
204
|
base_url: request_url
|
@@ -211,7 +211,7 @@ module Azure::ARM::Policy
|
|
211
211
|
response_content = http_response.body
|
212
212
|
unless status_code == 201
|
213
213
|
error_model = JSON.load(response_content)
|
214
|
-
fail
|
214
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
215
215
|
end
|
216
216
|
|
217
217
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -277,7 +277,7 @@ module Azure::ARM::Policy
|
|
277
277
|
def get_async(scope, policy_assignment_name, custom_headers = nil)
|
278
278
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
279
279
|
fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
|
280
|
-
|
280
|
+
api_version = '2017-06-01-preview'
|
281
281
|
|
282
282
|
|
283
283
|
request_headers = {}
|
@@ -285,7 +285,7 @@ module Azure::ARM::Policy
|
|
285
285
|
# Set Headers
|
286
286
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
287
287
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
288
|
-
path_template = '{scope}/providers/Microsoft.Authorization/
|
288
|
+
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'
|
289
289
|
|
290
290
|
request_url = @base_url || @client.base_url
|
291
291
|
|
@@ -293,7 +293,7 @@ module Azure::ARM::Policy
|
|
293
293
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
294
294
|
path_params: {'policyAssignmentName' => policy_assignment_name},
|
295
295
|
skip_encoding_path_params: {'scope' => scope},
|
296
|
-
query_params: {'api-version' =>
|
296
|
+
query_params: {'api-version' => api_version},
|
297
297
|
headers: request_headers.merge(custom_headers || {}),
|
298
298
|
base_url: request_url
|
299
299
|
}
|
@@ -305,7 +305,7 @@ module Azure::ARM::Policy
|
|
305
305
|
response_content = http_response.body
|
306
306
|
unless status_code == 200
|
307
307
|
error_model = JSON.load(response_content)
|
308
|
-
fail
|
308
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
309
309
|
end
|
310
310
|
|
311
311
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -370,7 +370,7 @@ module Azure::ARM::Policy
|
|
370
370
|
#
|
371
371
|
def list_for_resource_group_async(resource_group_name, filter = nil, custom_headers = nil)
|
372
372
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
373
|
-
|
373
|
+
api_version = '2017-06-01-preview'
|
374
374
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
375
375
|
|
376
376
|
|
@@ -386,7 +386,7 @@ module Azure::ARM::Policy
|
|
386
386
|
options = {
|
387
387
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
388
388
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
389
|
-
query_params: {'api-version' =>
|
389
|
+
query_params: {'api-version' => api_version},
|
390
390
|
skip_encoding_query_params: {'$filter' => filter},
|
391
391
|
headers: request_headers.merge(custom_headers || {}),
|
392
392
|
base_url: request_url
|
@@ -399,7 +399,7 @@ module Azure::ARM::Policy
|
|
399
399
|
response_content = http_response.body
|
400
400
|
unless status_code == 200
|
401
401
|
error_model = JSON.load(response_content)
|
402
|
-
fail
|
402
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
403
403
|
end
|
404
404
|
|
405
405
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -486,7 +486,7 @@ module Azure::ARM::Policy
|
|
486
486
|
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
487
487
|
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
488
488
|
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
489
|
-
|
489
|
+
api_version = '2017-06-01-preview'
|
490
490
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
491
491
|
|
492
492
|
|
@@ -495,7 +495,7 @@ module Azure::ARM::Policy
|
|
495
495
|
# Set Headers
|
496
496
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
497
497
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
498
|
-
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/
|
498
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments'
|
499
499
|
|
500
500
|
request_url = @base_url || @client.base_url
|
501
501
|
|
@@ -503,7 +503,7 @@ module Azure::ARM::Policy
|
|
503
503
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
504
504
|
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
505
505
|
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
506
|
-
query_params: {'$filter' => filter,'api-version' =>
|
506
|
+
query_params: {'$filter' => filter,'api-version' => api_version},
|
507
507
|
headers: request_headers.merge(custom_headers || {}),
|
508
508
|
base_url: request_url
|
509
509
|
}
|
@@ -515,7 +515,7 @@ module Azure::ARM::Policy
|
|
515
515
|
response_content = http_response.body
|
516
516
|
unless status_code == 200
|
517
517
|
error_model = JSON.load(response_content)
|
518
|
-
fail
|
518
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
519
519
|
end
|
520
520
|
|
521
521
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -573,7 +573,7 @@ module Azure::ARM::Policy
|
|
573
573
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
574
574
|
#
|
575
575
|
def list_async(filter = nil, custom_headers = nil)
|
576
|
-
|
576
|
+
api_version = '2017-06-01-preview'
|
577
577
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
578
578
|
|
579
579
|
|
@@ -582,14 +582,14 @@ module Azure::ARM::Policy
|
|
582
582
|
# Set Headers
|
583
583
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
584
584
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
585
|
-
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/
|
585
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments'
|
586
586
|
|
587
587
|
request_url = @base_url || @client.base_url
|
588
588
|
|
589
589
|
options = {
|
590
590
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
591
591
|
path_params: {'subscriptionId' => @client.subscription_id},
|
592
|
-
query_params: {'$filter' => filter,'api-version' =>
|
592
|
+
query_params: {'$filter' => filter,'api-version' => api_version},
|
593
593
|
headers: request_headers.merge(custom_headers || {}),
|
594
594
|
base_url: request_url
|
595
595
|
}
|
@@ -601,7 +601,7 @@ module Azure::ARM::Policy
|
|
601
601
|
response_content = http_response.body
|
602
602
|
unless status_code == 200
|
603
603
|
error_model = JSON.load(response_content)
|
604
|
-
fail
|
604
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
605
605
|
end
|
606
606
|
|
607
607
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -687,7 +687,7 @@ module Azure::ARM::Policy
|
|
687
687
|
#
|
688
688
|
def delete_by_id_async(policy_assignment_id, custom_headers = nil)
|
689
689
|
fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
|
690
|
-
|
690
|
+
api_version = '2017-06-01-preview'
|
691
691
|
|
692
692
|
|
693
693
|
request_headers = {}
|
@@ -702,7 +702,7 @@ module Azure::ARM::Policy
|
|
702
702
|
options = {
|
703
703
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
704
704
|
skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
|
705
|
-
query_params: {'api-version' =>
|
705
|
+
query_params: {'api-version' => api_version},
|
706
706
|
headers: request_headers.merge(custom_headers || {}),
|
707
707
|
base_url: request_url
|
708
708
|
}
|
@@ -714,7 +714,7 @@ module Azure::ARM::Policy
|
|
714
714
|
response_content = http_response.body
|
715
715
|
unless status_code == 200
|
716
716
|
error_model = JSON.load(response_content)
|
717
|
-
fail
|
717
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
718
718
|
end
|
719
719
|
|
720
720
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -810,7 +810,7 @@ module Azure::ARM::Policy
|
|
810
810
|
def create_by_id_async(policy_assignment_id, parameters, custom_headers = nil)
|
811
811
|
fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
|
812
812
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
813
|
-
|
813
|
+
api_version = '2017-06-01-preview'
|
814
814
|
|
815
815
|
|
816
816
|
request_headers = {}
|
@@ -833,7 +833,7 @@ module Azure::ARM::Policy
|
|
833
833
|
options = {
|
834
834
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
835
835
|
skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
|
836
|
-
query_params: {'api-version' =>
|
836
|
+
query_params: {'api-version' => api_version},
|
837
837
|
body: request_content,
|
838
838
|
headers: request_headers.merge(custom_headers || {}),
|
839
839
|
base_url: request_url
|
@@ -846,7 +846,7 @@ module Azure::ARM::Policy
|
|
846
846
|
response_content = http_response.body
|
847
847
|
unless status_code == 201
|
848
848
|
error_model = JSON.load(response_content)
|
849
|
-
fail
|
849
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
850
850
|
end
|
851
851
|
|
852
852
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -932,7 +932,7 @@ module Azure::ARM::Policy
|
|
932
932
|
#
|
933
933
|
def get_by_id_async(policy_assignment_id, custom_headers = nil)
|
934
934
|
fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
|
935
|
-
|
935
|
+
api_version = '2017-06-01-preview'
|
936
936
|
|
937
937
|
|
938
938
|
request_headers = {}
|
@@ -947,7 +947,7 @@ module Azure::ARM::Policy
|
|
947
947
|
options = {
|
948
948
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
949
949
|
skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
|
950
|
-
query_params: {'api-version' =>
|
950
|
+
query_params: {'api-version' => api_version},
|
951
951
|
headers: request_headers.merge(custom_headers || {}),
|
952
952
|
base_url: request_url
|
953
953
|
}
|
@@ -959,7 +959,7 @@ module Azure::ARM::Policy
|
|
959
959
|
response_content = http_response.body
|
960
960
|
unless status_code == 200
|
961
961
|
error_model = JSON.load(response_content)
|
962
|
-
fail
|
962
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
963
963
|
end
|
964
964
|
|
965
965
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1046,7 +1046,7 @@ module Azure::ARM::Policy
|
|
1046
1046
|
response_content = http_response.body
|
1047
1047
|
unless status_code == 200
|
1048
1048
|
error_model = JSON.load(response_content)
|
1049
|
-
fail
|
1049
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1050
1050
|
end
|
1051
1051
|
|
1052
1052
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1133,7 +1133,7 @@ module Azure::ARM::Policy
|
|
1133
1133
|
response_content = http_response.body
|
1134
1134
|
unless status_code == 200
|
1135
1135
|
error_model = JSON.load(response_content)
|
1136
|
-
fail
|
1136
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1137
1137
|
end
|
1138
1138
|
|
1139
1139
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1220,7 +1220,7 @@ module Azure::ARM::Policy
|
|
1220
1220
|
response_content = http_response.body
|
1221
1221
|
unless status_code == 200
|
1222
1222
|
error_model = JSON.load(response_content)
|
1223
|
-
fail
|
1223
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1224
1224
|
end
|
1225
1225
|
|
1226
1226
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|