azure_mgmt_policy 0.7.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b23a0149148b933a6c27800d4445f4e4086da40a
4
- data.tar.gz: 9215189b00cad27da12caa3e4330ad7e381ec849
3
+ metadata.gz: 42e795166eaaf2eca23304afa4952f20b69f3f13
4
+ data.tar.gz: 4c994718654becff1c6de4b73636cede8b20044a
5
5
  SHA512:
6
- metadata.gz: 7c8ddac49577e12d50738337c1bd3928cef47122be331b144a4f323963d36e53a75f3804df5871b7be927b4dd64daa75ae85b15828ac854d1b1fa7b7a9d5c3e3
7
- data.tar.gz: 9582e17a0f030c96b9b2cf9ff3a6ad701caefea5269a62113e2774e8e3c2323c6205ae0a02d8a51ca923053574d2ab3f9937a1b30ddb6840cd14fd0e2d00120d
6
+ metadata.gz: 84bce77b225dc5f0a61cb5326f482612c724a3eb86e4a6548b770fc5dd628bb5ea6bbe9d6b6605fc191b4859666c444abc7b31d97b402589ee5e415f0f7de433
7
+ data.tar.gz: d99a38738bd0e1790cb729a96d4cd55c40b42a2352849db98ba7835128b31140bd61fbaf47475f0b5f8901e222bc9f2268c8a3d6cad0278627333dafd415898a
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -25,10 +25,10 @@ module Azure::ARM::Policy
25
25
  autoload :PolicyClient, 'generated/azure_mgmt_policy/policy_client.rb'
26
26
 
27
27
  module Models
28
- autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb'
29
- autoload :PolicyDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
30
28
  autoload :PolicyAssignment, 'generated/azure_mgmt_policy/models/policy_assignment.rb'
29
+ autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb'
31
30
  autoload :PolicyAssignmentListResult, 'generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
31
+ autoload :PolicyDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
32
32
  autoload :PolicyType, 'generated/azure_mgmt_policy/models/policy_type.rb'
33
33
  end
34
34
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,23 +12,22 @@ module Azure::ARM::Policy
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Gets or sets the policy assignment display name.
15
+ # @return [String] The display name of the policy assignment.
16
16
  attr_accessor :display_name
17
17
 
18
- # @return [String] Gets or sets the policy definition Id.
18
+ # @return [String] The ID of the policy definition.
19
19
  attr_accessor :policy_definition_id
20
20
 
21
- # @return [String] Gets or sets the scope at which the policy assignment
22
- # exists.
21
+ # @return [String] The scope for the policy assignment.
23
22
  attr_accessor :scope
24
23
 
25
- # @return [String] Gets or sets the Id of the policy assignment.
24
+ # @return [String] The ID of the policy assignment.
26
25
  attr_accessor :id
27
26
 
28
- # @return [String] Gets or sets the type of the policy assignment.
27
+ # @return [String] The type of the policy assignment.
29
28
  attr_accessor :type
30
29
 
31
- # @return [String] Gets or sets the name of the policy assignment.
30
+ # @return [String] The name of the policy assignment.
32
31
  attr_accessor :name
33
32
 
34
33
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,11 +12,10 @@ module Azure::ARM::Policy
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<PolicyAssignment>] Gets or sets the list of policy
16
- # assignments.
15
+ # @return [Array<PolicyAssignment>] An array of policy assignments.
17
16
  attr_accessor :value
18
17
 
19
- # @return [String] Gets or sets the URL to get the next set of results.
18
+ # @return [String] The URL to use for getting the next set of results.
20
19
  attr_accessor :next_link
21
20
 
22
21
  # return [Proc] with next page method call.
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,23 +12,26 @@ module Azure::ARM::Policy
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [PolicyType] Gets or sets policy definition policy type.
16
- # Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
15
+ # @return [PolicyType] The type of policy definition. Possible values are
16
+ # NotSpecified, BuiltIn, and Custom. Possible values include:
17
+ # 'NotSpecified', 'BuiltIn', 'Custom'
17
18
  attr_accessor :policy_type
18
19
 
19
- # @return [String] Gets or sets the policy definition display name.
20
+ # @return [String] The display name of the policy definition.
20
21
  attr_accessor :display_name
21
22
 
22
- # @return [String] Gets or sets the policy definition description.
23
+ # @return [String] The policy definition description.
23
24
  attr_accessor :description
24
25
 
25
- # @return Gets or sets the policy rule.
26
+ # @return The policy rule.
26
27
  attr_accessor :policy_rule
27
28
 
28
- # @return [String] Gets or sets the Id of the policy definition.
29
+ # @return [String] The ID of the policy definition.
29
30
  attr_accessor :id
30
31
 
31
- # @return [String] Gets or sets the name of the policy definition.
32
+ # @return [String] The name of the policy definition. If you do not
33
+ # specify a value for name, the value is inferred from the name value in
34
+ # the request URI.
32
35
  attr_accessor :name
33
36
 
34
37
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -12,11 +12,10 @@ module Azure::ARM::Policy
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<PolicyDefinition>] Gets or sets the list of policy
16
- # definitions.
15
+ # @return [Array<PolicyDefinition>] An array of policy definitions.
17
16
  attr_accessor :value
18
17
 
19
- # @return [String] Gets or sets the URL to get the next set of results.
18
+ # @return [String] The URL to use for getting the next set of results.
20
19
  attr_accessor :next_link
21
20
 
22
21
  # return [Proc] with next page method call.
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,11 +1,12 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Policy
7
7
  #
8
- # PolicyAssignments
8
+ # To manage and control access to your resources, you can define customized
9
+ # policies and assign them at a scope.
9
10
  #
10
11
  class PolicyAssignments
11
12
  include Azure::ARM::Policy::Models
@@ -23,10 +24,11 @@ module Azure::ARM::Policy
23
24
  attr_reader :client
24
25
 
25
26
  #
26
- # Delete policy assignment.
27
+ # Deletes a policy assignment.
27
28
  #
28
- # @param scope [String] Scope of the policy assignment.
29
- # @param policy_assignment_name [String] Policy assignment name.
29
+ # @param scope [String] The scope of the policy assignment.
30
+ # @param policy_assignment_name [String] The name of the policy assignment to
31
+ # delete.
30
32
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
33
  # will be added to the HTTP request.
32
34
  #
@@ -38,10 +40,11 @@ module Azure::ARM::Policy
38
40
  end
39
41
 
40
42
  #
41
- # Delete policy assignment.
43
+ # Deletes a policy assignment.
42
44
  #
43
- # @param scope [String] Scope of the policy assignment.
44
- # @param policy_assignment_name [String] Policy assignment name.
45
+ # @param scope [String] The scope of the policy assignment.
46
+ # @param policy_assignment_name [String] The name of the policy assignment to
47
+ # delete.
45
48
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
46
49
  # will be added to the HTTP request.
47
50
  #
@@ -52,10 +55,11 @@ module Azure::ARM::Policy
52
55
  end
53
56
 
54
57
  #
55
- # Delete policy assignment.
58
+ # Deletes a policy assignment.
56
59
  #
57
- # @param scope [String] Scope of the policy assignment.
58
- # @param policy_assignment_name [String] Policy assignment name.
60
+ # @param scope [String] The scope of the policy assignment.
61
+ # @param policy_assignment_name [String] The name of the policy assignment to
62
+ # delete.
59
63
  # @param [Hash{String => String}] A hash of custom headers that will be added
60
64
  # to the HTTP request.
61
65
  #
@@ -65,7 +69,6 @@ module Azure::ARM::Policy
65
69
  fail ArgumentError, 'scope is nil' if scope.nil?
66
70
  fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
67
71
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
72
 
70
73
 
71
74
  request_headers = {}
@@ -79,7 +82,7 @@ module Azure::ARM::Policy
79
82
 
80
83
  options = {
81
84
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
- path_params: {'policyAssignmentName' => policy_assignment_name,'subscriptionId' => @client.subscription_id},
85
+ path_params: {'policyAssignmentName' => policy_assignment_name},
83
86
  skip_encoding_path_params: {'scope' => scope},
84
87
  query_params: {'api-version' => @client.api_version},
85
88
  headers: request_headers.merge(custom_headers || {}),
@@ -115,11 +118,15 @@ module Azure::ARM::Policy
115
118
  end
116
119
 
117
120
  #
118
- # Create policy assignment.
121
+ # Creates a policy assignment.
122
+ #
123
+ # Policy assignments are inherited by child resources. For example, when you
124
+ # apply a policy to a resource group that policy is assigned to all resources
125
+ # in the group.
119
126
  #
120
- # @param scope [String] Scope of the policy assignment.
121
- # @param policy_assignment_name [String] Policy assignment name.
122
- # @param parameters [PolicyAssignment] Policy assignment.
127
+ # @param scope [String] The scope of the policy assignment.
128
+ # @param policy_assignment_name [String] The name of the policy assignment.
129
+ # @param parameters [PolicyAssignment] Parameters for the policy assignment.
123
130
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
131
  # will be added to the HTTP request.
125
132
  #
@@ -131,11 +138,15 @@ module Azure::ARM::Policy
131
138
  end
132
139
 
133
140
  #
134
- # Create policy assignment.
141
+ # Creates a policy assignment.
142
+ #
143
+ # Policy assignments are inherited by child resources. For example, when you
144
+ # apply a policy to a resource group that policy is assigned to all resources
145
+ # in the group.
135
146
  #
136
- # @param scope [String] Scope of the policy assignment.
137
- # @param policy_assignment_name [String] Policy assignment name.
138
- # @param parameters [PolicyAssignment] Policy assignment.
147
+ # @param scope [String] The scope of the policy assignment.
148
+ # @param policy_assignment_name [String] The name of the policy assignment.
149
+ # @param parameters [PolicyAssignment] Parameters for the policy assignment.
139
150
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
140
151
  # will be added to the HTTP request.
141
152
  #
@@ -146,11 +157,15 @@ module Azure::ARM::Policy
146
157
  end
147
158
 
148
159
  #
149
- # Create policy assignment.
160
+ # Creates a policy assignment.
150
161
  #
151
- # @param scope [String] Scope of the policy assignment.
152
- # @param policy_assignment_name [String] Policy assignment name.
153
- # @param parameters [PolicyAssignment] Policy assignment.
162
+ # Policy assignments are inherited by child resources. For example, when you
163
+ # apply a policy to a resource group that policy is assigned to all resources
164
+ # in the group.
165
+ #
166
+ # @param scope [String] The scope of the policy assignment.
167
+ # @param policy_assignment_name [String] The name of the policy assignment.
168
+ # @param parameters [PolicyAssignment] Parameters for the policy assignment.
154
169
  # @param [Hash{String => String}] A hash of custom headers that will be added
155
170
  # to the HTTP request.
156
171
  #
@@ -161,7 +176,6 @@ module Azure::ARM::Policy
161
176
  fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
162
177
  fail ArgumentError, 'parameters is nil' if parameters.nil?
163
178
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
164
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
165
179
 
166
180
 
167
181
  request_headers = {}
@@ -183,7 +197,7 @@ module Azure::ARM::Policy
183
197
 
184
198
  options = {
185
199
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
186
- path_params: {'policyAssignmentName' => policy_assignment_name,'subscriptionId' => @client.subscription_id},
200
+ path_params: {'policyAssignmentName' => policy_assignment_name},
187
201
  skip_encoding_path_params: {'scope' => scope},
188
202
  query_params: {'api-version' => @client.api_version},
189
203
  body: request_content,
@@ -220,10 +234,11 @@ module Azure::ARM::Policy
220
234
  end
221
235
 
222
236
  #
223
- # Get single policy assignment.
237
+ # Gets a policy assignment.
224
238
  #
225
- # @param scope [String] Scope of the policy assignment.
226
- # @param policy_assignment_name [String] Policy assignment name.
239
+ # @param scope [String] The scope of the policy assignment.
240
+ # @param policy_assignment_name [String] The name of the policy assignment to
241
+ # get.
227
242
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
243
  # will be added to the HTTP request.
229
244
  #
@@ -235,10 +250,11 @@ module Azure::ARM::Policy
235
250
  end
236
251
 
237
252
  #
238
- # Get single policy assignment.
253
+ # Gets a policy assignment.
239
254
  #
240
- # @param scope [String] Scope of the policy assignment.
241
- # @param policy_assignment_name [String] Policy assignment name.
255
+ # @param scope [String] The scope of the policy assignment.
256
+ # @param policy_assignment_name [String] The name of the policy assignment to
257
+ # get.
242
258
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
243
259
  # will be added to the HTTP request.
244
260
  #
@@ -249,10 +265,11 @@ module Azure::ARM::Policy
249
265
  end
250
266
 
251
267
  #
252
- # Get single policy assignment.
268
+ # Gets a policy assignment.
253
269
  #
254
- # @param scope [String] Scope of the policy assignment.
255
- # @param policy_assignment_name [String] Policy assignment name.
270
+ # @param scope [String] The scope of the policy assignment.
271
+ # @param policy_assignment_name [String] The name of the policy assignment to
272
+ # get.
256
273
  # @param [Hash{String => String}] A hash of custom headers that will be added
257
274
  # to the HTTP request.
258
275
  #
@@ -262,7 +279,6 @@ module Azure::ARM::Policy
262
279
  fail ArgumentError, 'scope is nil' if scope.nil?
263
280
  fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil?
264
281
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
265
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
266
282
 
267
283
 
268
284
  request_headers = {}
@@ -276,7 +292,7 @@ module Azure::ARM::Policy
276
292
 
277
293
  options = {
278
294
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
279
- path_params: {'policyAssignmentName' => policy_assignment_name,'subscriptionId' => @client.subscription_id},
295
+ path_params: {'policyAssignmentName' => policy_assignment_name},
280
296
  skip_encoding_path_params: {'scope' => scope},
281
297
  query_params: {'api-version' => @client.api_version},
282
298
  headers: request_headers.merge(custom_headers || {}),
@@ -312,31 +328,10 @@ module Azure::ARM::Policy
312
328
  end
313
329
 
314
330
  #
315
- # Gets policy assignments of the resource group.
331
+ # Gets policy assignments for the resource group.
316
332
  #
317
- # @param resource_group_name [String] Resource group name.
318
- # @param filter [String] The filter to apply on the operation.
319
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
- # will be added to the HTTP request.
321
- #
322
- # @return [PolicyAssignmentListResult] which provide lazy access to pages of
323
- # the response.
324
- #
325
- def list_for_resource_group_as_lazy(resource_group_name, filter = nil, custom_headers = nil)
326
- response = list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
327
- unless response.nil?
328
- page = response.body
329
- page.next_method = Proc.new do |next_page_link|
330
- list_for_resource_group_next_async(next_page_link, custom_headers)
331
- end
332
- page
333
- end
334
- end
335
-
336
- #
337
- # Gets policy assignments of the resource group.
338
- #
339
- # @param resource_group_name [String] Resource group name.
333
+ # @param resource_group_name [String] The name of the resource group that
334
+ # contains policy assignments.
340
335
  # @param filter [String] The filter to apply on the operation.
341
336
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
337
  # will be added to the HTTP request.
@@ -349,9 +344,10 @@ module Azure::ARM::Policy
349
344
  end
350
345
 
351
346
  #
352
- # Gets policy assignments of the resource group.
347
+ # Gets policy assignments for the resource group.
353
348
  #
354
- # @param resource_group_name [String] Resource group name.
349
+ # @param resource_group_name [String] The name of the resource group that
350
+ # contains policy assignments.
355
351
  # @param filter [String] The filter to apply on the operation.
356
352
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
357
353
  # will be added to the HTTP request.
@@ -363,9 +359,10 @@ module Azure::ARM::Policy
363
359
  end
364
360
 
365
361
  #
366
- # Gets policy assignments of the resource group.
362
+ # Gets policy assignments for the resource group.
367
363
  #
368
- # @param resource_group_name [String] Resource group name.
364
+ # @param resource_group_name [String] The name of the resource group that
365
+ # contains policy assignments.
369
366
  # @param filter [String] The filter to apply on the operation.
370
367
  # @param [Hash{String => String}] A hash of custom headers that will be added
371
368
  # to the HTTP request.
@@ -425,41 +422,16 @@ module Azure::ARM::Policy
425
422
  end
426
423
 
427
424
  #
428
- # Gets policy assignments of the resource.
425
+ # Gets policy assignments for a resource.
429
426
  #
430
- # @param resource_group_name [String] The name of the resource group. The name
431
- # is case insensitive.
432
- # @param resource_provider_namespace [String] The resource provider namespace.
427
+ # @param resource_group_name [String] The name of the resource group containing
428
+ # the resource. The name is case insensitive.
429
+ # @param resource_provider_namespace [String] The namespace of the resource
430
+ # provider.
433
431
  # @param parent_resource_path [String] The parent resource path.
434
432
  # @param resource_type [String] The resource type.
435
- # @param resource_name [String] The resource name.
436
- # @param filter [String] The filter to apply on the operation.
437
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
438
- # will be added to the HTTP request.
439
- #
440
- # @return [PolicyAssignmentListResult] which provide lazy access to pages of
441
- # the response.
442
- #
443
- def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
444
- response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
445
- unless response.nil?
446
- page = response.body
447
- page.next_method = Proc.new do |next_page_link|
448
- list_for_resource_next_async(next_page_link, custom_headers)
449
- end
450
- page
451
- end
452
- end
453
-
454
- #
455
- # Gets policy assignments of the resource.
456
- #
457
- # @param resource_group_name [String] The name of the resource group. The name
458
- # is case insensitive.
459
- # @param resource_provider_namespace [String] The resource provider namespace.
460
- # @param parent_resource_path [String] The parent resource path.
461
- # @param resource_type [String] The resource type.
462
- # @param resource_name [String] The resource name.
433
+ # @param resource_name [String] The name of the resource with policy
434
+ # assignments.
463
435
  # @param filter [String] The filter to apply on the operation.
464
436
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
465
437
  # will be added to the HTTP request.
@@ -472,14 +444,16 @@ module Azure::ARM::Policy
472
444
  end
473
445
 
474
446
  #
475
- # Gets policy assignments of the resource.
447
+ # Gets policy assignments for a resource.
476
448
  #
477
- # @param resource_group_name [String] The name of the resource group. The name
478
- # is case insensitive.
479
- # @param resource_provider_namespace [String] The resource provider namespace.
449
+ # @param resource_group_name [String] The name of the resource group containing
450
+ # the resource. The name is case insensitive.
451
+ # @param resource_provider_namespace [String] The namespace of the resource
452
+ # provider.
480
453
  # @param parent_resource_path [String] The parent resource path.
481
454
  # @param resource_type [String] The resource type.
482
- # @param resource_name [String] The resource name.
455
+ # @param resource_name [String] The name of the resource with policy
456
+ # assignments.
483
457
  # @param filter [String] The filter to apply on the operation.
484
458
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
485
459
  # will be added to the HTTP request.
@@ -491,14 +465,16 @@ module Azure::ARM::Policy
491
465
  end
492
466
 
493
467
  #
494
- # Gets policy assignments of the resource.
468
+ # Gets policy assignments for a resource.
495
469
  #
496
- # @param resource_group_name [String] The name of the resource group. The name
497
- # is case insensitive.
498
- # @param resource_provider_namespace [String] The resource provider namespace.
470
+ # @param resource_group_name [String] The name of the resource group containing
471
+ # the resource. The name is case insensitive.
472
+ # @param resource_provider_namespace [String] The namespace of the resource
473
+ # provider.
499
474
  # @param parent_resource_path [String] The parent resource path.
500
475
  # @param resource_type [String] The resource type.
501
- # @param resource_name [String] The resource name.
476
+ # @param resource_name [String] The name of the resource with policy
477
+ # assignments.
502
478
  # @param filter [String] The filter to apply on the operation.
503
479
  # @param [Hash{String => String}] A hash of custom headers that will be added
504
480
  # to the HTTP request.
@@ -562,28 +538,7 @@ module Azure::ARM::Policy
562
538
  end
563
539
 
564
540
  #
565
- # Gets all the policy assignments of a subscription.
566
- #
567
- # @param filter [String] The filter to apply on the operation.
568
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
569
- # will be added to the HTTP request.
570
- #
571
- # @return [PolicyAssignmentListResult] which provide lazy access to pages of
572
- # the response.
573
- #
574
- def list_as_lazy(filter = nil, custom_headers = nil)
575
- response = list_async(filter, custom_headers).value!
576
- unless response.nil?
577
- page = response.body
578
- page.next_method = Proc.new do |next_page_link|
579
- list_next_async(next_page_link, custom_headers)
580
- end
581
- page
582
- end
583
- end
584
-
585
- #
586
- # Gets all the policy assignments of a subscription.
541
+ # Gets all the policy assignments for a subscription.
587
542
  #
588
543
  # @param filter [String] The filter to apply on the operation.
589
544
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -597,7 +552,7 @@ module Azure::ARM::Policy
597
552
  end
598
553
 
599
554
  #
600
- # Gets all the policy assignments of a subscription.
555
+ # Gets all the policy assignments for a subscription.
601
556
  #
602
557
  # @param filter [String] The filter to apply on the operation.
603
558
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -610,7 +565,7 @@ module Azure::ARM::Policy
610
565
  end
611
566
 
612
567
  #
613
- # Gets all the policy assignments of a subscription.
568
+ # Gets all the policy assignments for a subscription.
614
569
  #
615
570
  # @param filter [String] The filter to apply on the operation.
616
571
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -669,9 +624,18 @@ module Azure::ARM::Policy
669
624
  end
670
625
 
671
626
  #
672
- # Delete policy assignment.
627
+ # Deletes a policy assignment by ID.
628
+ #
629
+ # When providing a scope for the assigment, use
630
+ # '/subscriptions/{subscription-id}/' for subscriptions,
631
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
632
+ # resource groups, and
633
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
634
+ # for resources.
673
635
  #
674
- # @param policy_assignment_id [String] Policy assignment Id
636
+ # @param policy_assignment_id [String] The ID of the policy assignment to
637
+ # delete. Use the format
638
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
675
639
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
676
640
  # will be added to the HTTP request.
677
641
  #
@@ -683,9 +647,18 @@ module Azure::ARM::Policy
683
647
  end
684
648
 
685
649
  #
686
- # Delete policy assignment.
650
+ # Deletes a policy assignment by ID.
687
651
  #
688
- # @param policy_assignment_id [String] Policy assignment Id
652
+ # When providing a scope for the assigment, use
653
+ # '/subscriptions/{subscription-id}/' for subscriptions,
654
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
655
+ # resource groups, and
656
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
657
+ # for resources.
658
+ #
659
+ # @param policy_assignment_id [String] The ID of the policy assignment to
660
+ # delete. Use the format
661
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
689
662
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
690
663
  # will be added to the HTTP request.
691
664
  #
@@ -696,9 +669,18 @@ module Azure::ARM::Policy
696
669
  end
697
670
 
698
671
  #
699
- # Delete policy assignment.
672
+ # Deletes a policy assignment by ID.
673
+ #
674
+ # When providing a scope for the assigment, use
675
+ # '/subscriptions/{subscription-id}/' for subscriptions,
676
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
677
+ # resource groups, and
678
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
679
+ # for resources.
700
680
  #
701
- # @param policy_assignment_id [String] Policy assignment Id
681
+ # @param policy_assignment_id [String] The ID of the policy assignment to
682
+ # delete. Use the format
683
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
702
684
  # @param [Hash{String => String}] A hash of custom headers that will be added
703
685
  # to the HTTP request.
704
686
  #
@@ -707,7 +689,6 @@ module Azure::ARM::Policy
707
689
  def delete_by_id_async(policy_assignment_id, custom_headers = nil)
708
690
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
709
691
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
710
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
711
692
 
712
693
 
713
694
  request_headers = {}
@@ -721,7 +702,6 @@ module Azure::ARM::Policy
721
702
 
722
703
  options = {
723
704
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
724
- path_params: {'subscriptionId' => @client.subscription_id},
725
705
  skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
726
706
  query_params: {'api-version' => @client.api_version},
727
707
  headers: request_headers.merge(custom_headers || {}),
@@ -757,10 +737,21 @@ module Azure::ARM::Policy
757
737
  end
758
738
 
759
739
  #
760
- # Create policy assignment by Id.
740
+ # Creates a policy assignment by ID.
761
741
  #
762
- # @param policy_assignment_id [String] Policy assignment Id
763
- # @param parameters [PolicyAssignment] Policy assignment.
742
+ # Policy assignments are inherited by child resources. For example, when you
743
+ # apply a policy to a resource group that policy is assigned to all resources
744
+ # in the group. When providing a scope for the assigment, use
745
+ # '/subscriptions/{subscription-id}/' for subscriptions,
746
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
747
+ # resource groups, and
748
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
749
+ # for resources.
750
+ #
751
+ # @param policy_assignment_id [String] The ID of the policy assignment to
752
+ # create. Use the format
753
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
754
+ # @param parameters [PolicyAssignment] Parameters for policy assignment.
764
755
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
765
756
  # will be added to the HTTP request.
766
757
  #
@@ -772,10 +763,21 @@ module Azure::ARM::Policy
772
763
  end
773
764
 
774
765
  #
775
- # Create policy assignment by Id.
766
+ # Creates a policy assignment by ID.
767
+ #
768
+ # Policy assignments are inherited by child resources. For example, when you
769
+ # apply a policy to a resource group that policy is assigned to all resources
770
+ # in the group. When providing a scope for the assigment, use
771
+ # '/subscriptions/{subscription-id}/' for subscriptions,
772
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
773
+ # resource groups, and
774
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
775
+ # for resources.
776
776
  #
777
- # @param policy_assignment_id [String] Policy assignment Id
778
- # @param parameters [PolicyAssignment] Policy assignment.
777
+ # @param policy_assignment_id [String] The ID of the policy assignment to
778
+ # create. Use the format
779
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
780
+ # @param parameters [PolicyAssignment] Parameters for policy assignment.
779
781
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
780
782
  # will be added to the HTTP request.
781
783
  #
@@ -786,10 +788,21 @@ module Azure::ARM::Policy
786
788
  end
787
789
 
788
790
  #
789
- # Create policy assignment by Id.
791
+ # Creates a policy assignment by ID.
792
+ #
793
+ # Policy assignments are inherited by child resources. For example, when you
794
+ # apply a policy to a resource group that policy is assigned to all resources
795
+ # in the group. When providing a scope for the assigment, use
796
+ # '/subscriptions/{subscription-id}/' for subscriptions,
797
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
798
+ # resource groups, and
799
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
800
+ # for resources.
790
801
  #
791
- # @param policy_assignment_id [String] Policy assignment Id
792
- # @param parameters [PolicyAssignment] Policy assignment.
802
+ # @param policy_assignment_id [String] The ID of the policy assignment to
803
+ # create. Use the format
804
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
805
+ # @param parameters [PolicyAssignment] Parameters for policy assignment.
793
806
  # @param [Hash{String => String}] A hash of custom headers that will be added
794
807
  # to the HTTP request.
795
808
  #
@@ -799,7 +812,6 @@ module Azure::ARM::Policy
799
812
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
800
813
  fail ArgumentError, 'parameters is nil' if parameters.nil?
801
814
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
802
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
803
815
 
804
816
 
805
817
  request_headers = {}
@@ -821,7 +833,6 @@ module Azure::ARM::Policy
821
833
 
822
834
  options = {
823
835
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
824
- path_params: {'subscriptionId' => @client.subscription_id},
825
836
  skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
826
837
  query_params: {'api-version' => @client.api_version},
827
838
  body: request_content,
@@ -858,9 +869,18 @@ module Azure::ARM::Policy
858
869
  end
859
870
 
860
871
  #
861
- # Get single policy assignment.
872
+ # Gets a policy assignment by ID.
862
873
  #
863
- # @param policy_assignment_id [String] Policy assignment Id
874
+ # When providing a scope for the assigment, use
875
+ # '/subscriptions/{subscription-id}/' for subscriptions,
876
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
877
+ # resource groups, and
878
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
879
+ # for resources.
880
+ #
881
+ # @param policy_assignment_id [String] The ID of the policy assignment to get.
882
+ # Use the format
883
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
864
884
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
865
885
  # will be added to the HTTP request.
866
886
  #
@@ -872,9 +892,18 @@ module Azure::ARM::Policy
872
892
  end
873
893
 
874
894
  #
875
- # Get single policy assignment.
895
+ # Gets a policy assignment by ID.
896
+ #
897
+ # When providing a scope for the assigment, use
898
+ # '/subscriptions/{subscription-id}/' for subscriptions,
899
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
900
+ # resource groups, and
901
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
902
+ # for resources.
876
903
  #
877
- # @param policy_assignment_id [String] Policy assignment Id
904
+ # @param policy_assignment_id [String] The ID of the policy assignment to get.
905
+ # Use the format
906
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
878
907
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
879
908
  # will be added to the HTTP request.
880
909
  #
@@ -885,9 +914,18 @@ module Azure::ARM::Policy
885
914
  end
886
915
 
887
916
  #
888
- # Get single policy assignment.
917
+ # Gets a policy assignment by ID.
889
918
  #
890
- # @param policy_assignment_id [String] Policy assignment Id
919
+ # When providing a scope for the assigment, use
920
+ # '/subscriptions/{subscription-id}/' for subscriptions,
921
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
922
+ # resource groups, and
923
+ # '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
924
+ # for resources.
925
+ #
926
+ # @param policy_assignment_id [String] The ID of the policy assignment to get.
927
+ # Use the format
928
+ # '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
891
929
  # @param [Hash{String => String}] A hash of custom headers that will be added
892
930
  # to the HTTP request.
893
931
  #
@@ -896,7 +934,6 @@ module Azure::ARM::Policy
896
934
  def get_by_id_async(policy_assignment_id, custom_headers = nil)
897
935
  fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil?
898
936
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
899
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
900
937
 
901
938
 
902
939
  request_headers = {}
@@ -910,7 +947,6 @@ module Azure::ARM::Policy
910
947
 
911
948
  options = {
912
949
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
913
- path_params: {'subscriptionId' => @client.subscription_id},
914
950
  skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id},
915
951
  query_params: {'api-version' => @client.api_version},
916
952
  headers: request_headers.merge(custom_headers || {}),
@@ -946,10 +982,10 @@ module Azure::ARM::Policy
946
982
  end
947
983
 
948
984
  #
949
- # Gets policy assignments of the resource group.
985
+ # Gets policy assignments for the resource group.
950
986
  #
951
- # @param next_page_link [String] The NextLink from the previous successful
952
- # call to List operation.
987
+ # @param next_page_link [String] The NextLink from the previous successful call
988
+ # to List operation.
953
989
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
954
990
  # will be added to the HTTP request.
955
991
  #
@@ -961,10 +997,10 @@ module Azure::ARM::Policy
961
997
  end
962
998
 
963
999
  #
964
- # Gets policy assignments of the resource group.
1000
+ # Gets policy assignments for the resource group.
965
1001
  #
966
- # @param next_page_link [String] The NextLink from the previous successful
967
- # call to List operation.
1002
+ # @param next_page_link [String] The NextLink from the previous successful call
1003
+ # to List operation.
968
1004
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
969
1005
  # will be added to the HTTP request.
970
1006
  #
@@ -975,10 +1011,10 @@ module Azure::ARM::Policy
975
1011
  end
976
1012
 
977
1013
  #
978
- # Gets policy assignments of the resource group.
1014
+ # Gets policy assignments for the resource group.
979
1015
  #
980
- # @param next_page_link [String] The NextLink from the previous successful
981
- # call to List operation.
1016
+ # @param next_page_link [String] The NextLink from the previous successful call
1017
+ # to List operation.
982
1018
  # @param [Hash{String => String}] A hash of custom headers that will be added
983
1019
  # to the HTTP request.
984
1020
  #
@@ -1033,10 +1069,10 @@ module Azure::ARM::Policy
1033
1069
  end
1034
1070
 
1035
1071
  #
1036
- # Gets policy assignments of the resource.
1072
+ # Gets policy assignments for a resource.
1037
1073
  #
1038
- # @param next_page_link [String] The NextLink from the previous successful
1039
- # call to List operation.
1074
+ # @param next_page_link [String] The NextLink from the previous successful call
1075
+ # to List operation.
1040
1076
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1041
1077
  # will be added to the HTTP request.
1042
1078
  #
@@ -1048,10 +1084,10 @@ module Azure::ARM::Policy
1048
1084
  end
1049
1085
 
1050
1086
  #
1051
- # Gets policy assignments of the resource.
1087
+ # Gets policy assignments for a resource.
1052
1088
  #
1053
- # @param next_page_link [String] The NextLink from the previous successful
1054
- # call to List operation.
1089
+ # @param next_page_link [String] The NextLink from the previous successful call
1090
+ # to List operation.
1055
1091
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1056
1092
  # will be added to the HTTP request.
1057
1093
  #
@@ -1062,10 +1098,10 @@ module Azure::ARM::Policy
1062
1098
  end
1063
1099
 
1064
1100
  #
1065
- # Gets policy assignments of the resource.
1101
+ # Gets policy assignments for a resource.
1066
1102
  #
1067
- # @param next_page_link [String] The NextLink from the previous successful
1068
- # call to List operation.
1103
+ # @param next_page_link [String] The NextLink from the previous successful call
1104
+ # to List operation.
1069
1105
  # @param [Hash{String => String}] A hash of custom headers that will be added
1070
1106
  # to the HTTP request.
1071
1107
  #
@@ -1120,10 +1156,10 @@ module Azure::ARM::Policy
1120
1156
  end
1121
1157
 
1122
1158
  #
1123
- # Gets all the policy assignments of a subscription.
1159
+ # Gets all the policy assignments for a subscription.
1124
1160
  #
1125
- # @param next_page_link [String] The NextLink from the previous successful
1126
- # call to List operation.
1161
+ # @param next_page_link [String] The NextLink from the previous successful call
1162
+ # to List operation.
1127
1163
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1128
1164
  # will be added to the HTTP request.
1129
1165
  #
@@ -1135,10 +1171,10 @@ module Azure::ARM::Policy
1135
1171
  end
1136
1172
 
1137
1173
  #
1138
- # Gets all the policy assignments of a subscription.
1174
+ # Gets all the policy assignments for a subscription.
1139
1175
  #
1140
- # @param next_page_link [String] The NextLink from the previous successful
1141
- # call to List operation.
1176
+ # @param next_page_link [String] The NextLink from the previous successful call
1177
+ # to List operation.
1142
1178
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1143
1179
  # will be added to the HTTP request.
1144
1180
  #
@@ -1149,10 +1185,10 @@ module Azure::ARM::Policy
1149
1185
  end
1150
1186
 
1151
1187
  #
1152
- # Gets all the policy assignments of a subscription.
1188
+ # Gets all the policy assignments for a subscription.
1153
1189
  #
1154
- # @param next_page_link [String] The NextLink from the previous successful
1155
- # call to List operation.
1190
+ # @param next_page_link [String] The NextLink from the previous successful call
1191
+ # to List operation.
1156
1192
  # @param [Hash{String => String}] A hash of custom headers that will be added
1157
1193
  # to the HTTP request.
1158
1194
  #
@@ -1206,5 +1242,78 @@ module Azure::ARM::Policy
1206
1242
  promise.execute
1207
1243
  end
1208
1244
 
1245
+ #
1246
+ # Gets policy assignments for the resource group.
1247
+ #
1248
+ # @param resource_group_name [String] The name of the resource group that
1249
+ # contains policy assignments.
1250
+ # @param filter [String] The filter to apply on the operation.
1251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1252
+ # will be added to the HTTP request.
1253
+ #
1254
+ # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1255
+ # the response.
1256
+ #
1257
+ def list_for_resource_group_as_lazy(resource_group_name, filter = nil, custom_headers = nil)
1258
+ response = list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
1259
+ unless response.nil?
1260
+ page = response.body
1261
+ page.next_method = Proc.new do |next_page_link|
1262
+ list_for_resource_group_next_async(next_page_link, custom_headers)
1263
+ end
1264
+ page
1265
+ end
1266
+ end
1267
+
1268
+ #
1269
+ # Gets policy assignments for a resource.
1270
+ #
1271
+ # @param resource_group_name [String] The name of the resource group containing
1272
+ # the resource. The name is case insensitive.
1273
+ # @param resource_provider_namespace [String] The namespace of the resource
1274
+ # provider.
1275
+ # @param parent_resource_path [String] The parent resource path.
1276
+ # @param resource_type [String] The resource type.
1277
+ # @param resource_name [String] The name of the resource with policy
1278
+ # assignments.
1279
+ # @param filter [String] The filter to apply on the operation.
1280
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1281
+ # will be added to the HTTP request.
1282
+ #
1283
+ # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1284
+ # the response.
1285
+ #
1286
+ def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
1287
+ response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
1288
+ unless response.nil?
1289
+ page = response.body
1290
+ page.next_method = Proc.new do |next_page_link|
1291
+ list_for_resource_next_async(next_page_link, custom_headers)
1292
+ end
1293
+ page
1294
+ end
1295
+ end
1296
+
1297
+ #
1298
+ # Gets all the policy assignments for a subscription.
1299
+ #
1300
+ # @param filter [String] The filter to apply on the operation.
1301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1302
+ # will be added to the HTTP request.
1303
+ #
1304
+ # @return [PolicyAssignmentListResult] which provide lazy access to pages of
1305
+ # the response.
1306
+ #
1307
+ def list_as_lazy(filter = nil, custom_headers = nil)
1308
+ response = list_async(filter, custom_headers).value!
1309
+ unless response.nil?
1310
+ page = response.body
1311
+ page.next_method = Proc.new do |next_page_link|
1312
+ list_next_async(next_page_link, custom_headers)
1313
+ end
1314
+ page
1315
+ end
1316
+ end
1317
+
1209
1318
  end
1210
1319
  end