azure_mgmt_policy 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy.rb +34 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_assignment.rb +94 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +94 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_definition.rb +98 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +94 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_assignments.rb +1318 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_client.rb +133 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_definitions.rb +492 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/version.rb +8 -0
- data/lib/2016-04-01/generated/azure_mgmt_policy.rb +34 -0
- data/lib/2016-04-01/generated/azure_mgmt_policy/models/policy_assignment.rb +94 -0
- data/lib/{generated → 2016-04-01/generated}/azure_mgmt_policy/models/policy_assignment_list_result.rb +1 -1
- data/lib/2016-04-01/generated/azure_mgmt_policy/models/policy_definition.rb +98 -0
- data/lib/{generated → 2016-04-01/generated}/azure_mgmt_policy/models/policy_definition_list_result.rb +1 -1
- data/lib/{generated → 2016-04-01/generated}/azure_mgmt_policy/models/policy_type.rb +1 -1
- data/lib/2016-04-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_assignments.rb +1318 -0
- data/lib/{generated → 2016-04-01/generated}/azure_mgmt_policy/policy_client.rb +7 -7
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_definitions.rb +492 -0
- data/lib/{generated → 2016-04-01/generated}/azure_mgmt_policy/version.rb +2 -2
- data/lib/2016-12-01/generated/azure_mgmt_policy.rb +35 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/models/policy_assignment.rb +116 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +94 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_policy/models/policy_definition.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +94 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_policy/models/policy_mode.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_assignments.rb +1318 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_client.rb +133 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_policy/policy_definitions.rb +34 -34
- data/lib/{generated/azure_mgmt_policy/module_definition.rb → 2016-12-01/generated/azure_mgmt_policy/version.rb} +3 -3
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy.rb +37 -0
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/error_response.rb +1 -1
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/policy_assignment.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +94 -0
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/policy_definition_reference.rb +1 -1
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/policy_set_definition.rb +1 -1
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/policy_set_definition_list_result.rb +1 -1
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/models/policy_sku.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/policy_assignments.rb +33 -33
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_client.rb +133 -0
- data/lib/{generated → 2017-06-01-preview/generated}/azure_mgmt_policy/policy_set_definitions.rb +36 -36
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/version.rb +8 -0
- data/lib/azure_mgmt_policy.rb +6 -1
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/common/configurable.rb +73 -0
- data/lib/profiles/common/default.rb +68 -0
- data/lib/profiles/latest/modules/policy_profile_module.rb +95 -0
- data/lib/profiles/latest/policy_latest_profile_client.rb +33 -0
- data/lib/profiles/latest/policy_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/modules/policy_profile_module.rb +64 -0
- data/lib/profiles/v2017_03_09/policy_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/policy_v2017_03_09_profile_client.rb +33 -0
- data/lib/version.rb +7 -0
- metadata +60 -20
- data/lib/generated/azure_mgmt_policy.rb +0 -41
data/lib/2017-06-01-preview/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb
ADDED
@@ -0,0 +1,94 @@
|
|
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::Policy::Mgmt::V2017_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy assignments.
|
10
|
+
#
|
11
|
+
class PolicyAssignmentListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<PolicyAssignment>] An array of policy assignments.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] The URL to use for getting the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<PolicyAssignment>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [PolicyAssignmentListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for PolicyAssignmentListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'PolicyAssignmentListResult',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'PolicyAssignmentListResult',
|
65
|
+
model_properties: {
|
66
|
+
value: {
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'value',
|
69
|
+
type: {
|
70
|
+
name: 'Sequence',
|
71
|
+
element: {
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'PolicyAssignmentElementType',
|
74
|
+
type: {
|
75
|
+
name: 'Composite',
|
76
|
+
class_name: 'PolicyAssignment'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
next_link: {
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'nextLink',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,17 @@
|
|
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::Policy::Mgmt::V2017_06_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for PolicyType
|
10
|
+
#
|
11
|
+
module PolicyType
|
12
|
+
NotSpecified = "NotSpecified"
|
13
|
+
BuiltIn = "BuiltIn"
|
14
|
+
Custom = "Custom"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::Policy end
|
8
|
+
module Azure::Policy::Mgmt end
|
9
|
+
module Azure::Policy::Mgmt::V2017_06_01_preview end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
|
-
module Azure::
|
6
|
+
module Azure::Policy::Mgmt::V2017_06_01_preview
|
7
7
|
#
|
8
8
|
# To manage and control access to your resources, you can define customized
|
9
9
|
# policies and assign them at a scope.
|
@@ -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
|
-
api_version
|
70
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
71
71
|
|
72
72
|
|
73
73
|
request_headers = {}
|
@@ -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' => api_version},
|
86
|
+
query_params: {'api-version' => @client.api_version},
|
87
87
|
headers: request_headers.merge(custom_headers || {}),
|
88
88
|
base_url: request_url
|
89
89
|
}
|
@@ -103,7 +103,7 @@ module Azure::ARM::Policy
|
|
103
103
|
if status_code == 200
|
104
104
|
begin
|
105
105
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
106
|
-
result_mapper = Azure::
|
106
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
107
107
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
108
108
|
rescue Exception => e
|
109
109
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
177
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
178
178
|
|
179
179
|
|
180
180
|
request_headers = {}
|
@@ -186,7 +186,7 @@ module Azure::ARM::Policy
|
|
186
186
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
187
187
|
|
188
188
|
# Serialize Request
|
189
|
-
request_mapper = Azure::
|
189
|
+
request_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
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
|
|
@@ -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' => api_version},
|
201
|
+
query_params: {'api-version' => @client.api_version},
|
202
202
|
body: request_content,
|
203
203
|
headers: request_headers.merge(custom_headers || {}),
|
204
204
|
base_url: request_url
|
@@ -219,7 +219,7 @@ module Azure::ARM::Policy
|
|
219
219
|
if status_code == 201
|
220
220
|
begin
|
221
221
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
222
|
-
result_mapper = Azure::
|
222
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
223
223
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
224
224
|
rescue Exception => e
|
225
225
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
280
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
281
281
|
|
282
282
|
|
283
283
|
request_headers = {}
|
@@ -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' => api_version},
|
296
|
+
query_params: {'api-version' => @client.api_version},
|
297
297
|
headers: request_headers.merge(custom_headers || {}),
|
298
298
|
base_url: request_url
|
299
299
|
}
|
@@ -313,7 +313,7 @@ module Azure::ARM::Policy
|
|
313
313
|
if status_code == 200
|
314
314
|
begin
|
315
315
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
316
|
-
result_mapper = Azure::
|
316
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
317
317
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
318
318
|
rescue Exception => e
|
319
319
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
373
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
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' => api_version},
|
389
|
+
query_params: {'api-version' => @client.api_version},
|
390
390
|
skip_encoding_query_params: {'$filter' => filter},
|
391
391
|
headers: request_headers.merge(custom_headers || {}),
|
392
392
|
base_url: request_url
|
@@ -407,7 +407,7 @@ module Azure::ARM::Policy
|
|
407
407
|
if status_code == 200
|
408
408
|
begin
|
409
409
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
410
|
-
result_mapper = Azure::
|
410
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
411
411
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
412
412
|
rescue Exception => e
|
413
413
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
489
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
490
490
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
491
491
|
|
492
492
|
|
@@ -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' => api_version},
|
506
|
+
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
507
507
|
headers: request_headers.merge(custom_headers || {}),
|
508
508
|
base_url: request_url
|
509
509
|
}
|
@@ -523,7 +523,7 @@ module Azure::ARM::Policy
|
|
523
523
|
if status_code == 200
|
524
524
|
begin
|
525
525
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
526
|
-
result_mapper = Azure::
|
526
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
527
527
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
528
528
|
rescue Exception => e
|
529
529
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
576
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
577
577
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
578
578
|
|
579
579
|
|
@@ -589,7 +589,7 @@ module Azure::ARM::Policy
|
|
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' => api_version},
|
592
|
+
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
593
593
|
headers: request_headers.merge(custom_headers || {}),
|
594
594
|
base_url: request_url
|
595
595
|
}
|
@@ -609,7 +609,7 @@ module Azure::ARM::Policy
|
|
609
609
|
if status_code == 200
|
610
610
|
begin
|
611
611
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
612
|
-
result_mapper = Azure::
|
612
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
613
613
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
614
614
|
rescue Exception => e
|
615
615
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
690
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
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' => api_version},
|
705
|
+
query_params: {'api-version' => @client.api_version},
|
706
706
|
headers: request_headers.merge(custom_headers || {}),
|
707
707
|
base_url: request_url
|
708
708
|
}
|
@@ -722,7 +722,7 @@ module Azure::ARM::Policy
|
|
722
722
|
if status_code == 200
|
723
723
|
begin
|
724
724
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
725
|
-
result_mapper = Azure::
|
725
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
726
726
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
727
727
|
rescue Exception => e
|
728
728
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
813
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
814
814
|
|
815
815
|
|
816
816
|
request_headers = {}
|
@@ -822,7 +822,7 @@ module Azure::ARM::Policy
|
|
822
822
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
823
823
|
|
824
824
|
# Serialize Request
|
825
|
-
request_mapper = Azure::
|
825
|
+
request_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
826
826
|
request_content = @client.serialize(request_mapper, parameters)
|
827
827
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
828
828
|
|
@@ -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' => api_version},
|
836
|
+
query_params: {'api-version' => @client.api_version},
|
837
837
|
body: request_content,
|
838
838
|
headers: request_headers.merge(custom_headers || {}),
|
839
839
|
base_url: request_url
|
@@ -854,7 +854,7 @@ module Azure::ARM::Policy
|
|
854
854
|
if status_code == 201
|
855
855
|
begin
|
856
856
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
857
|
-
result_mapper = Azure::
|
857
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
858
858
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
859
859
|
rescue Exception => e
|
860
860
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -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
|
-
api_version
|
935
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
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' => api_version},
|
950
|
+
query_params: {'api-version' => @client.api_version},
|
951
951
|
headers: request_headers.merge(custom_headers || {}),
|
952
952
|
base_url: request_url
|
953
953
|
}
|
@@ -967,7 +967,7 @@ module Azure::ARM::Policy
|
|
967
967
|
if status_code == 200
|
968
968
|
begin
|
969
969
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
970
|
-
result_mapper = Azure::
|
970
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignment.mapper()
|
971
971
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
972
972
|
rescue Exception => e
|
973
973
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -1054,7 +1054,7 @@ module Azure::ARM::Policy
|
|
1054
1054
|
if status_code == 200
|
1055
1055
|
begin
|
1056
1056
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1057
|
-
result_mapper = Azure::
|
1057
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
1058
1058
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
1059
1059
|
rescue Exception => e
|
1060
1060
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -1141,7 +1141,7 @@ module Azure::ARM::Policy
|
|
1141
1141
|
if status_code == 200
|
1142
1142
|
begin
|
1143
1143
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1144
|
-
result_mapper = Azure::
|
1144
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
1145
1145
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
1146
1146
|
rescue Exception => e
|
1147
1147
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -1228,7 +1228,7 @@ module Azure::ARM::Policy
|
|
1228
1228
|
if status_code == 200
|
1229
1229
|
begin
|
1230
1230
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1231
|
-
result_mapper = Azure::
|
1231
|
+
result_mapper = Azure::Policy::Mgmt::V2017_06_01_preview::Models::PolicyAssignmentListResult.mapper()
|
1232
1232
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
1233
1233
|
rescue Exception => e
|
1234
1234
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|