azure_mgmt_authorization 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/azure_mgmt_authorization.gemspec +1 -1
- data/lib/azure_mgmt_authorization/authorization_management_client.rb +1 -1
- data/lib/azure_mgmt_authorization/classic_administrators.rb +71 -11
- data/lib/azure_mgmt_authorization/models/classic_administrator.rb +1 -1
- data/lib/azure_mgmt_authorization/models/classic_administrator_list_result.rb +1 -1
- data/lib/azure_mgmt_authorization/models/classic_administrator_properties.rb +1 -1
- data/lib/azure_mgmt_authorization/models/permission.rb +1 -1
- data/lib/azure_mgmt_authorization/models/permission_get_result.rb +1 -1
- data/lib/azure_mgmt_authorization/models/provider_operation.rb +1 -1
- data/lib/azure_mgmt_authorization/models/provider_operations_metadata.rb +1 -1
- data/lib/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +1 -1
- data/lib/azure_mgmt_authorization/models/resource_type.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment_filter.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment_list_result.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment_properties.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_definition.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_definition_filter.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_definition_list_result.rb +1 -1
- data/lib/azure_mgmt_authorization/models/role_definition_properties.rb +1 -1
- data/lib/azure_mgmt_authorization/module_definition.rb +1 -1
- data/lib/azure_mgmt_authorization/permissions.rb +153 -21
- data/lib/azure_mgmt_authorization/provider_operations_metadata_operations.rb +115 -18
- data/lib/azure_mgmt_authorization/role_assignments.rb +511 -73
- data/lib/azure_mgmt_authorization/role_definitions.rb +222 -32
- data/lib/azure_mgmt_authorization/version.rb +2 -2
- data/lib/azure_mgmt_authorization.rb +1 -1
- metadata +25 -20
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -31,13 +31,49 @@ module Azure::ARM::Authorization
|
|
31
31
|
# @param resource_type [String] Resource identity.
|
32
32
|
# @param resource_name [String] Resource identity.
|
33
33
|
# @param filter [String] The filter to apply on the operation.
|
34
|
-
# @param [Hash{String => String}]
|
35
|
-
#
|
34
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
|
+
# will be added to the HTTP request.
|
36
36
|
#
|
37
|
-
# @return [
|
38
|
-
# response.
|
37
|
+
# @return [RoleAssignmentListResult] operation results.
|
39
38
|
#
|
40
39
|
def list_for_resource(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
|
40
|
+
response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
|
41
|
+
response.body unless response.nil?
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# Gets role assignments of the resource.
|
46
|
+
#
|
47
|
+
# @param resource_group_name [String] The name of the resource group.
|
48
|
+
# @param resource_provider_namespace [String] Resource identity.
|
49
|
+
# @param parent_resource_path [String] Resource identity.
|
50
|
+
# @param resource_type [String] Resource identity.
|
51
|
+
# @param resource_name [String] Resource identity.
|
52
|
+
# @param filter [String] The filter to apply on the operation.
|
53
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
54
|
+
# will be added to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
57
|
+
#
|
58
|
+
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)
|
59
|
+
list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter, custom_headers).value!
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Gets role assignments of the resource.
|
64
|
+
#
|
65
|
+
# @param resource_group_name [String] The name of the resource group.
|
66
|
+
# @param resource_provider_namespace [String] Resource identity.
|
67
|
+
# @param parent_resource_path [String] Resource identity.
|
68
|
+
# @param resource_type [String] Resource identity.
|
69
|
+
# @param resource_name [String] Resource identity.
|
70
|
+
# @param filter [String] The filter to apply on the operation.
|
71
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
72
|
+
# to the HTTP request.
|
73
|
+
#
|
74
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
75
|
+
#
|
76
|
+
def list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter = nil, custom_headers = nil)
|
41
77
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
42
78
|
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
43
79
|
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
@@ -58,7 +94,10 @@ module Azure::ARM::Authorization
|
|
58
94
|
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
59
95
|
headers: request_headers.merge(custom_headers || {})
|
60
96
|
}
|
61
|
-
|
97
|
+
|
98
|
+
request_url = @base_url || @client.base_url
|
99
|
+
|
100
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
62
101
|
promise = request.run_promise do |req|
|
63
102
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
64
103
|
end
|
@@ -98,13 +137,41 @@ module Azure::ARM::Authorization
|
|
98
137
|
#
|
99
138
|
# @param resource_group_name [String] Resource group name.
|
100
139
|
# @param filter [String] The filter to apply on the operation.
|
101
|
-
# @param [Hash{String => String}]
|
102
|
-
#
|
140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
|
+
# will be added to the HTTP request.
|
103
142
|
#
|
104
|
-
# @return [
|
105
|
-
# response.
|
143
|
+
# @return [RoleAssignmentListResult] operation results.
|
106
144
|
#
|
107
145
|
def list_for_resource_group(resource_group_name, filter = nil, custom_headers = nil)
|
146
|
+
response = list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
|
147
|
+
response.body unless response.nil?
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Gets role assignments of the resource group.
|
152
|
+
#
|
153
|
+
# @param resource_group_name [String] Resource group name.
|
154
|
+
# @param filter [String] The filter to apply on the operation.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
159
|
+
#
|
160
|
+
def list_for_resource_group_with_http_info(resource_group_name, filter = nil, custom_headers = nil)
|
161
|
+
list_for_resource_group_async(resource_group_name, filter, custom_headers).value!
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
# Gets role assignments of the resource group.
|
166
|
+
#
|
167
|
+
# @param resource_group_name [String] Resource group name.
|
168
|
+
# @param filter [String] The filter to apply on the operation.
|
169
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
170
|
+
# to the HTTP request.
|
171
|
+
#
|
172
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
173
|
+
#
|
174
|
+
def list_for_resource_group_async(resource_group_name, filter = nil, custom_headers = nil)
|
108
175
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
109
176
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
110
177
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
@@ -120,7 +187,10 @@ module Azure::ARM::Authorization
|
|
120
187
|
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
121
188
|
headers: request_headers.merge(custom_headers || {})
|
122
189
|
}
|
123
|
-
|
190
|
+
|
191
|
+
request_url = @base_url || @client.base_url
|
192
|
+
|
193
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
124
194
|
promise = request.run_promise do |req|
|
125
195
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
126
196
|
end
|
@@ -160,13 +230,41 @@ module Azure::ARM::Authorization
|
|
160
230
|
#
|
161
231
|
# @param scope [String] Scope.
|
162
232
|
# @param role_assignment_name [String] Role assignment name.
|
163
|
-
# @param [Hash{String => String}]
|
164
|
-
#
|
233
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
234
|
+
# will be added to the HTTP request.
|
165
235
|
#
|
166
|
-
# @return [
|
167
|
-
# response.
|
236
|
+
# @return [RoleAssignment] operation results.
|
168
237
|
#
|
169
238
|
def delete(scope, role_assignment_name, custom_headers = nil)
|
239
|
+
response = delete_async(scope, role_assignment_name, custom_headers).value!
|
240
|
+
response.body unless response.nil?
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Delete role assignment.
|
245
|
+
#
|
246
|
+
# @param scope [String] Scope.
|
247
|
+
# @param role_assignment_name [String] Role assignment name.
|
248
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
249
|
+
# will be added to the HTTP request.
|
250
|
+
#
|
251
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
252
|
+
#
|
253
|
+
def delete_with_http_info(scope, role_assignment_name, custom_headers = nil)
|
254
|
+
delete_async(scope, role_assignment_name, custom_headers).value!
|
255
|
+
end
|
256
|
+
|
257
|
+
#
|
258
|
+
# Delete role assignment.
|
259
|
+
#
|
260
|
+
# @param scope [String] Scope.
|
261
|
+
# @param role_assignment_name [String] Role assignment name.
|
262
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
263
|
+
# to the HTTP request.
|
264
|
+
#
|
265
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
266
|
+
#
|
267
|
+
def delete_async(scope, role_assignment_name, custom_headers = nil)
|
170
268
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
171
269
|
fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
|
172
270
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -183,7 +281,10 @@ module Azure::ARM::Authorization
|
|
183
281
|
query_params: {'api-version' => @client.api_version},
|
184
282
|
headers: request_headers.merge(custom_headers || {})
|
185
283
|
}
|
186
|
-
|
284
|
+
|
285
|
+
request_url = @base_url || @client.base_url
|
286
|
+
|
287
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
187
288
|
promise = request.run_promise do |req|
|
188
289
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
189
290
|
end
|
@@ -224,13 +325,43 @@ module Azure::ARM::Authorization
|
|
224
325
|
# @param scope [String] Scope.
|
225
326
|
# @param role_assignment_name [String] Role assignment name.
|
226
327
|
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
227
|
-
# @param [Hash{String => String}]
|
228
|
-
#
|
328
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
329
|
+
# will be added to the HTTP request.
|
229
330
|
#
|
230
|
-
# @return [
|
231
|
-
# response.
|
331
|
+
# @return [RoleAssignment] operation results.
|
232
332
|
#
|
233
333
|
def create(scope, role_assignment_name, parameters, custom_headers = nil)
|
334
|
+
response = create_async(scope, role_assignment_name, parameters, custom_headers).value!
|
335
|
+
response.body unless response.nil?
|
336
|
+
end
|
337
|
+
|
338
|
+
#
|
339
|
+
# Create role assignment.
|
340
|
+
#
|
341
|
+
# @param scope [String] Scope.
|
342
|
+
# @param role_assignment_name [String] Role assignment name.
|
343
|
+
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
344
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
345
|
+
# will be added to the HTTP request.
|
346
|
+
#
|
347
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
348
|
+
#
|
349
|
+
def create_with_http_info(scope, role_assignment_name, parameters, custom_headers = nil)
|
350
|
+
create_async(scope, role_assignment_name, parameters, custom_headers).value!
|
351
|
+
end
|
352
|
+
|
353
|
+
#
|
354
|
+
# Create role assignment.
|
355
|
+
#
|
356
|
+
# @param scope [String] Scope.
|
357
|
+
# @param role_assignment_name [String] Role assignment name.
|
358
|
+
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
359
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
360
|
+
# to the HTTP request.
|
361
|
+
#
|
362
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
363
|
+
#
|
364
|
+
def create_async(scope, role_assignment_name, parameters, custom_headers = nil)
|
234
365
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
235
366
|
fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
|
236
367
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
@@ -247,7 +378,7 @@ module Azure::ARM::Authorization
|
|
247
378
|
unless parameters.nil?
|
248
379
|
parameters = RoleAssignmentCreateParameters.serialize_object(parameters)
|
249
380
|
end
|
250
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
381
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
251
382
|
path_template = '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'
|
252
383
|
options = {
|
253
384
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -257,7 +388,10 @@ module Azure::ARM::Authorization
|
|
257
388
|
body: request_content,
|
258
389
|
headers: request_headers.merge(custom_headers || {})
|
259
390
|
}
|
260
|
-
|
391
|
+
|
392
|
+
request_url = @base_url || @client.base_url
|
393
|
+
|
394
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
261
395
|
promise = request.run_promise do |req|
|
262
396
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
263
397
|
end
|
@@ -297,13 +431,41 @@ module Azure::ARM::Authorization
|
|
297
431
|
#
|
298
432
|
# @param scope [String] Scope.
|
299
433
|
# @param role_assignment_name [String] Role assignment name.
|
300
|
-
# @param [Hash{String => String}]
|
301
|
-
#
|
434
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
435
|
+
# will be added to the HTTP request.
|
302
436
|
#
|
303
|
-
# @return [
|
304
|
-
# response.
|
437
|
+
# @return [RoleAssignment] operation results.
|
305
438
|
#
|
306
439
|
def get(scope, role_assignment_name, custom_headers = nil)
|
440
|
+
response = get_async(scope, role_assignment_name, custom_headers).value!
|
441
|
+
response.body unless response.nil?
|
442
|
+
end
|
443
|
+
|
444
|
+
#
|
445
|
+
# Get single role assignment.
|
446
|
+
#
|
447
|
+
# @param scope [String] Scope.
|
448
|
+
# @param role_assignment_name [String] Role assignment name.
|
449
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
450
|
+
# will be added to the HTTP request.
|
451
|
+
#
|
452
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
453
|
+
#
|
454
|
+
def get_with_http_info(scope, role_assignment_name, custom_headers = nil)
|
455
|
+
get_async(scope, role_assignment_name, custom_headers).value!
|
456
|
+
end
|
457
|
+
|
458
|
+
#
|
459
|
+
# Get single role assignment.
|
460
|
+
#
|
461
|
+
# @param scope [String] Scope.
|
462
|
+
# @param role_assignment_name [String] Role assignment name.
|
463
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
464
|
+
# to the HTTP request.
|
465
|
+
#
|
466
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
467
|
+
#
|
468
|
+
def get_async(scope, role_assignment_name, custom_headers = nil)
|
307
469
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
308
470
|
fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
|
309
471
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -320,7 +482,10 @@ module Azure::ARM::Authorization
|
|
320
482
|
query_params: {'api-version' => @client.api_version},
|
321
483
|
headers: request_headers.merge(custom_headers || {})
|
322
484
|
}
|
323
|
-
|
485
|
+
|
486
|
+
request_url = @base_url || @client.base_url
|
487
|
+
|
488
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
324
489
|
promise = request.run_promise do |req|
|
325
490
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
326
491
|
end
|
@@ -359,13 +524,39 @@ module Azure::ARM::Authorization
|
|
359
524
|
# Delete role assignment.
|
360
525
|
#
|
361
526
|
# @param role_assignment_id [String] Role assignment Id
|
362
|
-
# @param [Hash{String => String}]
|
363
|
-
#
|
527
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
528
|
+
# will be added to the HTTP request.
|
364
529
|
#
|
365
|
-
# @return [
|
366
|
-
# response.
|
530
|
+
# @return [RoleAssignment] operation results.
|
367
531
|
#
|
368
532
|
def delete_by_id(role_assignment_id, custom_headers = nil)
|
533
|
+
response = delete_by_id_async(role_assignment_id, custom_headers).value!
|
534
|
+
response.body unless response.nil?
|
535
|
+
end
|
536
|
+
|
537
|
+
#
|
538
|
+
# Delete role assignment.
|
539
|
+
#
|
540
|
+
# @param role_assignment_id [String] Role assignment Id
|
541
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
542
|
+
# will be added to the HTTP request.
|
543
|
+
#
|
544
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
545
|
+
#
|
546
|
+
def delete_by_id_with_http_info(role_assignment_id, custom_headers = nil)
|
547
|
+
delete_by_id_async(role_assignment_id, custom_headers).value!
|
548
|
+
end
|
549
|
+
|
550
|
+
#
|
551
|
+
# Delete role assignment.
|
552
|
+
#
|
553
|
+
# @param role_assignment_id [String] Role assignment Id
|
554
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
555
|
+
# to the HTTP request.
|
556
|
+
#
|
557
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
558
|
+
#
|
559
|
+
def delete_by_id_async(role_assignment_id, custom_headers = nil)
|
369
560
|
fail ArgumentError, 'role_assignment_id is nil' if role_assignment_id.nil?
|
370
561
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
371
562
|
request_headers = {}
|
@@ -380,7 +571,10 @@ module Azure::ARM::Authorization
|
|
380
571
|
query_params: {'api-version' => @client.api_version},
|
381
572
|
headers: request_headers.merge(custom_headers || {})
|
382
573
|
}
|
383
|
-
|
574
|
+
|
575
|
+
request_url = @base_url || @client.base_url
|
576
|
+
|
577
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
384
578
|
promise = request.run_promise do |req|
|
385
579
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
386
580
|
end
|
@@ -420,13 +614,41 @@ module Azure::ARM::Authorization
|
|
420
614
|
#
|
421
615
|
# @param role_assignment_id [String] Role assignment Id
|
422
616
|
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
423
|
-
# @param [Hash{String => String}]
|
424
|
-
#
|
617
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
618
|
+
# will be added to the HTTP request.
|
425
619
|
#
|
426
|
-
# @return [
|
427
|
-
# response.
|
620
|
+
# @return [RoleAssignment] operation results.
|
428
621
|
#
|
429
622
|
def create_by_id(role_assignment_id, parameters, custom_headers = nil)
|
623
|
+
response = create_by_id_async(role_assignment_id, parameters, custom_headers).value!
|
624
|
+
response.body unless response.nil?
|
625
|
+
end
|
626
|
+
|
627
|
+
#
|
628
|
+
# Create role assignment by Id.
|
629
|
+
#
|
630
|
+
# @param role_assignment_id [String] Role assignment Id
|
631
|
+
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
632
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
633
|
+
# will be added to the HTTP request.
|
634
|
+
#
|
635
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
636
|
+
#
|
637
|
+
def create_by_id_with_http_info(role_assignment_id, parameters, custom_headers = nil)
|
638
|
+
create_by_id_async(role_assignment_id, parameters, custom_headers).value!
|
639
|
+
end
|
640
|
+
|
641
|
+
#
|
642
|
+
# Create role assignment by Id.
|
643
|
+
#
|
644
|
+
# @param role_assignment_id [String] Role assignment Id
|
645
|
+
# @param parameters [RoleAssignmentCreateParameters] Role assignment.
|
646
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
647
|
+
# to the HTTP request.
|
648
|
+
#
|
649
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
650
|
+
#
|
651
|
+
def create_by_id_async(role_assignment_id, parameters, custom_headers = nil)
|
430
652
|
fail ArgumentError, 'role_assignment_id is nil' if role_assignment_id.nil?
|
431
653
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
432
654
|
parameters.validate unless parameters.nil?
|
@@ -442,7 +664,7 @@ module Azure::ARM::Authorization
|
|
442
664
|
unless parameters.nil?
|
443
665
|
parameters = RoleAssignmentCreateParameters.serialize_object(parameters)
|
444
666
|
end
|
445
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
667
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
446
668
|
path_template = '/{roleAssignmentId}'
|
447
669
|
options = {
|
448
670
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -451,7 +673,10 @@ module Azure::ARM::Authorization
|
|
451
673
|
body: request_content,
|
452
674
|
headers: request_headers.merge(custom_headers || {})
|
453
675
|
}
|
454
|
-
|
676
|
+
|
677
|
+
request_url = @base_url || @client.base_url
|
678
|
+
|
679
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
455
680
|
promise = request.run_promise do |req|
|
456
681
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
457
682
|
end
|
@@ -490,13 +715,39 @@ module Azure::ARM::Authorization
|
|
490
715
|
# Get single role assignment.
|
491
716
|
#
|
492
717
|
# @param role_assignment_id [String] Role assignment Id
|
493
|
-
# @param [Hash{String => String}]
|
494
|
-
#
|
718
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
719
|
+
# will be added to the HTTP request.
|
495
720
|
#
|
496
|
-
# @return [
|
497
|
-
# response.
|
721
|
+
# @return [RoleAssignment] operation results.
|
498
722
|
#
|
499
723
|
def get_by_id(role_assignment_id, custom_headers = nil)
|
724
|
+
response = get_by_id_async(role_assignment_id, custom_headers).value!
|
725
|
+
response.body unless response.nil?
|
726
|
+
end
|
727
|
+
|
728
|
+
#
|
729
|
+
# Get single role assignment.
|
730
|
+
#
|
731
|
+
# @param role_assignment_id [String] Role assignment Id
|
732
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
733
|
+
# will be added to the HTTP request.
|
734
|
+
#
|
735
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
736
|
+
#
|
737
|
+
def get_by_id_with_http_info(role_assignment_id, custom_headers = nil)
|
738
|
+
get_by_id_async(role_assignment_id, custom_headers).value!
|
739
|
+
end
|
740
|
+
|
741
|
+
#
|
742
|
+
# Get single role assignment.
|
743
|
+
#
|
744
|
+
# @param role_assignment_id [String] Role assignment Id
|
745
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
746
|
+
# to the HTTP request.
|
747
|
+
#
|
748
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
749
|
+
#
|
750
|
+
def get_by_id_async(role_assignment_id, custom_headers = nil)
|
500
751
|
fail ArgumentError, 'role_assignment_id is nil' if role_assignment_id.nil?
|
501
752
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
502
753
|
request_headers = {}
|
@@ -511,7 +762,10 @@ module Azure::ARM::Authorization
|
|
511
762
|
query_params: {'api-version' => @client.api_version},
|
512
763
|
headers: request_headers.merge(custom_headers || {})
|
513
764
|
}
|
514
|
-
|
765
|
+
|
766
|
+
request_url = @base_url || @client.base_url
|
767
|
+
|
768
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
515
769
|
promise = request.run_promise do |req|
|
516
770
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
517
771
|
end
|
@@ -550,13 +804,39 @@ module Azure::ARM::Authorization
|
|
550
804
|
# Gets role assignments of the subscription.
|
551
805
|
#
|
552
806
|
# @param filter [String] The filter to apply on the operation.
|
553
|
-
# @param [Hash{String => String}]
|
554
|
-
#
|
807
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
808
|
+
# will be added to the HTTP request.
|
555
809
|
#
|
556
|
-
# @return [
|
557
|
-
# response.
|
810
|
+
# @return [RoleAssignmentListResult] operation results.
|
558
811
|
#
|
559
812
|
def list(filter = nil, custom_headers = nil)
|
813
|
+
response = list_async(filter, custom_headers).value!
|
814
|
+
response.body unless response.nil?
|
815
|
+
end
|
816
|
+
|
817
|
+
#
|
818
|
+
# Gets role assignments of the subscription.
|
819
|
+
#
|
820
|
+
# @param filter [String] The filter to apply on the operation.
|
821
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
822
|
+
# will be added to the HTTP request.
|
823
|
+
#
|
824
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
825
|
+
#
|
826
|
+
def list_with_http_info(filter = nil, custom_headers = nil)
|
827
|
+
list_async(filter, custom_headers).value!
|
828
|
+
end
|
829
|
+
|
830
|
+
#
|
831
|
+
# Gets role assignments of the subscription.
|
832
|
+
#
|
833
|
+
# @param filter [String] The filter to apply on the operation.
|
834
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
835
|
+
# to the HTTP request.
|
836
|
+
#
|
837
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
838
|
+
#
|
839
|
+
def list_async(filter = nil, custom_headers = nil)
|
560
840
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
561
841
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
562
842
|
request_headers = {}
|
@@ -571,7 +851,10 @@ module Azure::ARM::Authorization
|
|
571
851
|
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
572
852
|
headers: request_headers.merge(custom_headers || {})
|
573
853
|
}
|
574
|
-
|
854
|
+
|
855
|
+
request_url = @base_url || @client.base_url
|
856
|
+
|
857
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
575
858
|
promise = request.run_promise do |req|
|
576
859
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
577
860
|
end
|
@@ -611,13 +894,41 @@ module Azure::ARM::Authorization
|
|
611
894
|
#
|
612
895
|
# @param scope [String] Scope.
|
613
896
|
# @param filter [String] The filter to apply on the operation.
|
614
|
-
# @param [Hash{String => String}]
|
615
|
-
#
|
897
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
898
|
+
# will be added to the HTTP request.
|
616
899
|
#
|
617
|
-
# @return [
|
618
|
-
# response.
|
900
|
+
# @return [RoleAssignmentListResult] operation results.
|
619
901
|
#
|
620
902
|
def list_for_scope(scope, filter = nil, custom_headers = nil)
|
903
|
+
response = list_for_scope_async(scope, filter, custom_headers).value!
|
904
|
+
response.body unless response.nil?
|
905
|
+
end
|
906
|
+
|
907
|
+
#
|
908
|
+
# Gets role assignments of the scope.
|
909
|
+
#
|
910
|
+
# @param scope [String] Scope.
|
911
|
+
# @param filter [String] The filter to apply on the operation.
|
912
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
913
|
+
# will be added to the HTTP request.
|
914
|
+
#
|
915
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
916
|
+
#
|
917
|
+
def list_for_scope_with_http_info(scope, filter = nil, custom_headers = nil)
|
918
|
+
list_for_scope_async(scope, filter, custom_headers).value!
|
919
|
+
end
|
920
|
+
|
921
|
+
#
|
922
|
+
# Gets role assignments of the scope.
|
923
|
+
#
|
924
|
+
# @param scope [String] Scope.
|
925
|
+
# @param filter [String] The filter to apply on the operation.
|
926
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
927
|
+
# to the HTTP request.
|
928
|
+
#
|
929
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
930
|
+
#
|
931
|
+
def list_for_scope_async(scope, filter = nil, custom_headers = nil)
|
621
932
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
622
933
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
623
934
|
request_headers = {}
|
@@ -632,7 +943,10 @@ module Azure::ARM::Authorization
|
|
632
943
|
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
633
944
|
headers: request_headers.merge(custom_headers || {})
|
634
945
|
}
|
635
|
-
|
946
|
+
|
947
|
+
request_url = @base_url || @client.base_url
|
948
|
+
|
949
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
636
950
|
promise = request.run_promise do |req|
|
637
951
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
638
952
|
end
|
@@ -672,13 +986,41 @@ module Azure::ARM::Authorization
|
|
672
986
|
#
|
673
987
|
# @param next_page_link [String] The NextLink from the previous successful
|
674
988
|
# call to List operation.
|
675
|
-
# @param [Hash{String => String}]
|
676
|
-
#
|
989
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
990
|
+
# will be added to the HTTP request.
|
677
991
|
#
|
678
|
-
# @return [
|
679
|
-
# response.
|
992
|
+
# @return [RoleAssignmentListResult] operation results.
|
680
993
|
#
|
681
994
|
def list_for_resource_next(next_page_link, custom_headers = nil)
|
995
|
+
response = list_for_resource_next_async(next_page_link, custom_headers).value!
|
996
|
+
response.body unless response.nil?
|
997
|
+
end
|
998
|
+
|
999
|
+
#
|
1000
|
+
# Gets role assignments of the resource.
|
1001
|
+
#
|
1002
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1003
|
+
# call to List operation.
|
1004
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1005
|
+
# will be added to the HTTP request.
|
1006
|
+
#
|
1007
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1008
|
+
#
|
1009
|
+
def list_for_resource_next_with_http_info(next_page_link, custom_headers = nil)
|
1010
|
+
list_for_resource_next_async(next_page_link, custom_headers).value!
|
1011
|
+
end
|
1012
|
+
|
1013
|
+
#
|
1014
|
+
# Gets role assignments of the resource.
|
1015
|
+
#
|
1016
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1017
|
+
# call to List operation.
|
1018
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1019
|
+
# to the HTTP request.
|
1020
|
+
#
|
1021
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1022
|
+
#
|
1023
|
+
def list_for_resource_next_async(next_page_link, custom_headers = nil)
|
682
1024
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
683
1025
|
request_headers = {}
|
684
1026
|
|
@@ -691,7 +1033,10 @@ module Azure::ARM::Authorization
|
|
691
1033
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
692
1034
|
headers: request_headers.merge(custom_headers || {})
|
693
1035
|
}
|
694
|
-
|
1036
|
+
|
1037
|
+
request_url = @base_url || @client.base_url
|
1038
|
+
|
1039
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
695
1040
|
promise = request.run_promise do |req|
|
696
1041
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
697
1042
|
end
|
@@ -731,13 +1076,41 @@ module Azure::ARM::Authorization
|
|
731
1076
|
#
|
732
1077
|
# @param next_page_link [String] The NextLink from the previous successful
|
733
1078
|
# call to List operation.
|
734
|
-
# @param [Hash{String => String}]
|
735
|
-
#
|
1079
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1080
|
+
# will be added to the HTTP request.
|
736
1081
|
#
|
737
|
-
# @return [
|
738
|
-
# response.
|
1082
|
+
# @return [RoleAssignmentListResult] operation results.
|
739
1083
|
#
|
740
1084
|
def list_for_resource_group_next(next_page_link, custom_headers = nil)
|
1085
|
+
response = list_for_resource_group_next_async(next_page_link, custom_headers).value!
|
1086
|
+
response.body unless response.nil?
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
#
|
1090
|
+
# Gets role assignments of the resource group.
|
1091
|
+
#
|
1092
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1093
|
+
# call to List operation.
|
1094
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1095
|
+
# will be added to the HTTP request.
|
1096
|
+
#
|
1097
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1098
|
+
#
|
1099
|
+
def list_for_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
1100
|
+
list_for_resource_group_next_async(next_page_link, custom_headers).value!
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
#
|
1104
|
+
# Gets role assignments of the resource group.
|
1105
|
+
#
|
1106
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1107
|
+
# call to List operation.
|
1108
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1109
|
+
# to the HTTP request.
|
1110
|
+
#
|
1111
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1112
|
+
#
|
1113
|
+
def list_for_resource_group_next_async(next_page_link, custom_headers = nil)
|
741
1114
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
742
1115
|
request_headers = {}
|
743
1116
|
|
@@ -750,7 +1123,10 @@ module Azure::ARM::Authorization
|
|
750
1123
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
751
1124
|
headers: request_headers.merge(custom_headers || {})
|
752
1125
|
}
|
753
|
-
|
1126
|
+
|
1127
|
+
request_url = @base_url || @client.base_url
|
1128
|
+
|
1129
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
754
1130
|
promise = request.run_promise do |req|
|
755
1131
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
756
1132
|
end
|
@@ -790,13 +1166,41 @@ module Azure::ARM::Authorization
|
|
790
1166
|
#
|
791
1167
|
# @param next_page_link [String] The NextLink from the previous successful
|
792
1168
|
# call to List operation.
|
793
|
-
# @param [Hash{String => String}]
|
794
|
-
#
|
1169
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1170
|
+
# will be added to the HTTP request.
|
795
1171
|
#
|
796
|
-
# @return [
|
797
|
-
# response.
|
1172
|
+
# @return [RoleAssignmentListResult] operation results.
|
798
1173
|
#
|
799
1174
|
def list_next(next_page_link, custom_headers = nil)
|
1175
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1176
|
+
response.body unless response.nil?
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
#
|
1180
|
+
# Gets role assignments of the subscription.
|
1181
|
+
#
|
1182
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1183
|
+
# call to List operation.
|
1184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1185
|
+
# will be added to the HTTP request.
|
1186
|
+
#
|
1187
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1188
|
+
#
|
1189
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1190
|
+
list_next_async(next_page_link, custom_headers).value!
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
#
|
1194
|
+
# Gets role assignments of the subscription.
|
1195
|
+
#
|
1196
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1197
|
+
# call to List operation.
|
1198
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1199
|
+
# to the HTTP request.
|
1200
|
+
#
|
1201
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1202
|
+
#
|
1203
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
800
1204
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
801
1205
|
request_headers = {}
|
802
1206
|
|
@@ -809,7 +1213,10 @@ module Azure::ARM::Authorization
|
|
809
1213
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
810
1214
|
headers: request_headers.merge(custom_headers || {})
|
811
1215
|
}
|
812
|
-
|
1216
|
+
|
1217
|
+
request_url = @base_url || @client.base_url
|
1218
|
+
|
1219
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
813
1220
|
promise = request.run_promise do |req|
|
814
1221
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
815
1222
|
end
|
@@ -849,13 +1256,41 @@ module Azure::ARM::Authorization
|
|
849
1256
|
#
|
850
1257
|
# @param next_page_link [String] The NextLink from the previous successful
|
851
1258
|
# call to List operation.
|
852
|
-
# @param [Hash{String => String}]
|
853
|
-
#
|
1259
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1260
|
+
# will be added to the HTTP request.
|
854
1261
|
#
|
855
|
-
# @return [
|
856
|
-
# response.
|
1262
|
+
# @return [RoleAssignmentListResult] operation results.
|
857
1263
|
#
|
858
1264
|
def list_for_scope_next(next_page_link, custom_headers = nil)
|
1265
|
+
response = list_for_scope_next_async(next_page_link, custom_headers).value!
|
1266
|
+
response.body unless response.nil?
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
#
|
1270
|
+
# Gets role assignments of the scope.
|
1271
|
+
#
|
1272
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1273
|
+
# call to List operation.
|
1274
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1275
|
+
# will be added to the HTTP request.
|
1276
|
+
#
|
1277
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1278
|
+
#
|
1279
|
+
def list_for_scope_next_with_http_info(next_page_link, custom_headers = nil)
|
1280
|
+
list_for_scope_next_async(next_page_link, custom_headers).value!
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
#
|
1284
|
+
# Gets role assignments of the scope.
|
1285
|
+
#
|
1286
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1287
|
+
# call to List operation.
|
1288
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1289
|
+
# to the HTTP request.
|
1290
|
+
#
|
1291
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1292
|
+
#
|
1293
|
+
def list_for_scope_next_async(next_page_link, custom_headers = nil)
|
859
1294
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
860
1295
|
request_headers = {}
|
861
1296
|
|
@@ -868,7 +1303,10 @@ module Azure::ARM::Authorization
|
|
868
1303
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
869
1304
|
headers: request_headers.merge(custom_headers || {})
|
870
1305
|
}
|
871
|
-
|
1306
|
+
|
1307
|
+
request_url = @base_url || @client.base_url
|
1308
|
+
|
1309
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
872
1310
|
promise = request.run_promise do |req|
|
873
1311
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
874
1312
|
end
|