azure_mgmt_policy 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -108,6 +108,9 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
108
108
  fail ArgumentError, 'path is nil' if path.nil?
109
109
 
110
110
  request_url = options[:base_url] || @base_url
111
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
112
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
113
+ end
111
114
 
112
115
  request_headers = @request_headers
113
116
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -124,7 +127,7 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
124
127
  #
125
128
  def add_telemetry
126
129
  sdk_information = 'azure_mgmt_policy'
127
- sdk_information = "#{sdk_information}/0.15.2"
130
+ sdk_information = "#{sdk_information}/0.16.0"
128
131
  add_user_agent_information(sdk_information)
129
132
  end
130
133
  end
@@ -33,8 +33,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
33
33
  #
34
34
  # @return [PolicyDefinition] operation results.
35
35
  #
36
- def create_or_update(policy_definition_name, parameters, custom_headers = nil)
37
- response = create_or_update_async(policy_definition_name, parameters, custom_headers).value!
36
+ def create_or_update(policy_definition_name, parameters, custom_headers:nil)
37
+ response = create_or_update_async(policy_definition_name, parameters, custom_headers:custom_headers).value!
38
38
  response.body unless response.nil?
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def create_or_update_with_http_info(policy_definition_name, parameters, custom_headers = nil)
53
- create_or_update_async(policy_definition_name, parameters, custom_headers).value!
52
+ def create_or_update_with_http_info(policy_definition_name, parameters, custom_headers:nil)
53
+ create_or_update_async(policy_definition_name, parameters, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,7 +64,7 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def create_or_update_async(policy_definition_name, parameters, custom_headers = nil)
67
+ def create_or_update_async(policy_definition_name, parameters, custom_headers:nil)
68
68
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
69
69
  fail ArgumentError, 'parameters is nil' if parameters.nil?
70
70
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -72,13 +72,12 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
72
72
 
73
73
 
74
74
  request_headers = {}
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
76
 
76
77
  # Set Headers
77
78
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
79
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
80
 
80
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
-
82
81
  # Serialize Request
83
82
  request_mapper = Azure::Policy::Mgmt::V2015_10_01_preview::Models::PolicyDefinition.mapper()
84
83
  request_content = @client.serialize(request_mapper, parameters)
@@ -134,8 +133,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
134
133
  # will be added to the HTTP request.
135
134
  #
136
135
  #
137
- def delete(policy_definition_name, custom_headers = nil)
138
- response = delete_async(policy_definition_name, custom_headers).value!
136
+ def delete(policy_definition_name, custom_headers:nil)
137
+ response = delete_async(policy_definition_name, custom_headers:custom_headers).value!
139
138
  nil
140
139
  end
141
140
 
@@ -149,8 +148,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
149
148
  #
150
149
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
150
  #
152
- def delete_with_http_info(policy_definition_name, custom_headers = nil)
153
- delete_async(policy_definition_name, custom_headers).value!
151
+ def delete_with_http_info(policy_definition_name, custom_headers:nil)
152
+ delete_async(policy_definition_name, custom_headers:custom_headers).value!
154
153
  end
155
154
 
156
155
  #
@@ -163,13 +162,14 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
163
162
  #
164
163
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
164
  #
166
- def delete_async(policy_definition_name, custom_headers = nil)
165
+ def delete_async(policy_definition_name, custom_headers:nil)
167
166
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
168
167
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
169
168
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
170
169
 
171
170
 
172
171
  request_headers = {}
172
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
173
173
 
174
174
  # Set Headers
175
175
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -214,8 +214,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
214
214
  #
215
215
  # @return [PolicyDefinition] operation results.
216
216
  #
217
- def get(policy_definition_name, custom_headers = nil)
218
- response = get_async(policy_definition_name, custom_headers).value!
217
+ def get(policy_definition_name, custom_headers:nil)
218
+ response = get_async(policy_definition_name, custom_headers:custom_headers).value!
219
219
  response.body unless response.nil?
220
220
  end
221
221
 
@@ -229,8 +229,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
229
229
  #
230
230
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
231
  #
232
- def get_with_http_info(policy_definition_name, custom_headers = nil)
233
- get_async(policy_definition_name, custom_headers).value!
232
+ def get_with_http_info(policy_definition_name, custom_headers:nil)
233
+ get_async(policy_definition_name, custom_headers:custom_headers).value!
234
234
  end
235
235
 
236
236
  #
@@ -243,13 +243,14 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
243
243
  #
244
244
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
245
245
  #
246
- def get_async(policy_definition_name, custom_headers = nil)
246
+ def get_async(policy_definition_name, custom_headers:nil)
247
247
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
248
248
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
249
249
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
250
250
 
251
251
 
252
252
  request_headers = {}
253
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
253
254
 
254
255
  # Set Headers
255
256
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -303,8 +304,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
303
304
  #
304
305
  # @return [Array<PolicyDefinition>] operation results.
305
306
  #
306
- def list(filter = nil, custom_headers = nil)
307
- first_page = list_as_lazy(filter, custom_headers)
307
+ def list(filter:nil, custom_headers:nil)
308
+ first_page = list_as_lazy(filter:filter, custom_headers:custom_headers)
308
309
  first_page.get_all_items
309
310
  end
310
311
 
@@ -317,8 +318,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
317
318
  #
318
319
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
319
320
  #
320
- def list_with_http_info(filter = nil, custom_headers = nil)
321
- list_async(filter, custom_headers).value!
321
+ def list_with_http_info(filter:nil, custom_headers:nil)
322
+ list_async(filter:filter, custom_headers:custom_headers).value!
322
323
  end
323
324
 
324
325
  #
@@ -330,12 +331,13 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
330
331
  #
331
332
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
332
333
  #
333
- def list_async(filter = nil, custom_headers = nil)
334
+ def list_async(filter:nil, custom_headers:nil)
334
335
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
335
336
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
336
337
 
337
338
 
338
339
  request_headers = {}
340
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
339
341
 
340
342
  # Set Headers
341
343
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -390,8 +392,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
390
392
  #
391
393
  # @return [PolicyDefinitionListResult] operation results.
392
394
  #
393
- def list_next(next_page_link, custom_headers = nil)
394
- response = list_next_async(next_page_link, custom_headers).value!
395
+ def list_next(next_page_link, custom_headers:nil)
396
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
395
397
  response.body unless response.nil?
396
398
  end
397
399
 
@@ -405,8 +407,8 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
405
407
  #
406
408
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
407
409
  #
408
- def list_next_with_http_info(next_page_link, custom_headers = nil)
409
- list_next_async(next_page_link, custom_headers).value!
410
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
411
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
410
412
  end
411
413
 
412
414
  #
@@ -419,11 +421,12 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
419
421
  #
420
422
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
421
423
  #
422
- def list_next_async(next_page_link, custom_headers = nil)
424
+ def list_next_async(next_page_link, custom_headers:nil)
423
425
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
424
426
 
425
427
 
426
428
  request_headers = {}
429
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
427
430
 
428
431
  # Set Headers
429
432
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -477,12 +480,12 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
477
480
  # @return [PolicyDefinitionListResult] which provide lazy access to pages of
478
481
  # the response.
479
482
  #
480
- def list_as_lazy(filter = nil, custom_headers = nil)
481
- response = list_async(filter, custom_headers).value!
483
+ def list_as_lazy(filter:nil, custom_headers:nil)
484
+ response = list_async(filter:filter, custom_headers:custom_headers).value!
482
485
  unless response.nil?
483
486
  page = response.body
484
487
  page.next_method = Proc.new do |next_page_link|
485
- list_next_async(next_page_link, custom_headers)
488
+ list_next_async(next_page_link, custom_headers:custom_headers)
486
489
  end
487
490
  page
488
491
  end
@@ -33,8 +33,8 @@ module Azure::Policy::Mgmt::V2016_04_01
33
33
  #
34
34
  # @return [PolicyAssignment] operation results.
35
35
  #
36
- def delete(scope, policy_assignment_name, custom_headers = nil)
37
- response = delete_async(scope, policy_assignment_name, custom_headers).value!
36
+ def delete(scope, policy_assignment_name, custom_headers:nil)
37
+ response = delete_async(scope, policy_assignment_name, custom_headers:custom_headers).value!
38
38
  response.body unless response.nil?
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::Policy::Mgmt::V2016_04_01
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def delete_with_http_info(scope, policy_assignment_name, custom_headers = nil)
53
- delete_async(scope, policy_assignment_name, custom_headers).value!
52
+ def delete_with_http_info(scope, policy_assignment_name, custom_headers:nil)
53
+ delete_async(scope, policy_assignment_name, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,13 +64,14 @@ module Azure::Policy::Mgmt::V2016_04_01
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def delete_async(scope, policy_assignment_name, custom_headers = nil)
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
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
71
 
72
72
 
73
73
  request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
75
 
75
76
  # Set Headers
76
77
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -131,8 +132,8 @@ module Azure::Policy::Mgmt::V2016_04_01
131
132
  #
132
133
  # @return [PolicyAssignment] operation results.
133
134
  #
134
- def create(scope, policy_assignment_name, parameters, custom_headers = nil)
135
- response = create_async(scope, policy_assignment_name, parameters, custom_headers).value!
135
+ def create(scope, policy_assignment_name, parameters, custom_headers:nil)
136
+ response = create_async(scope, policy_assignment_name, parameters, custom_headers:custom_headers).value!
136
137
  response.body unless response.nil?
137
138
  end
138
139
 
@@ -151,8 +152,8 @@ module Azure::Policy::Mgmt::V2016_04_01
151
152
  #
152
153
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
153
154
  #
154
- def create_with_http_info(scope, policy_assignment_name, parameters, custom_headers = nil)
155
- create_async(scope, policy_assignment_name, parameters, custom_headers).value!
155
+ def create_with_http_info(scope, policy_assignment_name, parameters, custom_headers:nil)
156
+ create_async(scope, policy_assignment_name, parameters, custom_headers:custom_headers).value!
156
157
  end
157
158
 
158
159
  #
@@ -170,7 +171,7 @@ module Azure::Policy::Mgmt::V2016_04_01
170
171
  #
171
172
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
172
173
  #
173
- def create_async(scope, policy_assignment_name, parameters, custom_headers = nil)
174
+ def create_async(scope, policy_assignment_name, parameters, custom_headers:nil)
174
175
  fail ArgumentError, 'scope is nil' if scope.nil?
175
176
  fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
176
177
  fail ArgumentError, 'parameters is nil' if parameters.nil?
@@ -178,13 +179,12 @@ module Azure::Policy::Mgmt::V2016_04_01
178
179
 
179
180
 
180
181
  request_headers = {}
182
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
181
183
 
182
184
  # Set Headers
183
185
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
184
186
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
185
187
 
186
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
-
188
188
  # Serialize Request
189
189
  request_mapper = Azure::Policy::Mgmt::V2016_04_01::Models::PolicyAssignment.mapper()
190
190
  request_content = @client.serialize(request_mapper, parameters)
@@ -243,8 +243,8 @@ module Azure::Policy::Mgmt::V2016_04_01
243
243
  #
244
244
  # @return [PolicyAssignment] operation results.
245
245
  #
246
- def get(scope, policy_assignment_name, custom_headers = nil)
247
- response = get_async(scope, policy_assignment_name, custom_headers).value!
246
+ def get(scope, policy_assignment_name, custom_headers:nil)
247
+ response = get_async(scope, policy_assignment_name, custom_headers:custom_headers).value!
248
248
  response.body unless response.nil?
249
249
  end
250
250
 
@@ -259,8 +259,8 @@ module Azure::Policy::Mgmt::V2016_04_01
259
259
  #
260
260
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
261
261
  #
262
- def get_with_http_info(scope, policy_assignment_name, custom_headers = nil)
263
- get_async(scope, policy_assignment_name, custom_headers).value!
262
+ def get_with_http_info(scope, policy_assignment_name, custom_headers:nil)
263
+ get_async(scope, policy_assignment_name, custom_headers:custom_headers).value!
264
264
  end
265
265
 
266
266
  #
@@ -274,13 +274,14 @@ module Azure::Policy::Mgmt::V2016_04_01
274
274
  #
275
275
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
276
276
  #
277
- def get_async(scope, policy_assignment_name, custom_headers = nil)
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
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
281
281
 
282
282
 
283
283
  request_headers = {}
284
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
284
285
 
285
286
  # Set Headers
286
287
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -337,8 +338,8 @@ module Azure::Policy::Mgmt::V2016_04_01
337
338
  #
338
339
  # @return [Array<PolicyAssignment>] operation results.
339
340
  #
340
- def list_for_resource_group(resource_group_name, filter = nil, custom_headers = nil)
341
- first_page = list_for_resource_group_as_lazy(resource_group_name, filter, custom_headers)
341
+ def list_for_resource_group(resource_group_name, filter:nil, custom_headers:nil)
342
+ first_page = list_for_resource_group_as_lazy(resource_group_name, filter:filter, custom_headers:custom_headers)
342
343
  first_page.get_all_items
343
344
  end
344
345
 
@@ -353,8 +354,8 @@ module Azure::Policy::Mgmt::V2016_04_01
353
354
  #
354
355
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
355
356
  #
356
- def list_for_resource_group_with_http_info(resource_group_name, filter = nil, custom_headers = nil)
357
- list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
357
+ def list_for_resource_group_with_http_info(resource_group_name, filter:nil, custom_headers:nil)
358
+ list_for_resource_group_async(resource_group_name, filter:filter, custom_headers:custom_headers).value!
358
359
  end
359
360
 
360
361
  #
@@ -368,7 +369,7 @@ module Azure::Policy::Mgmt::V2016_04_01
368
369
  #
369
370
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
370
371
  #
371
- def list_for_resource_group_async(resource_group_name, filter = nil, custom_headers = nil)
372
+ def list_for_resource_group_async(resource_group_name, filter:nil, custom_headers:nil)
372
373
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
373
374
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
374
375
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -378,6 +379,7 @@ module Azure::Policy::Mgmt::V2016_04_01
378
379
 
379
380
 
380
381
  request_headers = {}
382
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
381
383
 
382
384
  # Set Headers
383
385
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -440,8 +442,8 @@ module Azure::Policy::Mgmt::V2016_04_01
440
442
  #
441
443
  # @return [Array<PolicyAssignment>] operation results.
442
444
  #
443
- def list_for_resource(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
444
- first_page = list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers)
445
+ def list_for_resource(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
446
+ first_page = list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers)
445
447
  first_page.get_all_items
446
448
  end
447
449
 
@@ -462,8 +464,8 @@ module Azure::Policy::Mgmt::V2016_04_01
462
464
  #
463
465
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
464
466
  #
465
- def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
466
- list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
467
+ def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
468
+ list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers).value!
467
469
  end
468
470
 
469
471
  #
@@ -483,7 +485,7 @@ module Azure::Policy::Mgmt::V2016_04_01
483
485
  #
484
486
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
485
487
  #
486
- def list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
488
+ def list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
487
489
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
488
490
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
489
491
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -497,6 +499,7 @@ module Azure::Policy::Mgmt::V2016_04_01
497
499
 
498
500
 
499
501
  request_headers = {}
502
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
500
503
 
501
504
  # Set Headers
502
505
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -551,8 +554,8 @@ module Azure::Policy::Mgmt::V2016_04_01
551
554
  #
552
555
  # @return [Array<PolicyAssignment>] operation results.
553
556
  #
554
- def list(filter = nil, custom_headers = nil)
555
- first_page = list_as_lazy(filter, custom_headers)
557
+ def list(filter:nil, custom_headers:nil)
558
+ first_page = list_as_lazy(filter:filter, custom_headers:custom_headers)
556
559
  first_page.get_all_items
557
560
  end
558
561
 
@@ -565,8 +568,8 @@ module Azure::Policy::Mgmt::V2016_04_01
565
568
  #
566
569
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
567
570
  #
568
- def list_with_http_info(filter = nil, custom_headers = nil)
569
- list_async(filter, custom_headers).value!
571
+ def list_with_http_info(filter:nil, custom_headers:nil)
572
+ list_async(filter:filter, custom_headers:custom_headers).value!
570
573
  end
571
574
 
572
575
  #
@@ -578,12 +581,13 @@ module Azure::Policy::Mgmt::V2016_04_01
578
581
  #
579
582
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
580
583
  #
581
- def list_async(filter = nil, custom_headers = nil)
584
+ def list_async(filter:nil, custom_headers:nil)
582
585
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
583
586
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
584
587
 
585
588
 
586
589
  request_headers = {}
590
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
587
591
 
588
592
  # Set Headers
589
593
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -646,8 +650,8 @@ module Azure::Policy::Mgmt::V2016_04_01
646
650
  #
647
651
  # @return [PolicyAssignment] operation results.
648
652
  #
649
- def delete_by_id(policy_assignment_id, custom_headers = nil)
650
- response = delete_by_id_async(policy_assignment_id, custom_headers).value!
653
+ def delete_by_id(policy_assignment_id, custom_headers:nil)
654
+ response = delete_by_id_async(policy_assignment_id, custom_headers:custom_headers).value!
651
655
  response.body unless response.nil?
652
656
  end
653
657
 
@@ -669,8 +673,8 @@ module Azure::Policy::Mgmt::V2016_04_01
669
673
  #
670
674
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
671
675
  #
672
- def delete_by_id_with_http_info(policy_assignment_id, custom_headers = nil)
673
- delete_by_id_async(policy_assignment_id, custom_headers).value!
676
+ def delete_by_id_with_http_info(policy_assignment_id, custom_headers:nil)
677
+ delete_by_id_async(policy_assignment_id, custom_headers:custom_headers).value!
674
678
  end
675
679
 
676
680
  #
@@ -691,12 +695,13 @@ module Azure::Policy::Mgmt::V2016_04_01
691
695
  #
692
696
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
693
697
  #
694
- def delete_by_id_async(policy_assignment_id, custom_headers = nil)
698
+ def delete_by_id_async(policy_assignment_id, custom_headers:nil)
695
699
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
696
700
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
697
701
 
698
702
 
699
703
  request_headers = {}
704
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
700
705
 
701
706
  # Set Headers
702
707
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -762,8 +767,8 @@ module Azure::Policy::Mgmt::V2016_04_01
762
767
  #
763
768
  # @return [PolicyAssignment] operation results.
764
769
  #
765
- def create_by_id(policy_assignment_id, parameters, custom_headers = nil)
766
- response = create_by_id_async(policy_assignment_id, parameters, custom_headers).value!
770
+ def create_by_id(policy_assignment_id, parameters, custom_headers:nil)
771
+ response = create_by_id_async(policy_assignment_id, parameters, custom_headers:custom_headers).value!
767
772
  response.body unless response.nil?
768
773
  end
769
774
 
@@ -788,8 +793,8 @@ module Azure::Policy::Mgmt::V2016_04_01
788
793
  #
789
794
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
790
795
  #
791
- def create_by_id_with_http_info(policy_assignment_id, parameters, custom_headers = nil)
792
- create_by_id_async(policy_assignment_id, parameters, custom_headers).value!
796
+ def create_by_id_with_http_info(policy_assignment_id, parameters, custom_headers:nil)
797
+ create_by_id_async(policy_assignment_id, parameters, custom_headers:custom_headers).value!
793
798
  end
794
799
 
795
800
  #
@@ -813,20 +818,19 @@ module Azure::Policy::Mgmt::V2016_04_01
813
818
  #
814
819
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
815
820
  #
816
- def create_by_id_async(policy_assignment_id, parameters, custom_headers = nil)
821
+ def create_by_id_async(policy_assignment_id, parameters, custom_headers:nil)
817
822
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
818
823
  fail ArgumentError, 'parameters is nil' if parameters.nil?
819
824
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
820
825
 
821
826
 
822
827
  request_headers = {}
828
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
823
829
 
824
830
  # Set Headers
825
831
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
826
832
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
827
833
 
828
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
829
-
830
834
  # Serialize Request
831
835
  request_mapper = Azure::Policy::Mgmt::V2016_04_01::Models::PolicyAssignment.mapper()
832
836
  request_content = @client.serialize(request_mapper, parameters)
@@ -891,8 +895,8 @@ module Azure::Policy::Mgmt::V2016_04_01
891
895
  #
892
896
  # @return [PolicyAssignment] operation results.
893
897
  #
894
- def get_by_id(policy_assignment_id, custom_headers = nil)
895
- response = get_by_id_async(policy_assignment_id, custom_headers).value!
898
+ def get_by_id(policy_assignment_id, custom_headers:nil)
899
+ response = get_by_id_async(policy_assignment_id, custom_headers:custom_headers).value!
896
900
  response.body unless response.nil?
897
901
  end
898
902
 
@@ -914,8 +918,8 @@ module Azure::Policy::Mgmt::V2016_04_01
914
918
  #
915
919
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
916
920
  #
917
- def get_by_id_with_http_info(policy_assignment_id, custom_headers = nil)
918
- get_by_id_async(policy_assignment_id, custom_headers).value!
921
+ def get_by_id_with_http_info(policy_assignment_id, custom_headers:nil)
922
+ get_by_id_async(policy_assignment_id, custom_headers:custom_headers).value!
919
923
  end
920
924
 
921
925
  #
@@ -936,12 +940,13 @@ module Azure::Policy::Mgmt::V2016_04_01
936
940
  #
937
941
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
938
942
  #
939
- def get_by_id_async(policy_assignment_id, custom_headers = nil)
943
+ def get_by_id_async(policy_assignment_id, custom_headers:nil)
940
944
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
941
945
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
942
946
 
943
947
 
944
948
  request_headers = {}
949
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
945
950
 
946
951
  # Set Headers
947
952
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -996,8 +1001,8 @@ module Azure::Policy::Mgmt::V2016_04_01
996
1001
  #
997
1002
  # @return [PolicyAssignmentListResult] operation results.
998
1003
  #
999
- def list_for_resource_group_next(next_page_link, custom_headers = nil)
1000
- response = list_for_resource_group_next_async(next_page_link, custom_headers).value!
1004
+ def list_for_resource_group_next(next_page_link, custom_headers:nil)
1005
+ response = list_for_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1001
1006
  response.body unless response.nil?
1002
1007
  end
1003
1008
 
@@ -1011,8 +1016,8 @@ module Azure::Policy::Mgmt::V2016_04_01
1011
1016
  #
1012
1017
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1013
1018
  #
1014
- def list_for_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
1015
- list_for_resource_group_next_async(next_page_link, custom_headers).value!
1019
+ def list_for_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1020
+ list_for_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1016
1021
  end
1017
1022
 
1018
1023
  #
@@ -1025,11 +1030,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1025
1030
  #
1026
1031
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1027
1032
  #
1028
- def list_for_resource_group_next_async(next_page_link, custom_headers = nil)
1033
+ def list_for_resource_group_next_async(next_page_link, custom_headers:nil)
1029
1034
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1030
1035
 
1031
1036
 
1032
1037
  request_headers = {}
1038
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1033
1039
 
1034
1040
  # Set Headers
1035
1041
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1083,8 +1089,8 @@ module Azure::Policy::Mgmt::V2016_04_01
1083
1089
  #
1084
1090
  # @return [PolicyAssignmentListResult] operation results.
1085
1091
  #
1086
- def list_for_resource_next(next_page_link, custom_headers = nil)
1087
- response = list_for_resource_next_async(next_page_link, custom_headers).value!
1092
+ def list_for_resource_next(next_page_link, custom_headers:nil)
1093
+ response = list_for_resource_next_async(next_page_link, custom_headers:custom_headers).value!
1088
1094
  response.body unless response.nil?
1089
1095
  end
1090
1096
 
@@ -1098,8 +1104,8 @@ module Azure::Policy::Mgmt::V2016_04_01
1098
1104
  #
1099
1105
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1100
1106
  #
1101
- def list_for_resource_next_with_http_info(next_page_link, custom_headers = nil)
1102
- list_for_resource_next_async(next_page_link, custom_headers).value!
1107
+ def list_for_resource_next_with_http_info(next_page_link, custom_headers:nil)
1108
+ list_for_resource_next_async(next_page_link, custom_headers:custom_headers).value!
1103
1109
  end
1104
1110
 
1105
1111
  #
@@ -1112,11 +1118,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1112
1118
  #
1113
1119
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1114
1120
  #
1115
- def list_for_resource_next_async(next_page_link, custom_headers = nil)
1121
+ def list_for_resource_next_async(next_page_link, custom_headers:nil)
1116
1122
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1117
1123
 
1118
1124
 
1119
1125
  request_headers = {}
1126
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1120
1127
 
1121
1128
  # Set Headers
1122
1129
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1170,8 +1177,8 @@ module Azure::Policy::Mgmt::V2016_04_01
1170
1177
  #
1171
1178
  # @return [PolicyAssignmentListResult] operation results.
1172
1179
  #
1173
- def list_next(next_page_link, custom_headers = nil)
1174
- response = list_next_async(next_page_link, custom_headers).value!
1180
+ def list_next(next_page_link, custom_headers:nil)
1181
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1175
1182
  response.body unless response.nil?
1176
1183
  end
1177
1184
 
@@ -1185,8 +1192,8 @@ module Azure::Policy::Mgmt::V2016_04_01
1185
1192
  #
1186
1193
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1187
1194
  #
1188
- def list_next_with_http_info(next_page_link, custom_headers = nil)
1189
- list_next_async(next_page_link, custom_headers).value!
1195
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1196
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1190
1197
  end
1191
1198
 
1192
1199
  #
@@ -1199,11 +1206,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1199
1206
  #
1200
1207
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1201
1208
  #
1202
- def list_next_async(next_page_link, custom_headers = nil)
1209
+ def list_next_async(next_page_link, custom_headers:nil)
1203
1210
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1204
1211
 
1205
1212
 
1206
1213
  request_headers = {}
1214
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1207
1215
 
1208
1216
  # Set Headers
1209
1217
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1259,12 +1267,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1259
1267
  # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1260
1268
  # the response.
1261
1269
  #
1262
- def list_for_resource_group_as_lazy(resource_group_name, filter = nil, custom_headers = nil)
1263
- response = list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
1270
+ def list_for_resource_group_as_lazy(resource_group_name, filter:nil, custom_headers:nil)
1271
+ response = list_for_resource_group_async(resource_group_name, filter:filter, custom_headers:custom_headers).value!
1264
1272
  unless response.nil?
1265
1273
  page = response.body
1266
1274
  page.next_method = Proc.new do |next_page_link|
1267
- list_for_resource_group_next_async(next_page_link, custom_headers)
1275
+ list_for_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1268
1276
  end
1269
1277
  page
1270
1278
  end
@@ -1288,12 +1296,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1288
1296
  # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1289
1297
  # the response.
1290
1298
  #
1291
- def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
1292
- response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
1299
+ def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
1300
+ response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers).value!
1293
1301
  unless response.nil?
1294
1302
  page = response.body
1295
1303
  page.next_method = Proc.new do |next_page_link|
1296
- list_for_resource_next_async(next_page_link, custom_headers)
1304
+ list_for_resource_next_async(next_page_link, custom_headers:custom_headers)
1297
1305
  end
1298
1306
  page
1299
1307
  end
@@ -1309,12 +1317,12 @@ module Azure::Policy::Mgmt::V2016_04_01
1309
1317
  # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1310
1318
  # the response.
1311
1319
  #
1312
- def list_as_lazy(filter = nil, custom_headers = nil)
1313
- response = list_async(filter, custom_headers).value!
1320
+ def list_as_lazy(filter:nil, custom_headers:nil)
1321
+ response = list_async(filter:filter, custom_headers:custom_headers).value!
1314
1322
  unless response.nil?
1315
1323
  page = response.body
1316
1324
  page.next_method = Proc.new do |next_page_link|
1317
- list_next_async(next_page_link, custom_headers)
1325
+ list_next_async(next_page_link, custom_headers:custom_headers)
1318
1326
  end
1319
1327
  page
1320
1328
  end