azure_mgmt_analysis_services 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::AnalysisServices
7
+ module Models
8
+ #
9
+ # Represents the SKU name and Azure pricing tier for Analysis Services
10
+ # resource.
11
+ #
12
+ class ResourceSku
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [SkuName] Name of the SKU level for the server being
17
+ # provisioned. Possible values are: 'S1', 'S2', 'S4', and 'D1'. Possible
18
+ # values include: 'S1', 'S2', 'S4', 'D1'
19
+ attr_accessor :name
20
+
21
+ # @return [SkuTier] The name of the Azure pricing tier to which the SKU
22
+ # applies. Possible values are: 'Development' and 'Standard'. Possible
23
+ # values include: 'Development', 'Standard'
24
+ attr_accessor :tier
25
+
26
+
27
+ #
28
+ # Mapper for ResourceSku class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ required: false,
34
+ serialized_name: 'ResourceSku',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'ResourceSku',
38
+ model_properties: {
39
+ name: {
40
+ required: true,
41
+ serialized_name: 'name',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ tier: {
47
+ required: false,
48
+ serialized_name: 'tier',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,51 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::AnalysisServices
7
+ module Models
8
+ #
9
+ # An array of administrator user identities
10
+ #
11
+ class ServerAdministrators
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] An array of administrator user identities.
16
+ attr_accessor :members
17
+
18
+
19
+ #
20
+ # Mapper for ServerAdministrators class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'ServerAdministrators',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'ServerAdministrators',
30
+ model_properties: {
31
+ members: {
32
+ required: false,
33
+ serialized_name: 'members',
34
+ type: {
35
+ name: 'Sequence',
36
+ element: {
37
+ required: false,
38
+ serialized_name: 'StringElementType',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::AnalysisServices
7
+ module Models
8
+ #
9
+ # Defines values for SkuName
10
+ #
11
+ module SkuName
12
+ S1 = "S1"
13
+ S2 = "S2"
14
+ S4 = "S4"
15
+ D1 = "D1"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::AnalysisServices
7
+ module Models
8
+ #
9
+ # Defines values for SkuTier
10
+ #
11
+ module SkuTier
12
+ Development = "Development"
13
+ Standard = "Standard"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::ARM end
8
+ module Azure::ARM::AnalysisServices end
@@ -0,0 +1,1001 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::AnalysisServices
7
+ #
8
+ # The Azure Analysis Services Web API provides a RESTful set of web services
9
+ # that enables users to create, retrieve, update, and delete Analysis
10
+ # Services servers
11
+ #
12
+ class Servers
13
+ include Azure::ARM::AnalysisServices::Models
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the Servers class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [AnalysisServicesManagementClient] reference to the AnalysisServicesManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Gets details about the specified Analysis Services server.
29
+ #
30
+ # @param resource_group_name [String] The name of the Azure Resource group of
31
+ # which a given Analysis Services server is part. This name must be at least 1
32
+ # character in length, and no more than 90.
33
+ # @param server_name [String] The name of the Analysis Services server. It must
34
+ # be a minimum of 3 characters, and a maximum of 63.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [AnalysisServicesServer] operation results.
39
+ #
40
+ def get_details(resource_group_name, server_name, custom_headers = nil)
41
+ response = get_details_async(resource_group_name, server_name, custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Gets details about the specified Analysis Services server.
47
+ #
48
+ # @param resource_group_name [String] The name of the Azure Resource group of
49
+ # which a given Analysis Services server is part. This name must be at least 1
50
+ # character in length, and no more than 90.
51
+ # @param server_name [String] The name of the Analysis Services server. It must
52
+ # be a minimum of 3 characters, and a maximum of 63.
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 get_details_with_http_info(resource_group_name, server_name, custom_headers = nil)
59
+ get_details_async(resource_group_name, server_name, custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Gets details about the specified Analysis Services server.
64
+ #
65
+ # @param resource_group_name [String] The name of the Azure Resource group of
66
+ # which a given Analysis Services server is part. This name must be at least 1
67
+ # character in length, and no more than 90.
68
+ # @param server_name [String] The name of the Analysis Services server. It must
69
+ # be a minimum of 3 characters, and a maximum of 63.
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 get_details_async(resource_group_name, server_name, custom_headers = nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
78
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
79
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
80
+
81
+
82
+ request_headers = {}
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
94
+ query_params: {'api-version' => @client.api_version},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = AnalysisServicesServer.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Provisions the specified Analysis Services server based on the configuration
129
+ # specified in the request.
130
+ #
131
+ # @param resource_group_name [String] The name of the Azure Resource group of
132
+ # which a given Analysis Services server is part. This name must be at least 1
133
+ # character in length, and no more than 90.
134
+ # @param server_name [String] The name of the Analysis Services server. It must
135
+ # be a minimum of 3 characters, and a maximum of 63.
136
+ # @param server_parameters [AnalysisServicesServer] Contains the information
137
+ # used to provision the Analysis Services server.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [AnalysisServicesServer] operation results.
142
+ #
143
+ def create(resource_group_name, server_name, server_parameters, custom_headers = nil)
144
+ response = create_async(resource_group_name, server_name, server_parameters, custom_headers).value!
145
+ response.body unless response.nil?
146
+ end
147
+
148
+ #
149
+ # @param resource_group_name [String] The name of the Azure Resource group of
150
+ # which a given Analysis Services server is part. This name must be at least 1
151
+ # character in length, and no more than 90.
152
+ # @param server_name [String] The name of the Analysis Services server. It must
153
+ # be a minimum of 3 characters, and a maximum of 63.
154
+ # @param server_parameters [AnalysisServicesServer] Contains the information
155
+ # used to provision the Analysis Services server.
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [Concurrent::Promise] promise which provides async access to http
160
+ # response.
161
+ #
162
+ def create_async(resource_group_name, server_name, server_parameters, custom_headers = nil)
163
+ # Send request
164
+ promise = begin_create_async(resource_group_name, server_name, server_parameters, custom_headers)
165
+
166
+ promise = promise.then do |response|
167
+ # Defining deserialization method.
168
+ deserialize_method = lambda do |parsed_response|
169
+ result_mapper = AnalysisServicesServer.mapper()
170
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
171
+ end
172
+
173
+ # Waiting for response.
174
+ @client.get_long_running_operation_result(response, deserialize_method)
175
+ end
176
+
177
+ promise
178
+ end
179
+
180
+ #
181
+ # Deletes the specified Analysis Services server.
182
+ #
183
+ # @param resource_group_name [String] The name of the Azure Resource group of
184
+ # which a given Analysis Services server is part. This name must be at least 1
185
+ # character in length, and no more than 90.
186
+ # @param server_name [String] The name of the Analysis Services server. It must
187
+ # be at least 3 characters in length, and no more than 63.
188
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
189
+ # will be added to the HTTP request.
190
+ #
191
+ def delete(resource_group_name, server_name, custom_headers = nil)
192
+ response = delete_async(resource_group_name, server_name, custom_headers).value!
193
+ nil
194
+ end
195
+
196
+ #
197
+ # @param resource_group_name [String] The name of the Azure Resource group of
198
+ # which a given Analysis Services server is part. This name must be at least 1
199
+ # character in length, and no more than 90.
200
+ # @param server_name [String] The name of the Analysis Services server. It must
201
+ # be at least 3 characters in length, and no more than 63.
202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
+ # will be added to the HTTP request.
204
+ #
205
+ # @return [Concurrent::Promise] promise which provides async access to http
206
+ # response.
207
+ #
208
+ def delete_async(resource_group_name, server_name, custom_headers = nil)
209
+ # Send request
210
+ promise = begin_delete_async(resource_group_name, server_name, custom_headers)
211
+
212
+ promise = promise.then do |response|
213
+ # Defining deserialization method.
214
+ deserialize_method = lambda do |parsed_response|
215
+ end
216
+
217
+ # Waiting for response.
218
+ @client.get_long_running_operation_result(response, deserialize_method)
219
+ end
220
+
221
+ promise
222
+ end
223
+
224
+ #
225
+ # Updates the current state of the specified Analysis Services server.
226
+ #
227
+ # @param resource_group_name [String] The name of the Azure Resource group of
228
+ # which a given Analysis Services server is part. This name must be at least 1
229
+ # character in length, and no more than 90.
230
+ # @param server_name [String] The name of the Analysis Services server. It must
231
+ # be at least 3 characters in length, and no more than 63.
232
+ # @param server_update_parameters [AnalysisServicesServerUpdateParameters]
233
+ # Request object that contains the updated information for the server.
234
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
235
+ # will be added to the HTTP request.
236
+ #
237
+ # @return [AnalysisServicesServer] operation results.
238
+ #
239
+ def update(resource_group_name, server_name, server_update_parameters, custom_headers = nil)
240
+ response = update_async(resource_group_name, server_name, server_update_parameters, custom_headers).value!
241
+ response.body unless response.nil?
242
+ end
243
+
244
+ #
245
+ # Updates the current state of the specified Analysis Services server.
246
+ #
247
+ # @param resource_group_name [String] The name of the Azure Resource group of
248
+ # which a given Analysis Services server is part. This name must be at least 1
249
+ # character in length, and no more than 90.
250
+ # @param server_name [String] The name of the Analysis Services server. It must
251
+ # be at least 3 characters in length, and no more than 63.
252
+ # @param server_update_parameters [AnalysisServicesServerUpdateParameters]
253
+ # Request object that contains the updated information for the server.
254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
+ # will be added to the HTTP request.
256
+ #
257
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
258
+ #
259
+ def update_with_http_info(resource_group_name, server_name, server_update_parameters, custom_headers = nil)
260
+ update_async(resource_group_name, server_name, server_update_parameters, custom_headers).value!
261
+ end
262
+
263
+ #
264
+ # Updates the current state of the specified Analysis Services server.
265
+ #
266
+ # @param resource_group_name [String] The name of the Azure Resource group of
267
+ # which a given Analysis Services server is part. This name must be at least 1
268
+ # character in length, and no more than 90.
269
+ # @param server_name [String] The name of the Analysis Services server. It must
270
+ # be at least 3 characters in length, and no more than 63.
271
+ # @param server_update_parameters [AnalysisServicesServerUpdateParameters]
272
+ # Request object that contains the updated information for the server.
273
+ # @param [Hash{String => String}] A hash of custom headers that will be added
274
+ # to the HTTP request.
275
+ #
276
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
277
+ #
278
+ def update_async(resource_group_name, server_name, server_update_parameters, custom_headers = nil)
279
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
280
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
281
+ fail ArgumentError, 'server_update_parameters is nil' if server_update_parameters.nil?
282
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
283
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
284
+
285
+
286
+ request_headers = {}
287
+
288
+ # Set Headers
289
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
290
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
291
+
292
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
293
+
294
+ # Serialize Request
295
+ request_mapper = AnalysisServicesServerUpdateParameters.mapper()
296
+ request_content = @client.serialize(request_mapper, server_update_parameters, 'server_update_parameters')
297
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
298
+
299
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'
300
+
301
+ request_url = @base_url || @client.base_url
302
+
303
+ options = {
304
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
305
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
306
+ query_params: {'api-version' => @client.api_version},
307
+ body: request_content,
308
+ headers: request_headers.merge(custom_headers || {}),
309
+ base_url: request_url
310
+ }
311
+ promise = @client.make_request_async(:patch, path_template, options)
312
+
313
+ promise = promise.then do |result|
314
+ http_response = result.response
315
+ status_code = http_response.status
316
+ response_content = http_response.body
317
+ unless status_code == 200
318
+ error_model = JSON.load(response_content)
319
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
320
+ end
321
+
322
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
323
+ # Deserialize Response
324
+ if status_code == 200
325
+ begin
326
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
327
+ result_mapper = AnalysisServicesServer.mapper()
328
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
329
+ rescue Exception => e
330
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
331
+ end
332
+ end
333
+
334
+ result
335
+ end
336
+
337
+ promise.execute
338
+ end
339
+
340
+ #
341
+ # Supends operation of the specified Analysis Services server instance.
342
+ #
343
+ # @param resource_group_name [String] The name of the Azure Resource group of
344
+ # which a given Analysis Services server is part. This name must be at least 1
345
+ # character in length, and no more than 90.
346
+ # @param server_name [String] The name of the Analysis Services server. It must
347
+ # be at least 3 characters in length, and no more than 63.
348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
349
+ # will be added to the HTTP request.
350
+ #
351
+ def suspend(resource_group_name, server_name, custom_headers = nil)
352
+ response = suspend_async(resource_group_name, server_name, custom_headers).value!
353
+ nil
354
+ end
355
+
356
+ #
357
+ # @param resource_group_name [String] The name of the Azure Resource group of
358
+ # which a given Analysis Services server is part. This name must be at least 1
359
+ # character in length, and no more than 90.
360
+ # @param server_name [String] The name of the Analysis Services server. It must
361
+ # be at least 3 characters in length, and no more than 63.
362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
+ # will be added to the HTTP request.
364
+ #
365
+ # @return [Concurrent::Promise] promise which provides async access to http
366
+ # response.
367
+ #
368
+ def suspend_async(resource_group_name, server_name, custom_headers = nil)
369
+ # Send request
370
+ promise = begin_suspend_async(resource_group_name, server_name, custom_headers)
371
+
372
+ promise = promise.then do |response|
373
+ # Defining deserialization method.
374
+ deserialize_method = lambda do |parsed_response|
375
+ end
376
+
377
+ # Waiting for response.
378
+ @client.get_long_running_operation_result(response, deserialize_method)
379
+ end
380
+
381
+ promise
382
+ end
383
+
384
+ #
385
+ # Resumes operation of the specified Analysis Services server instance.
386
+ #
387
+ # @param resource_group_name [String] The name of the Azure Resource group of
388
+ # which a given Analysis Services server is part. This name must be at least 1
389
+ # character in length, and no more than 90.
390
+ # @param server_name [String] The name of the Analysis Services server. It must
391
+ # be at least 3 characters in length, and no more than 63.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ def resume(resource_group_name, server_name, custom_headers = nil)
396
+ response = resume_async(resource_group_name, server_name, custom_headers).value!
397
+ nil
398
+ end
399
+
400
+ #
401
+ # @param resource_group_name [String] The name of the Azure Resource group of
402
+ # which a given Analysis Services server is part. This name must be at least 1
403
+ # character in length, and no more than 90.
404
+ # @param server_name [String] The name of the Analysis Services server. It must
405
+ # be at least 3 characters in length, and no more than 63.
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ # @return [Concurrent::Promise] promise which provides async access to http
410
+ # response.
411
+ #
412
+ def resume_async(resource_group_name, server_name, custom_headers = nil)
413
+ # Send request
414
+ promise = begin_resume_async(resource_group_name, server_name, custom_headers)
415
+
416
+ promise = promise.then do |response|
417
+ # Defining deserialization method.
418
+ deserialize_method = lambda do |parsed_response|
419
+ end
420
+
421
+ # Waiting for response.
422
+ @client.get_long_running_operation_result(response, deserialize_method)
423
+ end
424
+
425
+ promise
426
+ end
427
+
428
+ #
429
+ # Gets all the Analysis Services servers for the given resource group.
430
+ #
431
+ # @param resource_group_name [String] The name of the Azure Resource group of
432
+ # which a given Analysis Services server is part. This name must be at least 1
433
+ # character in length, and no more than 90.
434
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
435
+ # will be added to the HTTP request.
436
+ #
437
+ # @return [AnalysisServicesServers] operation results.
438
+ #
439
+ def list_by_resource_group(resource_group_name, custom_headers = nil)
440
+ response = list_by_resource_group_async(resource_group_name, custom_headers).value!
441
+ response.body unless response.nil?
442
+ end
443
+
444
+ #
445
+ # Gets all the Analysis Services servers for the given resource group.
446
+ #
447
+ # @param resource_group_name [String] The name of the Azure Resource group of
448
+ # which a given Analysis Services server is part. This name must be at least 1
449
+ # character in length, and no more than 90.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
454
+ #
455
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
456
+ list_by_resource_group_async(resource_group_name, custom_headers).value!
457
+ end
458
+
459
+ #
460
+ # Gets all the Analysis Services servers for the given resource group.
461
+ #
462
+ # @param resource_group_name [String] The name of the Azure Resource group of
463
+ # which a given Analysis Services server is part. This name must be at least 1
464
+ # character in length, and no more than 90.
465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
466
+ # to the HTTP request.
467
+ #
468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
469
+ #
470
+ def list_by_resource_group_async(resource_group_name, custom_headers = nil)
471
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
472
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
473
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
474
+
475
+
476
+ request_headers = {}
477
+
478
+ # Set Headers
479
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
480
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
481
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers'
482
+
483
+ request_url = @base_url || @client.base_url
484
+
485
+ options = {
486
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
487
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
488
+ query_params: {'api-version' => @client.api_version},
489
+ headers: request_headers.merge(custom_headers || {}),
490
+ base_url: request_url
491
+ }
492
+ promise = @client.make_request_async(:get, path_template, options)
493
+
494
+ promise = promise.then do |result|
495
+ http_response = result.response
496
+ status_code = http_response.status
497
+ response_content = http_response.body
498
+ unless status_code == 200
499
+ error_model = JSON.load(response_content)
500
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
501
+ end
502
+
503
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
504
+ # Deserialize Response
505
+ if status_code == 200
506
+ begin
507
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
508
+ result_mapper = AnalysisServicesServers.mapper()
509
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
510
+ rescue Exception => e
511
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
512
+ end
513
+ end
514
+
515
+ result
516
+ end
517
+
518
+ promise.execute
519
+ end
520
+
521
+ #
522
+ # Lists all the Analysis Services servers for the given subscription.
523
+ #
524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
525
+ # will be added to the HTTP request.
526
+ #
527
+ # @return [AnalysisServicesServers] operation results.
528
+ #
529
+ def list(custom_headers = nil)
530
+ response = list_async(custom_headers).value!
531
+ response.body unless response.nil?
532
+ end
533
+
534
+ #
535
+ # Lists all the Analysis Services servers for the given subscription.
536
+ #
537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
538
+ # will be added to the HTTP request.
539
+ #
540
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
541
+ #
542
+ def list_with_http_info(custom_headers = nil)
543
+ list_async(custom_headers).value!
544
+ end
545
+
546
+ #
547
+ # Lists all the Analysis Services servers for the given subscription.
548
+ #
549
+ # @param [Hash{String => String}] A hash of custom headers that will be added
550
+ # to the HTTP request.
551
+ #
552
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
553
+ #
554
+ def list_async(custom_headers = nil)
555
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
556
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
557
+
558
+
559
+ request_headers = {}
560
+
561
+ # Set Headers
562
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
563
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
564
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/servers'
565
+
566
+ request_url = @base_url || @client.base_url
567
+
568
+ options = {
569
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
570
+ path_params: {'subscriptionId' => @client.subscription_id},
571
+ query_params: {'api-version' => @client.api_version},
572
+ headers: request_headers.merge(custom_headers || {}),
573
+ base_url: request_url
574
+ }
575
+ promise = @client.make_request_async(:get, path_template, options)
576
+
577
+ promise = promise.then do |result|
578
+ http_response = result.response
579
+ status_code = http_response.status
580
+ response_content = http_response.body
581
+ unless status_code == 200
582
+ error_model = JSON.load(response_content)
583
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
584
+ end
585
+
586
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
587
+ # Deserialize Response
588
+ if status_code == 200
589
+ begin
590
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
591
+ result_mapper = AnalysisServicesServers.mapper()
592
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
593
+ rescue Exception => e
594
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
595
+ end
596
+ end
597
+
598
+ result
599
+ end
600
+
601
+ promise.execute
602
+ end
603
+
604
+ #
605
+ # Provisions the specified Analysis Services server based on the configuration
606
+ # specified in the request.
607
+ #
608
+ # @param resource_group_name [String] The name of the Azure Resource group of
609
+ # which a given Analysis Services server is part. This name must be at least 1
610
+ # character in length, and no more than 90.
611
+ # @param server_name [String] The name of the Analysis Services server. It must
612
+ # be a minimum of 3 characters, and a maximum of 63.
613
+ # @param server_parameters [AnalysisServicesServer] Contains the information
614
+ # used to provision the Analysis Services server.
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ # @return [AnalysisServicesServer] operation results.
619
+ #
620
+ def begin_create(resource_group_name, server_name, server_parameters, custom_headers = nil)
621
+ response = begin_create_async(resource_group_name, server_name, server_parameters, custom_headers).value!
622
+ response.body unless response.nil?
623
+ end
624
+
625
+ #
626
+ # Provisions the specified Analysis Services server based on the configuration
627
+ # specified in the request.
628
+ #
629
+ # @param resource_group_name [String] The name of the Azure Resource group of
630
+ # which a given Analysis Services server is part. This name must be at least 1
631
+ # character in length, and no more than 90.
632
+ # @param server_name [String] The name of the Analysis Services server. It must
633
+ # be a minimum of 3 characters, and a maximum of 63.
634
+ # @param server_parameters [AnalysisServicesServer] Contains the information
635
+ # used to provision the Analysis Services server.
636
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
637
+ # will be added to the HTTP request.
638
+ #
639
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
640
+ #
641
+ def begin_create_with_http_info(resource_group_name, server_name, server_parameters, custom_headers = nil)
642
+ begin_create_async(resource_group_name, server_name, server_parameters, custom_headers).value!
643
+ end
644
+
645
+ #
646
+ # Provisions the specified Analysis Services server based on the configuration
647
+ # specified in the request.
648
+ #
649
+ # @param resource_group_name [String] The name of the Azure Resource group of
650
+ # which a given Analysis Services server is part. This name must be at least 1
651
+ # character in length, and no more than 90.
652
+ # @param server_name [String] The name of the Analysis Services server. It must
653
+ # be a minimum of 3 characters, and a maximum of 63.
654
+ # @param server_parameters [AnalysisServicesServer] Contains the information
655
+ # used to provision the Analysis Services server.
656
+ # @param [Hash{String => String}] A hash of custom headers that will be added
657
+ # to the HTTP request.
658
+ #
659
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
660
+ #
661
+ def begin_create_async(resource_group_name, server_name, server_parameters, custom_headers = nil)
662
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
663
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
664
+ fail ArgumentError, 'server_parameters is nil' if server_parameters.nil?
665
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
666
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
667
+
668
+
669
+ request_headers = {}
670
+
671
+ # Set Headers
672
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
673
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
674
+
675
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
676
+
677
+ # Serialize Request
678
+ request_mapper = AnalysisServicesServer.mapper()
679
+ request_content = @client.serialize(request_mapper, server_parameters, 'server_parameters')
680
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
681
+
682
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'
683
+
684
+ request_url = @base_url || @client.base_url
685
+
686
+ options = {
687
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
688
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
689
+ query_params: {'api-version' => @client.api_version},
690
+ body: request_content,
691
+ headers: request_headers.merge(custom_headers || {}),
692
+ base_url: request_url
693
+ }
694
+ promise = @client.make_request_async(:put, path_template, options)
695
+
696
+ promise = promise.then do |result|
697
+ http_response = result.response
698
+ status_code = http_response.status
699
+ response_content = http_response.body
700
+ unless status_code == 200 || status_code == 201
701
+ error_model = JSON.load(response_content)
702
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
703
+ end
704
+
705
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
706
+ # Deserialize Response
707
+ if status_code == 200
708
+ begin
709
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
710
+ result_mapper = AnalysisServicesServer.mapper()
711
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
712
+ rescue Exception => e
713
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
714
+ end
715
+ end
716
+ # Deserialize Response
717
+ if status_code == 201
718
+ begin
719
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
720
+ result_mapper = AnalysisServicesServer.mapper()
721
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
722
+ rescue Exception => e
723
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
724
+ end
725
+ end
726
+
727
+ result
728
+ end
729
+
730
+ promise.execute
731
+ end
732
+
733
+ #
734
+ # Deletes the specified Analysis Services server.
735
+ #
736
+ # @param resource_group_name [String] The name of the Azure Resource group of
737
+ # which a given Analysis Services server is part. This name must be at least 1
738
+ # character in length, and no more than 90.
739
+ # @param server_name [String] The name of the Analysis Services server. It must
740
+ # be at least 3 characters in length, and no more than 63.
741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
742
+ # will be added to the HTTP request.
743
+ #
744
+ #
745
+ def begin_delete(resource_group_name, server_name, custom_headers = nil)
746
+ response = begin_delete_async(resource_group_name, server_name, custom_headers).value!
747
+ nil
748
+ end
749
+
750
+ #
751
+ # Deletes the specified Analysis Services server.
752
+ #
753
+ # @param resource_group_name [String] The name of the Azure Resource group of
754
+ # which a given Analysis Services server is part. This name must be at least 1
755
+ # character in length, and no more than 90.
756
+ # @param server_name [String] The name of the Analysis Services server. It must
757
+ # be at least 3 characters in length, and no more than 63.
758
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
+ # will be added to the HTTP request.
760
+ #
761
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
762
+ #
763
+ def begin_delete_with_http_info(resource_group_name, server_name, custom_headers = nil)
764
+ begin_delete_async(resource_group_name, server_name, custom_headers).value!
765
+ end
766
+
767
+ #
768
+ # Deletes the specified Analysis Services server.
769
+ #
770
+ # @param resource_group_name [String] The name of the Azure Resource group of
771
+ # which a given Analysis Services server is part. This name must be at least 1
772
+ # character in length, and no more than 90.
773
+ # @param server_name [String] The name of the Analysis Services server. It must
774
+ # be at least 3 characters in length, and no more than 63.
775
+ # @param [Hash{String => String}] A hash of custom headers that will be added
776
+ # to the HTTP request.
777
+ #
778
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
779
+ #
780
+ def begin_delete_async(resource_group_name, server_name, custom_headers = nil)
781
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
782
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
783
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
784
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
785
+
786
+
787
+ request_headers = {}
788
+
789
+ # Set Headers
790
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
791
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
792
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'
793
+
794
+ request_url = @base_url || @client.base_url
795
+
796
+ options = {
797
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
798
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
799
+ query_params: {'api-version' => @client.api_version},
800
+ headers: request_headers.merge(custom_headers || {}),
801
+ base_url: request_url
802
+ }
803
+ promise = @client.make_request_async(:delete, path_template, options)
804
+
805
+ promise = promise.then do |result|
806
+ http_response = result.response
807
+ status_code = http_response.status
808
+ response_content = http_response.body
809
+ unless status_code == 200 || status_code == 204 || status_code == 202
810
+ error_model = JSON.load(response_content)
811
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
812
+ end
813
+
814
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
815
+
816
+ result
817
+ end
818
+
819
+ promise.execute
820
+ end
821
+
822
+ #
823
+ # Supends operation of the specified Analysis Services server instance.
824
+ #
825
+ # @param resource_group_name [String] The name of the Azure Resource group of
826
+ # which a given Analysis Services server is part. This name must be at least 1
827
+ # character in length, and no more than 90.
828
+ # @param server_name [String] The name of the Analysis Services server. It must
829
+ # be at least 3 characters in length, and no more than 63.
830
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
831
+ # will be added to the HTTP request.
832
+ #
833
+ #
834
+ def begin_suspend(resource_group_name, server_name, custom_headers = nil)
835
+ response = begin_suspend_async(resource_group_name, server_name, custom_headers).value!
836
+ nil
837
+ end
838
+
839
+ #
840
+ # Supends operation of the specified Analysis Services server instance.
841
+ #
842
+ # @param resource_group_name [String] The name of the Azure Resource group of
843
+ # which a given Analysis Services server is part. This name must be at least 1
844
+ # character in length, and no more than 90.
845
+ # @param server_name [String] The name of the Analysis Services server. It must
846
+ # be at least 3 characters in length, and no more than 63.
847
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
848
+ # will be added to the HTTP request.
849
+ #
850
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
851
+ #
852
+ def begin_suspend_with_http_info(resource_group_name, server_name, custom_headers = nil)
853
+ begin_suspend_async(resource_group_name, server_name, custom_headers).value!
854
+ end
855
+
856
+ #
857
+ # Supends operation of the specified Analysis Services server instance.
858
+ #
859
+ # @param resource_group_name [String] The name of the Azure Resource group of
860
+ # which a given Analysis Services server is part. This name must be at least 1
861
+ # character in length, and no more than 90.
862
+ # @param server_name [String] The name of the Analysis Services server. It must
863
+ # be at least 3 characters in length, and no more than 63.
864
+ # @param [Hash{String => String}] A hash of custom headers that will be added
865
+ # to the HTTP request.
866
+ #
867
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
868
+ #
869
+ def begin_suspend_async(resource_group_name, server_name, custom_headers = nil)
870
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
871
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
872
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
873
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
874
+
875
+
876
+ request_headers = {}
877
+
878
+ # Set Headers
879
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
880
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
881
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/suspend'
882
+
883
+ request_url = @base_url || @client.base_url
884
+
885
+ options = {
886
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
887
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
888
+ query_params: {'api-version' => @client.api_version},
889
+ headers: request_headers.merge(custom_headers || {}),
890
+ base_url: request_url
891
+ }
892
+ promise = @client.make_request_async(:post, path_template, options)
893
+
894
+ promise = promise.then do |result|
895
+ http_response = result.response
896
+ status_code = http_response.status
897
+ response_content = http_response.body
898
+ unless status_code == 200 || status_code == 202
899
+ error_model = JSON.load(response_content)
900
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
901
+ end
902
+
903
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
904
+
905
+ result
906
+ end
907
+
908
+ promise.execute
909
+ end
910
+
911
+ #
912
+ # Resumes operation of the specified Analysis Services server instance.
913
+ #
914
+ # @param resource_group_name [String] The name of the Azure Resource group of
915
+ # which a given Analysis Services server is part. This name must be at least 1
916
+ # character in length, and no more than 90.
917
+ # @param server_name [String] The name of the Analysis Services server. It must
918
+ # be at least 3 characters in length, and no more than 63.
919
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
920
+ # will be added to the HTTP request.
921
+ #
922
+ #
923
+ def begin_resume(resource_group_name, server_name, custom_headers = nil)
924
+ response = begin_resume_async(resource_group_name, server_name, custom_headers).value!
925
+ nil
926
+ end
927
+
928
+ #
929
+ # Resumes operation of the specified Analysis Services server instance.
930
+ #
931
+ # @param resource_group_name [String] The name of the Azure Resource group of
932
+ # which a given Analysis Services server is part. This name must be at least 1
933
+ # character in length, and no more than 90.
934
+ # @param server_name [String] The name of the Analysis Services server. It must
935
+ # be at least 3 characters in length, and no more than 63.
936
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
937
+ # will be added to the HTTP request.
938
+ #
939
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
940
+ #
941
+ def begin_resume_with_http_info(resource_group_name, server_name, custom_headers = nil)
942
+ begin_resume_async(resource_group_name, server_name, custom_headers).value!
943
+ end
944
+
945
+ #
946
+ # Resumes operation of the specified Analysis Services server instance.
947
+ #
948
+ # @param resource_group_name [String] The name of the Azure Resource group of
949
+ # which a given Analysis Services server is part. This name must be at least 1
950
+ # character in length, and no more than 90.
951
+ # @param server_name [String] The name of the Analysis Services server. It must
952
+ # be at least 3 characters in length, and no more than 63.
953
+ # @param [Hash{String => String}] A hash of custom headers that will be added
954
+ # to the HTTP request.
955
+ #
956
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
957
+ #
958
+ def begin_resume_async(resource_group_name, server_name, custom_headers = nil)
959
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
960
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
961
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
962
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
963
+
964
+
965
+ request_headers = {}
966
+
967
+ # Set Headers
968
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
969
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
970
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/resume'
971
+
972
+ request_url = @base_url || @client.base_url
973
+
974
+ options = {
975
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
976
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
977
+ query_params: {'api-version' => @client.api_version},
978
+ headers: request_headers.merge(custom_headers || {}),
979
+ base_url: request_url
980
+ }
981
+ promise = @client.make_request_async(:post, path_template, options)
982
+
983
+ promise = promise.then do |result|
984
+ http_response = result.response
985
+ status_code = http_response.status
986
+ response_content = http_response.body
987
+ unless status_code == 200 || status_code == 202
988
+ error_model = JSON.load(response_content)
989
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
990
+ end
991
+
992
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
993
+
994
+ result
995
+ end
996
+
997
+ promise.execute
998
+ end
999
+
1000
+ end
1001
+ end