azure_mgmt_operations_management 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management.rb +48 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/management_associations.rb +447 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/management_configurations.rb +447 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/arm_template_parameter.rb +57 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/code_message_error.rb +47 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/code_message_error_error.rb +57 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_association.rb +96 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_association_properties.rb +48 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_association_properties_list.rb +56 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_configuration.rb +96 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_configuration_properties.rb +104 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/management_configuration_properties_list.rb +56 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/operation.rb +59 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/operation_display.rb +68 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/operation_list_result.rb +56 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/solution.rb +127 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/solution_patch.rb +54 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/solution_plan.rb +86 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/solution_properties.rb +102 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/models/solution_properties_list.rb +56 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/module_definition.rb +9 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/operations.rb +109 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/operations_management_client.rb +154 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/solutions.rb +803 -0
- data/lib/azure_mgmt_operations_management.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/operationsmanagement_profile_module.rb +135 -0
- data/lib/profiles/latest/operationsmanagement_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/operationsmanagement_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +148 -0
data/lib/2015-11-01-preview/generated/azure_mgmt_operations_management/management_configurations.rb
ADDED
@@ -0,0 +1,447 @@
|
|
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::OperationsManagement::Mgmt::V2015_11_01_preview
|
7
|
+
#
|
8
|
+
# Operations Management Client
|
9
|
+
#
|
10
|
+
class ManagementConfigurations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ManagementConfigurations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [OperationsManagementClient] reference to the OperationsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Retrieves the ManagementConfigurations list for the subscription
|
26
|
+
#
|
27
|
+
# Retrieves the ManagementConfigurations list.
|
28
|
+
#
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [ManagementConfigurationPropertiesList] operation results.
|
33
|
+
#
|
34
|
+
def list_by_subscription(custom_headers:nil)
|
35
|
+
response = list_by_subscription_async(custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Retrieves the ManagementConfigurations list for the subscription
|
41
|
+
#
|
42
|
+
# Retrieves the ManagementConfigurations list.
|
43
|
+
#
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_by_subscription_with_http_info(custom_headers:nil)
|
50
|
+
list_by_subscription_async(custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Retrieves the ManagementConfigurations list for the subscription
|
55
|
+
#
|
56
|
+
# Retrieves the ManagementConfigurations list.
|
57
|
+
#
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_by_subscription_async(custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
65
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
66
|
+
|
67
|
+
|
68
|
+
request_headers = {}
|
69
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
70
|
+
|
71
|
+
# Set Headers
|
72
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
73
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
74
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations'
|
75
|
+
|
76
|
+
request_url = @base_url || @client.base_url
|
77
|
+
|
78
|
+
options = {
|
79
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
80
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
81
|
+
query_params: {'api-version' => @client.api_version},
|
82
|
+
headers: request_headers.merge(custom_headers || {}),
|
83
|
+
base_url: request_url
|
84
|
+
}
|
85
|
+
promise = @client.make_request_async(:get, path_template, options)
|
86
|
+
|
87
|
+
promise = promise.then do |result|
|
88
|
+
http_response = result.response
|
89
|
+
status_code = http_response.status
|
90
|
+
response_content = http_response.body
|
91
|
+
unless status_code == 200
|
92
|
+
error_model = JSON.load(response_content)
|
93
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
94
|
+
end
|
95
|
+
|
96
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
97
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
98
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
99
|
+
# Deserialize Response
|
100
|
+
if status_code == 200
|
101
|
+
begin
|
102
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
103
|
+
result_mapper = Azure::OperationsManagement::Mgmt::V2015_11_01_preview::Models::ManagementConfigurationPropertiesList.mapper()
|
104
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
105
|
+
rescue Exception => e
|
106
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
result
|
111
|
+
end
|
112
|
+
|
113
|
+
promise.execute
|
114
|
+
end
|
115
|
+
|
116
|
+
#
|
117
|
+
# Create/Update ManagementConfiguration.
|
118
|
+
#
|
119
|
+
# Creates or updates the ManagementConfiguration.
|
120
|
+
#
|
121
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
122
|
+
# The name is case insensitive.
|
123
|
+
# @param management_configuration_name [String] User Management Configuration
|
124
|
+
# Name.
|
125
|
+
# @param parameters [ManagementConfiguration] The parameters required to create
|
126
|
+
# OMS Solution.
|
127
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
128
|
+
# will be added to the HTTP request.
|
129
|
+
#
|
130
|
+
# @return [ManagementConfiguration] operation results.
|
131
|
+
#
|
132
|
+
def create_or_update(resource_group_name, management_configuration_name, parameters, custom_headers:nil)
|
133
|
+
response = create_or_update_async(resource_group_name, management_configuration_name, parameters, custom_headers:custom_headers).value!
|
134
|
+
response.body unless response.nil?
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Create/Update ManagementConfiguration.
|
139
|
+
#
|
140
|
+
# Creates or updates the ManagementConfiguration.
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
143
|
+
# The name is case insensitive.
|
144
|
+
# @param management_configuration_name [String] User Management Configuration
|
145
|
+
# Name.
|
146
|
+
# @param parameters [ManagementConfiguration] The parameters required to create
|
147
|
+
# OMS Solution.
|
148
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
149
|
+
# will be added to the HTTP request.
|
150
|
+
#
|
151
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
152
|
+
#
|
153
|
+
def create_or_update_with_http_info(resource_group_name, management_configuration_name, parameters, custom_headers:nil)
|
154
|
+
create_or_update_async(resource_group_name, management_configuration_name, parameters, custom_headers:custom_headers).value!
|
155
|
+
end
|
156
|
+
|
157
|
+
#
|
158
|
+
# Create/Update ManagementConfiguration.
|
159
|
+
#
|
160
|
+
# Creates or updates the ManagementConfiguration.
|
161
|
+
#
|
162
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
163
|
+
# The name is case insensitive.
|
164
|
+
# @param management_configuration_name [String] User Management Configuration
|
165
|
+
# Name.
|
166
|
+
# @param parameters [ManagementConfiguration] The parameters required to create
|
167
|
+
# OMS Solution.
|
168
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
169
|
+
# to the HTTP request.
|
170
|
+
#
|
171
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
172
|
+
#
|
173
|
+
def create_or_update_async(resource_group_name, management_configuration_name, parameters, custom_headers:nil)
|
174
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
175
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
176
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
177
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
178
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
179
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
180
|
+
fail ArgumentError, 'management_configuration_name is nil' if management_configuration_name.nil?
|
181
|
+
fail ArgumentError, 'parameters is nil' if parameters.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['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
190
|
+
|
191
|
+
# Serialize Request
|
192
|
+
request_mapper = Azure::OperationsManagement::Mgmt::V2015_11_01_preview::Models::ManagementConfiguration.mapper()
|
193
|
+
request_content = @client.serialize(request_mapper, parameters)
|
194
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
195
|
+
|
196
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'
|
197
|
+
|
198
|
+
request_url = @base_url || @client.base_url
|
199
|
+
|
200
|
+
options = {
|
201
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
202
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managementConfigurationName' => management_configuration_name},
|
203
|
+
query_params: {'api-version' => @client.api_version},
|
204
|
+
body: request_content,
|
205
|
+
headers: request_headers.merge(custom_headers || {}),
|
206
|
+
base_url: request_url
|
207
|
+
}
|
208
|
+
promise = @client.make_request_async(:put, path_template, options)
|
209
|
+
|
210
|
+
promise = promise.then do |result|
|
211
|
+
http_response = result.response
|
212
|
+
status_code = http_response.status
|
213
|
+
response_content = http_response.body
|
214
|
+
unless status_code == 200
|
215
|
+
error_model = JSON.load(response_content)
|
216
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
217
|
+
end
|
218
|
+
|
219
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
220
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
221
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
222
|
+
# Deserialize Response
|
223
|
+
if status_code == 200
|
224
|
+
begin
|
225
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
226
|
+
result_mapper = Azure::OperationsManagement::Mgmt::V2015_11_01_preview::Models::ManagementConfiguration.mapper()
|
227
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
228
|
+
rescue Exception => e
|
229
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
result
|
234
|
+
end
|
235
|
+
|
236
|
+
promise.execute
|
237
|
+
end
|
238
|
+
|
239
|
+
#
|
240
|
+
# Deletes the ManagementConfiguration
|
241
|
+
#
|
242
|
+
# Deletes the ManagementConfiguration in the subscription.
|
243
|
+
#
|
244
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
245
|
+
# The name is case insensitive.
|
246
|
+
# @param management_configuration_name [String] User Management Configuration
|
247
|
+
# Name.
|
248
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
249
|
+
# will be added to the HTTP request.
|
250
|
+
#
|
251
|
+
#
|
252
|
+
def delete(resource_group_name, management_configuration_name, custom_headers:nil)
|
253
|
+
response = delete_async(resource_group_name, management_configuration_name, custom_headers:custom_headers).value!
|
254
|
+
nil
|
255
|
+
end
|
256
|
+
|
257
|
+
#
|
258
|
+
# Deletes the ManagementConfiguration
|
259
|
+
#
|
260
|
+
# Deletes the ManagementConfiguration in the subscription.
|
261
|
+
#
|
262
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
263
|
+
# The name is case insensitive.
|
264
|
+
# @param management_configuration_name [String] User Management Configuration
|
265
|
+
# Name.
|
266
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
267
|
+
# will be added to the HTTP request.
|
268
|
+
#
|
269
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
270
|
+
#
|
271
|
+
def delete_with_http_info(resource_group_name, management_configuration_name, custom_headers:nil)
|
272
|
+
delete_async(resource_group_name, management_configuration_name, custom_headers:custom_headers).value!
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# Deletes the ManagementConfiguration
|
277
|
+
#
|
278
|
+
# Deletes the ManagementConfiguration in the subscription.
|
279
|
+
#
|
280
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
281
|
+
# The name is case insensitive.
|
282
|
+
# @param management_configuration_name [String] User Management Configuration
|
283
|
+
# Name.
|
284
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
285
|
+
# to the HTTP request.
|
286
|
+
#
|
287
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
288
|
+
#
|
289
|
+
def delete_async(resource_group_name, management_configuration_name, custom_headers:nil)
|
290
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
291
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
292
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
293
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
294
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
295
|
+
fail ArgumentError, 'management_configuration_name is nil' if management_configuration_name.nil?
|
296
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
297
|
+
|
298
|
+
|
299
|
+
request_headers = {}
|
300
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
301
|
+
|
302
|
+
# Set Headers
|
303
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
304
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
305
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'
|
306
|
+
|
307
|
+
request_url = @base_url || @client.base_url
|
308
|
+
|
309
|
+
options = {
|
310
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
311
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managementConfigurationName' => management_configuration_name},
|
312
|
+
query_params: {'api-version' => @client.api_version},
|
313
|
+
headers: request_headers.merge(custom_headers || {}),
|
314
|
+
base_url: request_url
|
315
|
+
}
|
316
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
317
|
+
|
318
|
+
promise = promise.then do |result|
|
319
|
+
http_response = result.response
|
320
|
+
status_code = http_response.status
|
321
|
+
response_content = http_response.body
|
322
|
+
unless status_code == 200
|
323
|
+
error_model = JSON.load(response_content)
|
324
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
325
|
+
end
|
326
|
+
|
327
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
328
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
329
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
330
|
+
|
331
|
+
result
|
332
|
+
end
|
333
|
+
|
334
|
+
promise.execute
|
335
|
+
end
|
336
|
+
|
337
|
+
#
|
338
|
+
# Retrieve ManagementConfiguration.
|
339
|
+
#
|
340
|
+
# Retrieves the user ManagementConfiguration.
|
341
|
+
#
|
342
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
343
|
+
# The name is case insensitive.
|
344
|
+
# @param management_configuration_name [String] User Management Configuration
|
345
|
+
# Name.
|
346
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
347
|
+
# will be added to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [ManagementConfiguration] operation results.
|
350
|
+
#
|
351
|
+
def get(resource_group_name, management_configuration_name, custom_headers:nil)
|
352
|
+
response = get_async(resource_group_name, management_configuration_name, custom_headers:custom_headers).value!
|
353
|
+
response.body unless response.nil?
|
354
|
+
end
|
355
|
+
|
356
|
+
#
|
357
|
+
# Retrieve ManagementConfiguration.
|
358
|
+
#
|
359
|
+
# Retrieves the user ManagementConfiguration.
|
360
|
+
#
|
361
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
362
|
+
# The name is case insensitive.
|
363
|
+
# @param management_configuration_name [String] User Management Configuration
|
364
|
+
# Name.
|
365
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
366
|
+
# will be added to the HTTP request.
|
367
|
+
#
|
368
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
369
|
+
#
|
370
|
+
def get_with_http_info(resource_group_name, management_configuration_name, custom_headers:nil)
|
371
|
+
get_async(resource_group_name, management_configuration_name, custom_headers:custom_headers).value!
|
372
|
+
end
|
373
|
+
|
374
|
+
#
|
375
|
+
# Retrieve ManagementConfiguration.
|
376
|
+
#
|
377
|
+
# Retrieves the user ManagementConfiguration.
|
378
|
+
#
|
379
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
380
|
+
# The name is case insensitive.
|
381
|
+
# @param management_configuration_name [String] User Management Configuration
|
382
|
+
# Name.
|
383
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
384
|
+
# to the HTTP request.
|
385
|
+
#
|
386
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
387
|
+
#
|
388
|
+
def get_async(resource_group_name, management_configuration_name, custom_headers:nil)
|
389
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
390
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
391
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
392
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
393
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
394
|
+
fail ArgumentError, 'management_configuration_name is nil' if management_configuration_name.nil?
|
395
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
396
|
+
|
397
|
+
|
398
|
+
request_headers = {}
|
399
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
400
|
+
|
401
|
+
# Set Headers
|
402
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
403
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
404
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'
|
405
|
+
|
406
|
+
request_url = @base_url || @client.base_url
|
407
|
+
|
408
|
+
options = {
|
409
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
410
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managementConfigurationName' => management_configuration_name},
|
411
|
+
query_params: {'api-version' => @client.api_version},
|
412
|
+
headers: request_headers.merge(custom_headers || {}),
|
413
|
+
base_url: request_url
|
414
|
+
}
|
415
|
+
promise = @client.make_request_async(:get, path_template, options)
|
416
|
+
|
417
|
+
promise = promise.then do |result|
|
418
|
+
http_response = result.response
|
419
|
+
status_code = http_response.status
|
420
|
+
response_content = http_response.body
|
421
|
+
unless status_code == 200
|
422
|
+
error_model = JSON.load(response_content)
|
423
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
424
|
+
end
|
425
|
+
|
426
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
427
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
428
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
429
|
+
# Deserialize Response
|
430
|
+
if status_code == 200
|
431
|
+
begin
|
432
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
433
|
+
result_mapper = Azure::OperationsManagement::Mgmt::V2015_11_01_preview::Models::ManagementConfiguration.mapper()
|
434
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
435
|
+
rescue Exception => e
|
436
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
result
|
441
|
+
end
|
442
|
+
|
443
|
+
promise.execute
|
444
|
+
end
|
445
|
+
|
446
|
+
end
|
447
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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::OperationsManagement::Mgmt::V2015_11_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Parameter to pass to ARM template
|
10
|
+
#
|
11
|
+
class ArmTemplateParameter
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] name of the parameter.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] value for the parameter. In Jtoken
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for ArmTemplateParameter class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'ArmTemplateParameter',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'ArmTemplateParameter',
|
34
|
+
model_properties: {
|
35
|
+
name: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'name',
|
39
|
+
type: {
|
40
|
+
name: 'String'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
value: {
|
44
|
+
client_side_validation: true,
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'value',
|
47
|
+
type: {
|
48
|
+
name: 'String'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|