azure_mgmt_resources_management 0.15.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups.rb +21 -18
  3. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +10 -8
  4. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_details.rb +4 -0
  5. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_response.rb +2 -0
  6. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group.rb +7 -0
  7. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +5 -0
  8. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb +6 -0
  9. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +6 -0
  10. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +5 -1
  11. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb +7 -0
  12. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_children.rb +9 -0
  13. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb +9 -0
  14. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation.rb +3 -0
  15. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +4 -0
  16. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +5 -1
  17. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +3 -0
  18. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/operations.rb +15 -13
  19. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management.rb +42 -0
  20. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  21. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +698 -0
  22. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +137 -0
  23. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +59 -0
  24. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +57 -0
  25. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  26. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +130 -0
  27. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +91 -0
  28. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  29. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  30. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  31. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  32. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +83 -0
  33. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  34. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +59 -0
  35. data/lib/{2017-08-31-preview/generated/azure_mgmt_resources_management/version.rb → 2017-11-01-preview/generated/azure_mgmt_resources_management/module_definition.rb} +4 -3
  36. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management.rb +56 -0
  38. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/entities.rb +257 -0
  39. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  40. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +793 -0
  41. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +254 -0
  42. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  43. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  44. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  45. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  46. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  47. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  48. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  49. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +121 -0
  50. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +99 -0
  51. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  52. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  55. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  56. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  57. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  58. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  59. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  60. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  61. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  62. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  63. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  64. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  65. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  66. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  67. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  68. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  69. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management.rb +58 -0
  70. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/entities.rb +381 -0
  71. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +202 -0
  72. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +799 -0
  73. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +401 -0
  74. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  75. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  76. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  77. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  78. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  79. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  80. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  81. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +210 -0
  82. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +111 -0
  83. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  84. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  85. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  86. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  87. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  88. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  89. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  90. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  91. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  92. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  93. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  94. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  95. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  96. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  97. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  98. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/status.rb +20 -0
  99. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/tenant_backfill_status_result.rb +63 -0
  100. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  101. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  102. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/operations.rb +218 -0
  103. data/lib/azure_mgmt_resources_management.rb +3 -0
  104. data/lib/profiles/latest/modules/resourcesmanagement_profile_module.rb +144 -69
  105. data/lib/profiles/latest/resourcesmanagement_latest_profile_client.rb +28 -11
  106. data/lib/profiles/latest/resourcesmanagement_module_definition.rb +0 -1
  107. data/lib/version.rb +1 -1
  108. metadata +95 -9
  109. data/lib/profiles/common/configurable.rb +0 -86
  110. data/lib/profiles/common/default.rb +0 -57
@@ -44,6 +44,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
44
44
  #
45
45
  def self.mapper()
46
46
  {
47
+ client_side_validation: true,
47
48
  required: false,
48
49
  serialized_name: 'ManagementGroupWithChildren',
49
50
  type: {
@@ -51,6 +52,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
51
52
  class_name: 'ManagementGroupWithChildren',
52
53
  model_properties: {
53
54
  id: {
55
+ client_side_validation: true,
54
56
  required: false,
55
57
  read_only: true,
56
58
  serialized_name: 'id',
@@ -59,6 +61,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
59
61
  }
60
62
  },
61
63
  type: {
64
+ client_side_validation: true,
62
65
  required: false,
63
66
  read_only: true,
64
67
  serialized_name: 'type',
@@ -67,6 +70,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
67
70
  }
68
71
  },
69
72
  name: {
73
+ client_side_validation: true,
70
74
  required: false,
71
75
  read_only: true,
72
76
  serialized_name: 'name',
@@ -75,6 +79,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
75
79
  }
76
80
  },
77
81
  tenant_id: {
82
+ client_side_validation: true,
78
83
  required: false,
79
84
  serialized_name: 'properties.tenantId',
80
85
  type: {
@@ -82,6 +87,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
82
87
  }
83
88
  },
84
89
  display_name: {
90
+ client_side_validation: true,
85
91
  required: false,
86
92
  serialized_name: 'properties.displayName',
87
93
  type: {
@@ -89,6 +95,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
89
95
  }
90
96
  },
91
97
  details: {
98
+ client_side_validation: true,
92
99
  required: false,
93
100
  serialized_name: 'properties.details',
94
101
  type: {
@@ -97,11 +104,13 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
97
104
  }
98
105
  },
99
106
  children: {
107
+ client_side_validation: true,
100
108
  required: false,
101
109
  serialized_name: 'properties.children',
102
110
  type: {
103
111
  name: 'Sequence',
104
112
  element: {
113
+ client_side_validation: true,
105
114
  required: false,
106
115
  serialized_name: 'ManagementGroupChildInfoElementType',
107
116
  type: {
@@ -45,6 +45,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
45
45
  #
46
46
  def self.mapper()
47
47
  {
48
+ client_side_validation: true,
48
49
  required: false,
49
50
  serialized_name: 'ManagementGroupWithHierarchy',
50
51
  type: {
@@ -52,6 +53,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
52
53
  class_name: 'ManagementGroupWithHierarchy',
53
54
  model_properties: {
54
55
  id: {
56
+ client_side_validation: true,
55
57
  required: false,
56
58
  read_only: true,
57
59
  serialized_name: 'id',
@@ -60,6 +62,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
60
62
  }
61
63
  },
62
64
  type: {
65
+ client_side_validation: true,
63
66
  required: false,
64
67
  read_only: true,
65
68
  serialized_name: 'type',
@@ -68,6 +71,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
68
71
  }
69
72
  },
70
73
  name: {
74
+ client_side_validation: true,
71
75
  required: false,
72
76
  read_only: true,
73
77
  serialized_name: 'name',
@@ -76,6 +80,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
76
80
  }
77
81
  },
78
82
  tenant_id: {
83
+ client_side_validation: true,
79
84
  required: false,
80
85
  serialized_name: 'properties.tenantId',
81
86
  type: {
@@ -83,6 +88,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
83
88
  }
84
89
  },
85
90
  display_name: {
91
+ client_side_validation: true,
86
92
  required: false,
87
93
  serialized_name: 'properties.displayName',
88
94
  type: {
@@ -90,6 +96,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
90
96
  }
91
97
  },
92
98
  details: {
99
+ client_side_validation: true,
93
100
  required: false,
94
101
  serialized_name: 'properties.details',
95
102
  type: {
@@ -98,11 +105,13 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
98
105
  }
99
106
  },
100
107
  children: {
108
+ client_side_validation: true,
101
109
  required: false,
102
110
  serialized_name: 'properties.children',
103
111
  type: {
104
112
  name: 'Sequence',
105
113
  element: {
114
+ client_side_validation: true,
106
115
  required: false,
107
116
  serialized_name: 'ManagementGroupRecursiveChildInfoElementType',
108
117
  type: {
@@ -25,6 +25,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
25
25
  #
26
26
  def self.mapper()
27
27
  {
28
+ client_side_validation: true,
28
29
  required: false,
29
30
  serialized_name: 'Operation',
30
31
  type: {
@@ -32,6 +33,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
32
33
  class_name: 'Operation',
33
34
  model_properties: {
34
35
  name: {
36
+ client_side_validation: true,
35
37
  required: false,
36
38
  read_only: true,
37
39
  serialized_name: 'name',
@@ -40,6 +42,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
40
42
  }
41
43
  },
42
44
  display: {
45
+ client_side_validation: true,
43
46
  required: false,
44
47
  serialized_name: 'display',
45
48
  type: {
@@ -29,6 +29,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
29
29
  #
30
30
  def self.mapper()
31
31
  {
32
+ client_side_validation: true,
32
33
  required: false,
33
34
  serialized_name: 'Operation_display',
34
35
  type: {
@@ -36,6 +37,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
36
37
  class_name: 'OperationDisplay',
37
38
  model_properties: {
38
39
  provider: {
40
+ client_side_validation: true,
39
41
  required: false,
40
42
  read_only: true,
41
43
  serialized_name: 'provider',
@@ -44,6 +46,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
44
46
  }
45
47
  },
46
48
  resource: {
49
+ client_side_validation: true,
47
50
  required: false,
48
51
  read_only: true,
49
52
  serialized_name: 'resource',
@@ -52,6 +55,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
52
55
  }
53
56
  },
54
57
  operation: {
58
+ client_side_validation: true,
55
59
  required: false,
56
60
  read_only: true,
57
61
  serialized_name: 'operation',
@@ -33,7 +33,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -60,6 +60,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
60
60
  #
61
61
  def self.mapper()
62
62
  {
63
+ client_side_validation: true,
63
64
  required: false,
64
65
  serialized_name: 'OperationListResult',
65
66
  type: {
@@ -67,12 +68,14 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
67
68
  class_name: 'OperationListResult',
68
69
  model_properties: {
69
70
  value: {
71
+ client_side_validation: true,
70
72
  required: false,
71
73
  read_only: true,
72
74
  serialized_name: 'value',
73
75
  type: {
74
76
  name: 'Sequence',
75
77
  element: {
78
+ client_side_validation: true,
76
79
  required: false,
77
80
  serialized_name: 'OperationElementType',
78
81
  type: {
@@ -83,6 +86,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
83
86
  }
84
87
  },
85
88
  next_link: {
89
+ client_side_validation: true,
86
90
  required: false,
87
91
  read_only: true,
88
92
  serialized_name: 'nextLink',
@@ -26,6 +26,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
26
26
  #
27
27
  def self.mapper()
28
28
  {
29
+ client_side_validation: true,
29
30
  required: false,
30
31
  serialized_name: 'ParentGroupInfo',
31
32
  type: {
@@ -33,6 +34,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
33
34
  class_name: 'ParentGroupInfo',
34
35
  model_properties: {
35
36
  parent_id: {
37
+ client_side_validation: true,
36
38
  required: false,
37
39
  serialized_name: 'parentId',
38
40
  type: {
@@ -40,6 +42,7 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
40
42
  }
41
43
  },
42
44
  display_name: {
45
+ client_side_validation: true,
43
46
  required: false,
44
47
  serialized_name: 'displayName',
45
48
  type: {
@@ -33,8 +33,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
33
33
  #
34
34
  # @return [Array<Operation>] operation results.
35
35
  #
36
- def list(custom_headers = nil)
37
- first_page = list_as_lazy(custom_headers)
36
+ def list(custom_headers:nil)
37
+ first_page = list_as_lazy(custom_headers:custom_headers)
38
38
  first_page.get_all_items
39
39
  end
40
40
 
@@ -46,8 +46,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
46
46
  #
47
47
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
48
  #
49
- def list_with_http_info(custom_headers = nil)
50
- list_async(custom_headers).value!
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
51
  end
52
52
 
53
53
  #
@@ -58,11 +58,12 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
58
58
  #
59
59
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
60
  #
61
- def list_async(custom_headers = nil)
61
+ def list_async(custom_headers:nil)
62
62
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
63
63
 
64
64
 
65
65
  request_headers = {}
66
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
67
 
67
68
  # Set Headers
68
69
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -116,8 +117,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
116
117
  #
117
118
  # @return [OperationListResult] operation results.
118
119
  #
119
- def list_next(next_page_link, custom_headers = nil)
120
- response = list_next_async(next_page_link, custom_headers).value!
120
+ def list_next(next_page_link, custom_headers:nil)
121
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
121
122
  response.body unless response.nil?
122
123
  end
123
124
 
@@ -131,8 +132,8 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
131
132
  #
132
133
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
133
134
  #
134
- def list_next_with_http_info(next_page_link, custom_headers = nil)
135
- list_next_async(next_page_link, custom_headers).value!
135
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
136
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
136
137
  end
137
138
 
138
139
  #
@@ -145,11 +146,12 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
145
146
  #
146
147
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
147
148
  #
148
- def list_next_async(next_page_link, custom_headers = nil)
149
+ def list_next_async(next_page_link, custom_headers:nil)
149
150
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
150
151
 
151
152
 
152
153
  request_headers = {}
154
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
153
155
 
154
156
  # Set Headers
155
157
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -202,12 +204,12 @@ module Azure::ResourcesManagement::Mgmt::V2017_08_31_preview
202
204
  # @return [OperationListResult] which provide lazy access to pages of the
203
205
  # response.
204
206
  #
205
- def list_as_lazy(custom_headers = nil)
206
- response = list_async(custom_headers).value!
207
+ def list_as_lazy(custom_headers:nil)
208
+ response = list_async(custom_headers:custom_headers).value!
207
209
  unless response.nil?
208
210
  page = response.body
209
211
  page.next_method = Proc.new do |next_page_link|
210
- list_next_async(next_page_link, custom_headers)
212
+ list_next_async(next_page_link, custom_headers:custom_headers)
211
213
  end
212
214
  page
213
215
  end
@@ -0,0 +1,42 @@
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 '2017-11-01-preview/generated/azure_mgmt_resources_management/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
23
+ autoload :ManagementGroups, '2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb'
24
+ autoload :ManagementGroupSubscriptions, '2017-11-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb'
25
+ autoload :Operations, '2017-11-01-preview/generated/azure_mgmt_resources_management/operations.rb'
26
+ autoload :ManagementGroupsAPI, '2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb'
27
+
28
+ module Models
29
+ autoload :ManagementGroupListResult, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb'
30
+ autoload :ErrorDetails, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb'
31
+ autoload :ParentGroupInfo, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb'
32
+ autoload :OperationDisplay, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_display.rb'
33
+ autoload :ManagementGroupDetails, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb'
34
+ autoload :OperationListResult, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb'
35
+ autoload :ManagementGroupChildInfo, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb'
36
+ autoload :ErrorResponse, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb'
37
+ autoload :ManagementGroup, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb'
38
+ autoload :ManagementGroupInfo, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb'
39
+ autoload :CreateManagementGroupRequest, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb'
40
+ autoload :Operation, '2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb'
41
+ end
42
+ end
@@ -0,0 +1,209 @@
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::V2017_11_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 ManagementGroupSubscriptions
15
+ include MsRestAzure
16
+
17
+ #
18
+ # Creates and initializes a new instance of the ManagementGroupSubscriptions 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
+ # Associates existing subscription with the management group.
30
+ #
31
+ #
32
+ # @param group_id [String] Management Group ID.
33
+ # @param subscription_id [String] Subscription ID.
34
+ # @param cache_control [String] Indicates that the request shouldn't utilize
35
+ # any caches.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ #
40
+ def create(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
41
+ response = create_async(group_id, subscription_id, cache_control:cache_control, custom_headers:custom_headers).value!
42
+ nil
43
+ end
44
+
45
+ #
46
+ # Associates existing subscription with the management group.
47
+ #
48
+ #
49
+ # @param group_id [String] Management Group ID.
50
+ # @param subscription_id [String] Subscription ID.
51
+ # @param cache_control [String] Indicates that the request shouldn't utilize
52
+ # any caches.
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 create_with_http_info(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
59
+ create_async(group_id, subscription_id, cache_control:cache_control, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Associates existing subscription with the management group.
64
+ #
65
+ #
66
+ # @param group_id [String] Management Group ID.
67
+ # @param subscription_id [String] Subscription ID.
68
+ # @param cache_control [String] Indicates that the request shouldn't utilize
69
+ # any caches.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def create_async(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
76
+ fail ArgumentError, 'group_id is nil' if group_id.nil?
77
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
78
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['Cache-Control'] = cache_control unless cache_control.nil?
87
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
88
+ path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'
89
+
90
+ request_url = @base_url || @client.base_url
91
+
92
+ options = {
93
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
94
+ path_params: {'groupId' => group_id,'subscriptionId' => subscription_id},
95
+ query_params: {'api-version' => @client.api_version},
96
+ headers: request_headers.merge(custom_headers || {}),
97
+ base_url: request_url
98
+ }
99
+ promise = @client.make_request_async(:put, path_template, options)
100
+
101
+ promise = promise.then do |result|
102
+ http_response = result.response
103
+ status_code = http_response.status
104
+ response_content = http_response.body
105
+ unless status_code == 204
106
+ error_model = JSON.load(response_content)
107
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
108
+ end
109
+
110
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
+
112
+ result
113
+ end
114
+
115
+ promise.execute
116
+ end
117
+
118
+ #
119
+ # De-associates subscription from the management group.
120
+ #
121
+ #
122
+ # @param group_id [String] Management Group ID.
123
+ # @param subscription_id [String] Subscription ID.
124
+ # @param cache_control [String] Indicates that the request shouldn't utilize
125
+ # any caches.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ #
130
+ def delete(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
131
+ response = delete_async(group_id, subscription_id, cache_control:cache_control, custom_headers:custom_headers).value!
132
+ nil
133
+ end
134
+
135
+ #
136
+ # De-associates subscription from the management group.
137
+ #
138
+ #
139
+ # @param group_id [String] Management Group ID.
140
+ # @param subscription_id [String] Subscription ID.
141
+ # @param cache_control [String] Indicates that the request shouldn't utilize
142
+ # any caches.
143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
+ # will be added to the HTTP request.
145
+ #
146
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
147
+ #
148
+ def delete_with_http_info(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
149
+ delete_async(group_id, subscription_id, cache_control:cache_control, custom_headers:custom_headers).value!
150
+ end
151
+
152
+ #
153
+ # De-associates subscription from the management group.
154
+ #
155
+ #
156
+ # @param group_id [String] Management Group ID.
157
+ # @param subscription_id [String] Subscription ID.
158
+ # @param cache_control [String] Indicates that the request shouldn't utilize
159
+ # any caches.
160
+ # @param [Hash{String => String}] A hash of custom headers that will be added
161
+ # to the HTTP request.
162
+ #
163
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
164
+ #
165
+ def delete_async(group_id, subscription_id, cache_control:'no-cache', custom_headers:nil)
166
+ fail ArgumentError, 'group_id is nil' if group_id.nil?
167
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
168
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
169
+
170
+
171
+ request_headers = {}
172
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
173
+
174
+ # Set Headers
175
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
176
+ request_headers['Cache-Control'] = cache_control unless cache_control.nil?
177
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
178
+ path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'
179
+
180
+ request_url = @base_url || @client.base_url
181
+
182
+ options = {
183
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
184
+ path_params: {'groupId' => group_id,'subscriptionId' => subscription_id},
185
+ query_params: {'api-version' => @client.api_version},
186
+ headers: request_headers.merge(custom_headers || {}),
187
+ base_url: request_url
188
+ }
189
+ promise = @client.make_request_async(:delete, path_template, options)
190
+
191
+ promise = promise.then do |result|
192
+ http_response = result.response
193
+ status_code = http_response.status
194
+ response_content = http_response.body
195
+ unless status_code == 204
196
+ error_model = JSON.load(response_content)
197
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
198
+ end
199
+
200
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
201
+
202
+ result
203
+ end
204
+
205
+ promise.execute
206
+ end
207
+
208
+ end
209
+ end