azure_mgmt_resources_management 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +7 -6
- data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +28 -28
- data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +7 -6
- data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/{create_group_request.rb → create_management_group_request.rb} +4 -4
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management.rb +56 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/entities.rb +257 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +793 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +254 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +121 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +99 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management.rb +58 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/entities.rb +381 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +202 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +799 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +401 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +210 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +111 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/status.rb +20 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/tenant_backfill_status_result.rb +63 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/operations.rb +218 -0
- data/lib/azure_mgmt_resources_management.rb +3 -1
- data/lib/profiles/latest/modules/resourcesmanagement_profile_module.rb +99 -37
- data/lib/version.rb +1 -1
- metadata +72 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e5916291220346ee84c7b72b195abdb69974974
|
4
|
+
data.tar.gz: d564969c4445b1ee8b4c4ce698aece550efee736
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da5e5fc3d78ed8ac232c061559302cb2c659d112eb9ad0d2a8c1b0b59621c2912dd50a7f386abc13911fd2789df9a4fa6ee14f09292c3ed214da44a241ff925
|
7
|
+
data.tar.gz: 47dac4e9600dd99e08d4208fb39d91d63f94f5b151771a855fa3ba231214ab42f4840815117579d01b4c4b9dc55fa51e8bf96f55cdd7bbcc5f76c68c60e4d567
|
data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb
CHANGED
@@ -24,15 +24,16 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
|
|
24
24
|
# The current version is 2017-08-31-preview.
|
25
25
|
attr_reader :api_version
|
26
26
|
|
27
|
-
# @return [String]
|
27
|
+
# @return [String] The preferred language for the response.
|
28
28
|
attr_accessor :accept_language
|
29
29
|
|
30
|
-
# @return [Integer]
|
31
|
-
#
|
30
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
31
|
+
# Operations. Default value is 30.
|
32
32
|
attr_accessor :long_running_operation_retry_timeout
|
33
33
|
|
34
|
-
# @return [Boolean]
|
35
|
-
#
|
34
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
35
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
36
|
+
# generated and included in each request. Default is true.
|
36
37
|
attr_accessor :generate_client_request_id
|
37
38
|
|
38
39
|
# @return [ManagementGroups] management_groups
|
@@ -128,7 +129,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
|
|
128
129
|
#
|
129
130
|
def add_telemetry
|
130
131
|
sdk_information = 'azure_mgmt_resources_management'
|
131
|
-
sdk_information = "#{sdk_information}/0.
|
132
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
132
133
|
add_user_agent_information(sdk_information)
|
133
134
|
end
|
134
135
|
end
|
@@ -36,7 +36,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
36
36
|
autoload :ErrorResponse, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb'
|
37
37
|
autoload :ManagementGroup, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb'
|
38
38
|
autoload :ManagementGroupInfo, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb'
|
39
|
-
autoload :
|
39
|
+
autoload :CreateManagementGroupRequest, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb'
|
40
40
|
autoload :Operation, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb'
|
41
41
|
end
|
42
42
|
end
|
@@ -255,8 +255,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
255
255
|
#
|
256
256
|
#
|
257
257
|
# @param group_id [String] Management Group ID.
|
258
|
-
# @param
|
259
|
-
# parameters.
|
258
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
259
|
+
# Management group creation parameters.
|
260
260
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
261
261
|
# any caches.
|
262
262
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -264,8 +264,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
264
264
|
#
|
265
265
|
# @return [ManagementGroup] operation results.
|
266
266
|
#
|
267
|
-
def create_or_update(group_id,
|
268
|
-
response = create_or_update_async(group_id,
|
267
|
+
def create_or_update(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
268
|
+
response = create_or_update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
|
269
269
|
response.body unless response.nil?
|
270
270
|
end
|
271
271
|
|
@@ -277,8 +277,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
277
277
|
#
|
278
278
|
#
|
279
279
|
# @param group_id [String] Management Group ID.
|
280
|
-
# @param
|
281
|
-
# parameters.
|
280
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
281
|
+
# Management group creation parameters.
|
282
282
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
283
283
|
# any caches.
|
284
284
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -286,8 +286,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
286
286
|
#
|
287
287
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
288
288
|
#
|
289
|
-
def create_or_update_with_http_info(group_id,
|
290
|
-
create_or_update_async(group_id,
|
289
|
+
def create_or_update_with_http_info(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
290
|
+
create_or_update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
|
291
291
|
end
|
292
292
|
|
293
293
|
#
|
@@ -298,8 +298,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
298
298
|
#
|
299
299
|
#
|
300
300
|
# @param group_id [String] Management Group ID.
|
301
|
-
# @param
|
302
|
-
# parameters.
|
301
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
302
|
+
# Management group creation parameters.
|
303
303
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
304
304
|
# any caches.
|
305
305
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -307,10 +307,10 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
307
307
|
#
|
308
308
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
309
309
|
#
|
310
|
-
def create_or_update_async(group_id,
|
310
|
+
def create_or_update_async(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
311
311
|
fail ArgumentError, 'group_id is nil' if group_id.nil?
|
312
312
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
313
|
-
fail ArgumentError, '
|
313
|
+
fail ArgumentError, 'create_management_group_request is nil' if create_management_group_request.nil?
|
314
314
|
|
315
315
|
|
316
316
|
request_headers = {}
|
@@ -322,8 +322,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
322
322
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
323
323
|
|
324
324
|
# Serialize Request
|
325
|
-
request_mapper = Azure::ResourcesManagement::Mgmt::V2017_11_01_preview::Models::
|
326
|
-
request_content = @client.serialize(request_mapper,
|
325
|
+
request_mapper = Azure::ResourcesManagement::Mgmt::V2017_11_01_preview::Models::CreateManagementGroupRequest.mapper()
|
326
|
+
request_content = @client.serialize(request_mapper, create_management_group_request)
|
327
327
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
328
328
|
|
329
329
|
path_template = 'providers/Microsoft.Management/managementGroups/{groupId}'
|
@@ -372,8 +372,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
372
372
|
#
|
373
373
|
#
|
374
374
|
# @param group_id [String] Management Group ID.
|
375
|
-
# @param
|
376
|
-
# parameters.
|
375
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
376
|
+
# Management group creation parameters.
|
377
377
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
378
378
|
# any caches.
|
379
379
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -381,8 +381,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
381
381
|
#
|
382
382
|
# @return [ManagementGroup] operation results.
|
383
383
|
#
|
384
|
-
def update(group_id,
|
385
|
-
response = update_async(group_id,
|
384
|
+
def update(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
385
|
+
response = update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
|
386
386
|
response.body unless response.nil?
|
387
387
|
end
|
388
388
|
|
@@ -391,8 +391,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
391
391
|
#
|
392
392
|
#
|
393
393
|
# @param group_id [String] Management Group ID.
|
394
|
-
# @param
|
395
|
-
# parameters.
|
394
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
395
|
+
# Management group creation parameters.
|
396
396
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
397
397
|
# any caches.
|
398
398
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -400,8 +400,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
400
400
|
#
|
401
401
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
402
402
|
#
|
403
|
-
def update_with_http_info(group_id,
|
404
|
-
update_async(group_id,
|
403
|
+
def update_with_http_info(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
404
|
+
update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
|
405
405
|
end
|
406
406
|
|
407
407
|
#
|
@@ -409,8 +409,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
409
409
|
#
|
410
410
|
#
|
411
411
|
# @param group_id [String] Management Group ID.
|
412
|
-
# @param
|
413
|
-
# parameters.
|
412
|
+
# @param create_management_group_request [CreateManagementGroupRequest]
|
413
|
+
# Management group creation parameters.
|
414
414
|
# @param cache_control [String] Indicates that the request shouldn't utilize
|
415
415
|
# any caches.
|
416
416
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -418,10 +418,10 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
418
418
|
#
|
419
419
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
420
420
|
#
|
421
|
-
def update_async(group_id,
|
421
|
+
def update_async(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
|
422
422
|
fail ArgumentError, 'group_id is nil' if group_id.nil?
|
423
423
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
424
|
-
fail ArgumentError, '
|
424
|
+
fail ArgumentError, 'create_management_group_request is nil' if create_management_group_request.nil?
|
425
425
|
|
426
426
|
|
427
427
|
request_headers = {}
|
@@ -433,8 +433,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
433
433
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
434
434
|
|
435
435
|
# Serialize Request
|
436
|
-
request_mapper = Azure::ResourcesManagement::Mgmt::V2017_11_01_preview::Models::
|
437
|
-
request_content = @client.serialize(request_mapper,
|
436
|
+
request_mapper = Azure::ResourcesManagement::Mgmt::V2017_11_01_preview::Models::CreateManagementGroupRequest.mapper()
|
437
|
+
request_content = @client.serialize(request_mapper, create_management_group_request)
|
438
438
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
439
439
|
|
440
440
|
path_template = 'providers/Microsoft.Management/managementGroups/{groupId}'
|
data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb
CHANGED
@@ -21,15 +21,16 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
21
21
|
# The current version is 2017-11-01-preview.
|
22
22
|
attr_reader :api_version
|
23
23
|
|
24
|
-
# @return [String]
|
24
|
+
# @return [String] The preferred language for the response.
|
25
25
|
attr_accessor :accept_language
|
26
26
|
|
27
|
-
# @return [Integer]
|
28
|
-
#
|
27
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
28
|
+
# Operations. Default value is 30.
|
29
29
|
attr_accessor :long_running_operation_retry_timeout
|
30
30
|
|
31
|
-
# @return [Boolean]
|
32
|
-
#
|
31
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
32
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
33
|
+
# generated and included in each request. Default is true.
|
33
34
|
attr_accessor :generate_client_request_id
|
34
35
|
|
35
36
|
# @return [ManagementGroups] management_groups
|
@@ -129,7 +130,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
129
130
|
#
|
130
131
|
def add_telemetry
|
131
132
|
sdk_information = 'azure_mgmt_resources_management'
|
132
|
-
sdk_information = "#{sdk_information}/0.
|
133
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
133
134
|
add_user_agent_information(sdk_information)
|
134
135
|
end
|
135
136
|
end
|
@@ -8,7 +8,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
8
8
|
#
|
9
9
|
# Management group creation parameters.
|
10
10
|
#
|
11
|
-
class
|
11
|
+
class CreateManagementGroupRequest
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
@@ -22,17 +22,17 @@ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
|
|
22
22
|
|
23
23
|
|
24
24
|
#
|
25
|
-
# Mapper for
|
25
|
+
# Mapper for CreateManagementGroupRequest class as Ruby Hash.
|
26
26
|
# This will be used for serialization/deserialization.
|
27
27
|
#
|
28
28
|
def self.mapper()
|
29
29
|
{
|
30
30
|
client_side_validation: true,
|
31
31
|
required: false,
|
32
|
-
serialized_name: '
|
32
|
+
serialized_name: 'CreateManagementGroupRequest',
|
33
33
|
type: {
|
34
34
|
name: 'Composite',
|
35
|
-
class_name: '
|
35
|
+
class_name: 'CreateManagementGroupRequest',
|
36
36
|
model_properties: {
|
37
37
|
display_name: {
|
38
38
|
client_side_validation: true,
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-01-01-preview/generated/azure_mgmt_resources_management/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ResourcesManagement::Mgmt::V2018_01_01_preview
|
23
|
+
autoload :ManagementGroups, '2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb'
|
24
|
+
autoload :ManagementGroupSubscriptions, '2018-01-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb'
|
25
|
+
autoload :Operations, '2018-01-01-preview/generated/azure_mgmt_resources_management/operations.rb'
|
26
|
+
autoload :Entities, '2018-01-01-preview/generated/azure_mgmt_resources_management/entities.rb'
|
27
|
+
autoload :ManagementGroupsAPI, '2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb'
|
28
|
+
|
29
|
+
module Models
|
30
|
+
autoload :ManagementGroup, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb'
|
31
|
+
autoload :OperationResults, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb'
|
32
|
+
autoload :ErrorResponse, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb'
|
33
|
+
autoload :EntityParentGroupInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb'
|
34
|
+
autoload :Operation, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation.rb'
|
35
|
+
autoload :EntityInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb'
|
36
|
+
autoload :CheckNameAvailabilityResult, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb'
|
37
|
+
autoload :EntityListResult, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb'
|
38
|
+
autoload :ManagementGroupListResult, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb'
|
39
|
+
autoload :EntityHierarchyItem, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb'
|
40
|
+
autoload :ManagementGroupDetails, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb'
|
41
|
+
autoload :PatchManagementGroupRequest, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb'
|
42
|
+
autoload :ErrorDetails, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb'
|
43
|
+
autoload :CreateParentGroupInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb'
|
44
|
+
autoload :OperationListResult, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb'
|
45
|
+
autoload :CreateManagementGroupDetails, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb'
|
46
|
+
autoload :ParentGroupInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb'
|
47
|
+
autoload :CreateManagementGroupChildInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb'
|
48
|
+
autoload :OperationDisplayProperties, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb'
|
49
|
+
autoload :CreateManagementGroupRequest, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb'
|
50
|
+
autoload :ManagementGroupChildInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb'
|
51
|
+
autoload :CheckNameAvailabilityRequest, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb'
|
52
|
+
autoload :ManagementGroupInfo, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb'
|
53
|
+
autoload :Reason, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/reason.rb'
|
54
|
+
autoload :Type, '2018-01-01-preview/generated/azure_mgmt_resources_management/models/type.rb'
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ResourcesManagement::Mgmt::V2018_01_01_preview
|
7
|
+
#
|
8
|
+
# The Azure Management Groups API enables consolidation of multiple
|
9
|
+
# subscriptions/resources into an organizational hierarchy and centrally
|
10
|
+
# manage access control, policies, alerting and reporting for those
|
11
|
+
# resources.
|
12
|
+
#
|
13
|
+
#
|
14
|
+
class Entities
|
15
|
+
include MsRestAzure
|
16
|
+
|
17
|
+
#
|
18
|
+
# Creates and initializes a new instance of the Entities class.
|
19
|
+
# @param client service class for accessing basic functionality.
|
20
|
+
#
|
21
|
+
def initialize(client)
|
22
|
+
@client = client
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [ManagementGroupsAPI] reference to the ManagementGroupsAPI
|
26
|
+
attr_reader :client
|
27
|
+
|
28
|
+
#
|
29
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
30
|
+
# authenticated user.
|
31
|
+
#
|
32
|
+
#
|
33
|
+
# @param group_name [String] A filter which allows the call to be filtered for
|
34
|
+
# a specific group.
|
35
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
36
|
+
# any caches.
|
37
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
38
|
+
# will be added to the HTTP request.
|
39
|
+
#
|
40
|
+
# @return [Array<EntityInfo>] operation results.
|
41
|
+
#
|
42
|
+
def list(group_name:nil, cache_control:'no-cache', custom_headers:nil)
|
43
|
+
first_page = list_as_lazy(group_name:group_name, cache_control:cache_control, custom_headers:custom_headers)
|
44
|
+
first_page.get_all_items
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
49
|
+
# authenticated user.
|
50
|
+
#
|
51
|
+
#
|
52
|
+
# @param group_name [String] A filter which allows the call to be filtered for
|
53
|
+
# a specific group.
|
54
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
55
|
+
# any caches.
|
56
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
57
|
+
# will be added to the HTTP request.
|
58
|
+
#
|
59
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
60
|
+
#
|
61
|
+
def list_with_http_info(group_name:nil, cache_control:'no-cache', custom_headers:nil)
|
62
|
+
list_async(group_name:group_name, cache_control:cache_control, custom_headers:custom_headers).value!
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
67
|
+
# authenticated user.
|
68
|
+
#
|
69
|
+
#
|
70
|
+
# @param group_name [String] A filter which allows the call to be filtered for
|
71
|
+
# a specific group.
|
72
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
73
|
+
# any caches.
|
74
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
75
|
+
# to the HTTP request.
|
76
|
+
#
|
77
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
78
|
+
#
|
79
|
+
def list_async(group_name:nil, cache_control:'no-cache', custom_headers:nil)
|
80
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
81
|
+
|
82
|
+
|
83
|
+
request_headers = {}
|
84
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
85
|
+
|
86
|
+
# Set Headers
|
87
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
88
|
+
request_headers['Cache-Control'] = cache_control unless cache_control.nil?
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
90
|
+
path_template = 'providers/Microsoft.Management/getEntities'
|
91
|
+
|
92
|
+
request_url = @base_url || @client.base_url
|
93
|
+
|
94
|
+
options = {
|
95
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
96
|
+
query_params: {'api-version' => @client.api_version,'$skiptoken' => @client.skiptoken,'groupName' => group_name},
|
97
|
+
headers: request_headers.merge(custom_headers || {}),
|
98
|
+
base_url: request_url
|
99
|
+
}
|
100
|
+
promise = @client.make_request_async(:post, path_template, options)
|
101
|
+
|
102
|
+
promise = promise.then do |result|
|
103
|
+
http_response = result.response
|
104
|
+
status_code = http_response.status
|
105
|
+
response_content = http_response.body
|
106
|
+
unless status_code == 200
|
107
|
+
error_model = JSON.load(response_content)
|
108
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
109
|
+
end
|
110
|
+
|
111
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
112
|
+
# Deserialize Response
|
113
|
+
if status_code == 200
|
114
|
+
begin
|
115
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
116
|
+
result_mapper = Azure::ResourcesManagement::Mgmt::V2018_01_01_preview::Models::EntityListResult.mapper()
|
117
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
118
|
+
rescue Exception => e
|
119
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
result
|
124
|
+
end
|
125
|
+
|
126
|
+
promise.execute
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
131
|
+
# authenticated user.
|
132
|
+
#
|
133
|
+
#
|
134
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
135
|
+
# to List operation.
|
136
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
137
|
+
# any caches.
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [EntityListResult] operation results.
|
142
|
+
#
|
143
|
+
def list_next(next_page_link, cache_control:'no-cache', custom_headers:nil)
|
144
|
+
response = list_next_async(next_page_link, cache_control:cache_control, custom_headers:custom_headers).value!
|
145
|
+
response.body unless response.nil?
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
150
|
+
# authenticated user.
|
151
|
+
#
|
152
|
+
#
|
153
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
154
|
+
# to List operation.
|
155
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
156
|
+
# any caches.
|
157
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
158
|
+
# will be added to the HTTP request.
|
159
|
+
#
|
160
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
161
|
+
#
|
162
|
+
def list_next_with_http_info(next_page_link, cache_control:'no-cache', custom_headers:nil)
|
163
|
+
list_next_async(next_page_link, cache_control:cache_control, custom_headers:custom_headers).value!
|
164
|
+
end
|
165
|
+
|
166
|
+
#
|
167
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
168
|
+
# authenticated user.
|
169
|
+
#
|
170
|
+
#
|
171
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
172
|
+
# to List operation.
|
173
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
174
|
+
# any caches.
|
175
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
176
|
+
# to the HTTP request.
|
177
|
+
#
|
178
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
179
|
+
#
|
180
|
+
def list_next_async(next_page_link, cache_control:'no-cache', custom_headers:nil)
|
181
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
182
|
+
|
183
|
+
|
184
|
+
request_headers = {}
|
185
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
186
|
+
|
187
|
+
# Set Headers
|
188
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
189
|
+
request_headers['Cache-Control'] = cache_control unless cache_control.nil?
|
190
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
191
|
+
path_template = '{nextLink}'
|
192
|
+
|
193
|
+
request_url = @base_url || @client.base_url
|
194
|
+
|
195
|
+
options = {
|
196
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
197
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
198
|
+
headers: request_headers.merge(custom_headers || {}),
|
199
|
+
base_url: request_url
|
200
|
+
}
|
201
|
+
promise = @client.make_request_async(:post, path_template, options)
|
202
|
+
|
203
|
+
promise = promise.then do |result|
|
204
|
+
http_response = result.response
|
205
|
+
status_code = http_response.status
|
206
|
+
response_content = http_response.body
|
207
|
+
unless status_code == 200
|
208
|
+
error_model = JSON.load(response_content)
|
209
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
210
|
+
end
|
211
|
+
|
212
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
213
|
+
# Deserialize Response
|
214
|
+
if status_code == 200
|
215
|
+
begin
|
216
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
217
|
+
result_mapper = Azure::ResourcesManagement::Mgmt::V2018_01_01_preview::Models::EntityListResult.mapper()
|
218
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
219
|
+
rescue Exception => e
|
220
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
result
|
225
|
+
end
|
226
|
+
|
227
|
+
promise.execute
|
228
|
+
end
|
229
|
+
|
230
|
+
#
|
231
|
+
# List all entities (Management Groups, Subscriptions, etc.) for the
|
232
|
+
# authenticated user.
|
233
|
+
#
|
234
|
+
#
|
235
|
+
# @param group_name [String] A filter which allows the call to be filtered for
|
236
|
+
# a specific group.
|
237
|
+
# @param cache_control [String] Indicates that the request shouldn't utilize
|
238
|
+
# any caches.
|
239
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
240
|
+
# will be added to the HTTP request.
|
241
|
+
#
|
242
|
+
# @return [EntityListResult] which provide lazy access to pages of the
|
243
|
+
# response.
|
244
|
+
#
|
245
|
+
def list_as_lazy(group_name:nil, cache_control:'no-cache', custom_headers:nil)
|
246
|
+
response = list_async(group_name:group_name, cache_control:cache_control, custom_headers:custom_headers).value!
|
247
|
+
unless response.nil?
|
248
|
+
page = response.body
|
249
|
+
page.next_method = Proc.new do |next_page_link|
|
250
|
+
list_next_async(next_page_link, cache_control:cache_control, custom_headers:custom_headers)
|
251
|
+
end
|
252
|
+
page
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
end
|