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
data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb
ADDED
@@ -0,0 +1,401 @@
|
|
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_03_01_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ManagementGroupsAPI < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Version of the API to be used with the client request.
|
21
|
+
# The current version is 2018-01-01-preview.
|
22
|
+
attr_reader :api_version
|
23
|
+
|
24
|
+
# @return [String] The preferred language for the response.
|
25
|
+
attr_accessor :accept_language
|
26
|
+
|
27
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
28
|
+
# Operations. Default value is 30.
|
29
|
+
attr_accessor :long_running_operation_retry_timeout
|
30
|
+
|
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.
|
34
|
+
attr_accessor :generate_client_request_id
|
35
|
+
|
36
|
+
# @return [ManagementGroups] management_groups
|
37
|
+
attr_reader :management_groups
|
38
|
+
|
39
|
+
# @return [ManagementGroupSubscriptions] management_group_subscriptions
|
40
|
+
attr_reader :management_group_subscriptions
|
41
|
+
|
42
|
+
# @return [Operations] operations
|
43
|
+
attr_reader :operations
|
44
|
+
|
45
|
+
# @return [Entities] entities
|
46
|
+
attr_reader :entities
|
47
|
+
|
48
|
+
#
|
49
|
+
# Creates initializes a new instance of the ManagementGroupsAPI class.
|
50
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
51
|
+
# @param base_url [String] the base URI of the service.
|
52
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
53
|
+
#
|
54
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
55
|
+
super(credentials, options)
|
56
|
+
@base_url = base_url || 'https://management.azure.com'
|
57
|
+
|
58
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
59
|
+
@credentials = credentials
|
60
|
+
|
61
|
+
@management_groups = ManagementGroups.new(self)
|
62
|
+
@management_group_subscriptions = ManagementGroupSubscriptions.new(self)
|
63
|
+
@operations = Operations.new(self)
|
64
|
+
@entities = Entities.new(self)
|
65
|
+
@api_version = '2018-03-01-preview'
|
66
|
+
@accept_language = 'en-US'
|
67
|
+
@long_running_operation_retry_timeout = 30
|
68
|
+
@generate_client_request_id = true
|
69
|
+
add_telemetry
|
70
|
+
end
|
71
|
+
|
72
|
+
#
|
73
|
+
# Makes a request and returns the body of the response.
|
74
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
75
|
+
# @param path [String] the path, relative to {base_url}.
|
76
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
77
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
78
|
+
# Example:
|
79
|
+
#
|
80
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
81
|
+
# path = "/path"
|
82
|
+
# options = {
|
83
|
+
# body: request_content,
|
84
|
+
# query_params: {'api-version' => '2016-02-01'}
|
85
|
+
# }
|
86
|
+
# result = @client.make_request(:put, path, options)
|
87
|
+
#
|
88
|
+
def make_request(method, path, options = {})
|
89
|
+
result = make_request_with_http_info(method, path, options)
|
90
|
+
result.body unless result.nil?
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# Makes a request and returns the operation response.
|
95
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
96
|
+
# @param path [String] the path, relative to {base_url}.
|
97
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
98
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
99
|
+
#
|
100
|
+
def make_request_with_http_info(method, path, options = {})
|
101
|
+
result = make_request_async(method, path, options).value!
|
102
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
103
|
+
result
|
104
|
+
end
|
105
|
+
|
106
|
+
#
|
107
|
+
# Makes a request asynchronously.
|
108
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
109
|
+
# @param path [String] the path, relative to {base_url}.
|
110
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
111
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
112
|
+
#
|
113
|
+
def make_request_async(method, path, options = {})
|
114
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
115
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
116
|
+
|
117
|
+
request_url = options[:base_url] || @base_url
|
118
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
119
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
120
|
+
end
|
121
|
+
|
122
|
+
request_headers = @request_headers
|
123
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
124
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
125
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
126
|
+
|
127
|
+
super(request_url, method, path, options)
|
128
|
+
end
|
129
|
+
|
130
|
+
#
|
131
|
+
# Checks if the specified management group name is valid and unique
|
132
|
+
#
|
133
|
+
# @param check_name_availability_request [CheckNameAvailabilityRequest]
|
134
|
+
# Management group name availability check parameters.
|
135
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
136
|
+
# will be added to the HTTP request.
|
137
|
+
#
|
138
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
139
|
+
#
|
140
|
+
def check_name_availability(check_name_availability_request, custom_headers:nil)
|
141
|
+
response = check_name_availability_async(check_name_availability_request, custom_headers:custom_headers).value!
|
142
|
+
response.body unless response.nil?
|
143
|
+
end
|
144
|
+
|
145
|
+
#
|
146
|
+
# Checks if the specified management group name is valid and unique
|
147
|
+
#
|
148
|
+
# @param check_name_availability_request [CheckNameAvailabilityRequest]
|
149
|
+
# Management group name availability check parameters.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
154
|
+
#
|
155
|
+
def check_name_availability_with_http_info(check_name_availability_request, custom_headers:nil)
|
156
|
+
check_name_availability_async(check_name_availability_request, custom_headers:custom_headers).value!
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Checks if the specified management group name is valid and unique
|
161
|
+
#
|
162
|
+
# @param check_name_availability_request [CheckNameAvailabilityRequest]
|
163
|
+
# Management group name availability check parameters.
|
164
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
165
|
+
# to the HTTP request.
|
166
|
+
#
|
167
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
168
|
+
#
|
169
|
+
def check_name_availability_async(check_name_availability_request, custom_headers:nil)
|
170
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
171
|
+
fail ArgumentError, 'check_name_availability_request is nil' if check_name_availability_request.nil?
|
172
|
+
|
173
|
+
|
174
|
+
request_headers = {}
|
175
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
176
|
+
|
177
|
+
# Set Headers
|
178
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
179
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
180
|
+
|
181
|
+
# Serialize Request
|
182
|
+
request_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityRequest.mapper()
|
183
|
+
request_content = self.serialize(request_mapper, check_name_availability_request)
|
184
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
185
|
+
|
186
|
+
path_template = 'providers/Microsoft.Management/checkNameAvailability'
|
187
|
+
|
188
|
+
request_url = @base_url || self.base_url
|
189
|
+
|
190
|
+
options = {
|
191
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
192
|
+
query_params: {'api-version' => api_version},
|
193
|
+
body: request_content,
|
194
|
+
headers: request_headers.merge(custom_headers || {}),
|
195
|
+
base_url: request_url
|
196
|
+
}
|
197
|
+
promise = self.make_request_async(:post, path_template, options)
|
198
|
+
|
199
|
+
promise = promise.then do |result|
|
200
|
+
http_response = result.response
|
201
|
+
status_code = http_response.status
|
202
|
+
response_content = http_response.body
|
203
|
+
unless status_code == 200
|
204
|
+
error_model = JSON.load(response_content)
|
205
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
206
|
+
end
|
207
|
+
|
208
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
209
|
+
# Deserialize Response
|
210
|
+
if status_code == 200
|
211
|
+
begin
|
212
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
213
|
+
result_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult.mapper()
|
214
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
215
|
+
rescue Exception => e
|
216
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
result
|
221
|
+
end
|
222
|
+
|
223
|
+
promise.execute
|
224
|
+
end
|
225
|
+
|
226
|
+
#
|
227
|
+
# Starts backfilling subscriptions for the Tenant.
|
228
|
+
#
|
229
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
230
|
+
# will be added to the HTTP request.
|
231
|
+
#
|
232
|
+
# @return [TenantBackfillStatusResult] operation results.
|
233
|
+
#
|
234
|
+
def start_tenant_backfill(custom_headers:nil)
|
235
|
+
response = start_tenant_backfill_async(custom_headers:custom_headers).value!
|
236
|
+
response.body unless response.nil?
|
237
|
+
end
|
238
|
+
|
239
|
+
#
|
240
|
+
# Starts backfilling subscriptions for the Tenant.
|
241
|
+
#
|
242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
243
|
+
# will be added to the HTTP request.
|
244
|
+
#
|
245
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
246
|
+
#
|
247
|
+
def start_tenant_backfill_with_http_info(custom_headers:nil)
|
248
|
+
start_tenant_backfill_async(custom_headers:custom_headers).value!
|
249
|
+
end
|
250
|
+
|
251
|
+
#
|
252
|
+
# Starts backfilling subscriptions for the Tenant.
|
253
|
+
#
|
254
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
255
|
+
# to the HTTP request.
|
256
|
+
#
|
257
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
258
|
+
#
|
259
|
+
def start_tenant_backfill_async(custom_headers:nil)
|
260
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
261
|
+
|
262
|
+
|
263
|
+
request_headers = {}
|
264
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
265
|
+
|
266
|
+
# Set Headers
|
267
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
268
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
269
|
+
path_template = 'providers/Microsoft.Management/startTenantBackfill'
|
270
|
+
|
271
|
+
request_url = @base_url || self.base_url
|
272
|
+
|
273
|
+
options = {
|
274
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
275
|
+
query_params: {'api-version' => api_version},
|
276
|
+
headers: request_headers.merge(custom_headers || {}),
|
277
|
+
base_url: request_url
|
278
|
+
}
|
279
|
+
promise = self.make_request_async(:post, path_template, options)
|
280
|
+
|
281
|
+
promise = promise.then do |result|
|
282
|
+
http_response = result.response
|
283
|
+
status_code = http_response.status
|
284
|
+
response_content = http_response.body
|
285
|
+
unless status_code == 200
|
286
|
+
error_model = JSON.load(response_content)
|
287
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
288
|
+
end
|
289
|
+
|
290
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
291
|
+
# Deserialize Response
|
292
|
+
if status_code == 200
|
293
|
+
begin
|
294
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
295
|
+
result_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::TenantBackfillStatusResult.mapper()
|
296
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
297
|
+
rescue Exception => e
|
298
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
result
|
303
|
+
end
|
304
|
+
|
305
|
+
promise.execute
|
306
|
+
end
|
307
|
+
|
308
|
+
#
|
309
|
+
# Gets tenant backfill status
|
310
|
+
#
|
311
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
312
|
+
# will be added to the HTTP request.
|
313
|
+
#
|
314
|
+
# @return [TenantBackfillStatusResult] operation results.
|
315
|
+
#
|
316
|
+
def tenant_backfill_status(custom_headers:nil)
|
317
|
+
response = tenant_backfill_status_async(custom_headers:custom_headers).value!
|
318
|
+
response.body unless response.nil?
|
319
|
+
end
|
320
|
+
|
321
|
+
#
|
322
|
+
# Gets tenant backfill status
|
323
|
+
#
|
324
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
325
|
+
# will be added to the HTTP request.
|
326
|
+
#
|
327
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
328
|
+
#
|
329
|
+
def tenant_backfill_status_with_http_info(custom_headers:nil)
|
330
|
+
tenant_backfill_status_async(custom_headers:custom_headers).value!
|
331
|
+
end
|
332
|
+
|
333
|
+
#
|
334
|
+
# Gets tenant backfill status
|
335
|
+
#
|
336
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
337
|
+
# to the HTTP request.
|
338
|
+
#
|
339
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
340
|
+
#
|
341
|
+
def tenant_backfill_status_async(custom_headers:nil)
|
342
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
343
|
+
|
344
|
+
|
345
|
+
request_headers = {}
|
346
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
347
|
+
|
348
|
+
# Set Headers
|
349
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
350
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
351
|
+
path_template = 'providers/Microsoft.Management/tenantBackfillStatus'
|
352
|
+
|
353
|
+
request_url = @base_url || self.base_url
|
354
|
+
|
355
|
+
options = {
|
356
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
357
|
+
query_params: {'api-version' => api_version},
|
358
|
+
headers: request_headers.merge(custom_headers || {}),
|
359
|
+
base_url: request_url
|
360
|
+
}
|
361
|
+
promise = self.make_request_async(:post, path_template, options)
|
362
|
+
|
363
|
+
promise = promise.then do |result|
|
364
|
+
http_response = result.response
|
365
|
+
status_code = http_response.status
|
366
|
+
response_content = http_response.body
|
367
|
+
unless status_code == 200
|
368
|
+
error_model = JSON.load(response_content)
|
369
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
370
|
+
end
|
371
|
+
|
372
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
373
|
+
# Deserialize Response
|
374
|
+
if status_code == 200
|
375
|
+
begin
|
376
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
377
|
+
result_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::TenantBackfillStatusResult.mapper()
|
378
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
379
|
+
rescue Exception => e
|
380
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
result
|
385
|
+
end
|
386
|
+
|
387
|
+
promise.execute
|
388
|
+
end
|
389
|
+
|
390
|
+
|
391
|
+
private
|
392
|
+
#
|
393
|
+
# Adds telemetry information.
|
394
|
+
#
|
395
|
+
def add_telemetry
|
396
|
+
sdk_information = 'azure_mgmt_resources_management'
|
397
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
398
|
+
add_user_agent_information(sdk_information)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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_03_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Management group name availability check parameters.
|
10
|
+
#
|
11
|
+
class CheckNameAvailabilityRequest
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] the name to check for availability
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [Type] fully qualified resource type which includes provider
|
19
|
+
# namespace. Possible values include:
|
20
|
+
# '/providers/Microsoft.Management/managementGroups'
|
21
|
+
attr_accessor :type
|
22
|
+
|
23
|
+
|
24
|
+
#
|
25
|
+
# Mapper for CheckNameAvailabilityRequest class as Ruby Hash.
|
26
|
+
# This will be used for serialization/deserialization.
|
27
|
+
#
|
28
|
+
def self.mapper()
|
29
|
+
{
|
30
|
+
client_side_validation: true,
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'CheckNameAvailabilityRequest',
|
33
|
+
type: {
|
34
|
+
name: 'Composite',
|
35
|
+
class_name: 'CheckNameAvailabilityRequest',
|
36
|
+
model_properties: {
|
37
|
+
name: {
|
38
|
+
client_side_validation: true,
|
39
|
+
required: false,
|
40
|
+
serialized_name: 'name',
|
41
|
+
type: {
|
42
|
+
name: 'String'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
type: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'type',
|
49
|
+
type: {
|
50
|
+
name: 'Enum',
|
51
|
+
module: 'Type'
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|