azure_mgmt_traffic_manager 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f785a3e0eb70faf88f68b2b2ed887038c019099c
4
- data.tar.gz: 6ee372cbfad48405045c65bb693e733b1a49542a
3
+ metadata.gz: 6bc8c4ff3ac6019368783bf412ebb1f9b246b6c0
4
+ data.tar.gz: 116d0feaf11a21dd0dbf416773836ec6572e4c6d
5
5
  SHA512:
6
- metadata.gz: 7bc48a4ebf41758f38f875468961f48dc8de1daa81306c74489b9e41fb45d7fc71a5e2ca966212322eee793fea4239229b6f5a8cf47b55e51e71c2ab2d2335cf
7
- data.tar.gz: a72cbdf20341e892442d66f5cd2c9a07628b7a511713483bff51b4c328da47653d94ab315b6bbba0694f5ade6f3c6d5bb938ec49f2ab769098b98ff9f3b0bf50
6
+ metadata.gz: 46109fec00eab31f5d156bc6d7e69b5e1b40af6416deeefa4bfcb10c8cce273053447df805a5f5c4bbe873185b9c2ace3923f329e41ccd66b67a78dfc44d7ded
7
+ data.tar.gz: c724deadd46333b7a10d81e52133e6f223bc0c035a4459c21a528e22bd701123fe3de2627dadb5d5c4648808e247b16d2fa0dd77706c9f43e01f932c8cda9119
@@ -106,31 +106,28 @@ module Azure::ARM::TrafficManager
106
106
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
107
107
 
108
108
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
109
+
110
+ request_url = @base_url || @client.base_url
111
+
109
112
  options = {
110
113
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
111
114
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
112
115
  query_params: {'api-version' => @client.api_version},
113
116
  body: request_content,
114
- headers: request_headers.merge(custom_headers || {})
117
+ headers: request_headers.merge(custom_headers || {}),
118
+ base_url: request_url
115
119
  }
120
+ promise = @client.make_request_async(:patch, path_template, options)
116
121
 
117
- request_url = @base_url || @client.base_url
118
-
119
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
120
- promise = request.run_promise do |req|
121
- @client.credentials.sign_request(req) unless @client.credentials.nil?
122
- end
123
-
124
- promise = promise.then do |http_response|
122
+ promise = promise.then do |result|
123
+ http_response = result.response
125
124
  status_code = http_response.status
126
125
  response_content = http_response.body
127
126
  unless status_code == 200
128
127
  error_model = JSON.load(response_content)
129
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
128
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
130
129
  end
131
130
 
132
- # Create Result
133
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
134
131
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
135
132
  # Deserialize Response
136
133
  if status_code == 200
@@ -212,30 +209,27 @@ module Azure::ARM::TrafficManager
212
209
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
213
210
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
214
211
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
212
+
213
+ request_url = @base_url || @client.base_url
214
+
215
215
  options = {
216
216
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
217
217
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
218
218
  query_params: {'api-version' => @client.api_version},
219
- headers: request_headers.merge(custom_headers || {})
219
+ headers: request_headers.merge(custom_headers || {}),
220
+ base_url: request_url
220
221
  }
222
+ promise = @client.make_request_async(:get, path_template, options)
221
223
 
222
- request_url = @base_url || @client.base_url
223
-
224
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
225
- promise = request.run_promise do |req|
226
- @client.credentials.sign_request(req) unless @client.credentials.nil?
227
- end
228
-
229
- promise = promise.then do |http_response|
224
+ promise = promise.then do |result|
225
+ http_response = result.response
230
226
  status_code = http_response.status
231
227
  response_content = http_response.body
232
228
  unless status_code == 200
233
229
  error_model = JSON.load(response_content)
234
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
230
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
235
231
  end
236
232
 
237
- # Create Result
238
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
239
233
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
240
234
  # Deserialize Response
241
235
  if status_code == 200
@@ -338,31 +332,28 @@ module Azure::ARM::TrafficManager
338
332
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
339
333
 
340
334
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
335
+
336
+ request_url = @base_url || @client.base_url
337
+
341
338
  options = {
342
339
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
343
340
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
344
341
  query_params: {'api-version' => @client.api_version},
345
342
  body: request_content,
346
- headers: request_headers.merge(custom_headers || {})
343
+ headers: request_headers.merge(custom_headers || {}),
344
+ base_url: request_url
347
345
  }
346
+ promise = @client.make_request_async(:put, path_template, options)
348
347
 
349
- request_url = @base_url || @client.base_url
350
-
351
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
352
- promise = request.run_promise do |req|
353
- @client.credentials.sign_request(req) unless @client.credentials.nil?
354
- end
355
-
356
- promise = promise.then do |http_response|
348
+ promise = promise.then do |result|
349
+ http_response = result.response
357
350
  status_code = http_response.status
358
351
  response_content = http_response.body
359
352
  unless status_code == 200 || status_code == 201
360
353
  error_model = JSON.load(response_content)
361
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
354
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
362
355
  end
363
356
 
364
- # Create Result
365
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
366
357
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
367
358
  # Deserialize Response
368
359
  if status_code == 200
@@ -459,30 +450,27 @@ module Azure::ARM::TrafficManager
459
450
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
460
451
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
461
452
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
453
+
454
+ request_url = @base_url || @client.base_url
455
+
462
456
  options = {
463
457
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
464
458
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
465
459
  query_params: {'api-version' => @client.api_version},
466
- headers: request_headers.merge(custom_headers || {})
460
+ headers: request_headers.merge(custom_headers || {}),
461
+ base_url: request_url
467
462
  }
463
+ promise = @client.make_request_async(:delete, path_template, options)
468
464
 
469
- request_url = @base_url || @client.base_url
470
-
471
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
472
- promise = request.run_promise do |req|
473
- @client.credentials.sign_request(req) unless @client.credentials.nil?
474
- end
475
-
476
- promise = promise.then do |http_response|
465
+ promise = promise.then do |result|
466
+ http_response = result.response
477
467
  status_code = http_response.status
478
468
  response_content = http_response.body
479
469
  unless status_code == 200 || status_code == 204
480
470
  error_model = JSON.load(response_content)
481
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
471
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
482
472
  end
483
473
 
484
- # Create Result
485
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
486
474
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
487
475
 
488
476
  result
@@ -84,31 +84,28 @@ module Azure::ARM::TrafficManager
84
84
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
85
85
 
86
86
  path_template = '/providers/Microsoft.Network/checkTrafficManagerNameAvailability'
87
+
88
+ request_url = @base_url || @client.base_url
89
+
87
90
  options = {
88
91
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
92
  path_params: {'subscriptionId' => @client.subscription_id},
90
93
  query_params: {'api-version' => @client.api_version},
91
94
  body: request_content,
92
- headers: request_headers.merge(custom_headers || {})
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
93
97
  }
98
+ promise = @client.make_request_async(:post, path_template, options)
94
99
 
95
- request_url = @base_url || @client.base_url
96
-
97
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
98
- promise = request.run_promise do |req|
99
- @client.credentials.sign_request(req) unless @client.credentials.nil?
100
- end
101
-
102
- promise = promise.then do |http_response|
100
+ promise = promise.then do |result|
101
+ http_response = result.response
103
102
  status_code = http_response.status
104
103
  response_content = http_response.body
105
104
  unless status_code == 200
106
105
  error_model = JSON.load(response_content)
107
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
108
107
  end
109
108
 
110
- # Create Result
111
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
112
109
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
110
  # Deserialize Response
114
111
  if status_code == 200
@@ -178,30 +175,27 @@ module Azure::ARM::TrafficManager
178
175
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
179
176
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
180
177
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles'
178
+
179
+ request_url = @base_url || @client.base_url
180
+
181
181
  options = {
182
182
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
183
183
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
184
184
  query_params: {'api-version' => @client.api_version},
185
- headers: request_headers.merge(custom_headers || {})
185
+ headers: request_headers.merge(custom_headers || {}),
186
+ base_url: request_url
186
187
  }
188
+ promise = @client.make_request_async(:get, path_template, options)
187
189
 
188
- request_url = @base_url || @client.base_url
189
-
190
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
191
- promise = request.run_promise do |req|
192
- @client.credentials.sign_request(req) unless @client.credentials.nil?
193
- end
194
-
195
- promise = promise.then do |http_response|
190
+ promise = promise.then do |result|
191
+ http_response = result.response
196
192
  status_code = http_response.status
197
193
  response_content = http_response.body
198
194
  unless status_code == 200
199
195
  error_model = JSON.load(response_content)
200
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
196
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
201
197
  end
202
198
 
203
- # Create Result
204
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
205
199
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
206
200
  # Deserialize Response
207
201
  if status_code == 200
@@ -264,30 +258,27 @@ module Azure::ARM::TrafficManager
264
258
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
265
259
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
266
260
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles'
261
+
262
+ request_url = @base_url || @client.base_url
263
+
267
264
  options = {
268
265
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
269
266
  path_params: {'subscriptionId' => @client.subscription_id},
270
267
  query_params: {'api-version' => @client.api_version},
271
- headers: request_headers.merge(custom_headers || {})
268
+ headers: request_headers.merge(custom_headers || {}),
269
+ base_url: request_url
272
270
  }
271
+ promise = @client.make_request_async(:get, path_template, options)
273
272
 
274
- request_url = @base_url || @client.base_url
275
-
276
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
277
- promise = request.run_promise do |req|
278
- @client.credentials.sign_request(req) unless @client.credentials.nil?
279
- end
280
-
281
- promise = promise.then do |http_response|
273
+ promise = promise.then do |result|
274
+ http_response = result.response
282
275
  status_code = http_response.status
283
276
  response_content = http_response.body
284
277
  unless status_code == 200
285
278
  error_model = JSON.load(response_content)
286
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
279
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
287
280
  end
288
281
 
289
- # Create Result
290
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
291
282
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
292
283
  # Deserialize Response
293
284
  if status_code == 200
@@ -361,30 +352,27 @@ module Azure::ARM::TrafficManager
361
352
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
362
353
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
363
354
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'
355
+
356
+ request_url = @base_url || @client.base_url
357
+
364
358
  options = {
365
359
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
360
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
367
361
  query_params: {'api-version' => @client.api_version},
368
- headers: request_headers.merge(custom_headers || {})
362
+ headers: request_headers.merge(custom_headers || {}),
363
+ base_url: request_url
369
364
  }
365
+ promise = @client.make_request_async(:get, path_template, options)
370
366
 
371
- request_url = @base_url || @client.base_url
372
-
373
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
374
- promise = request.run_promise do |req|
375
- @client.credentials.sign_request(req) unless @client.credentials.nil?
376
- end
377
-
378
- promise = promise.then do |http_response|
367
+ promise = promise.then do |result|
368
+ http_response = result.response
379
369
  status_code = http_response.status
380
370
  response_content = http_response.body
381
371
  unless status_code == 200
382
372
  error_model = JSON.load(response_content)
383
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
373
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
384
374
  end
385
375
 
386
- # Create Result
387
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
388
376
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
389
377
  # Deserialize Response
390
378
  if status_code == 200
@@ -473,31 +461,28 @@ module Azure::ARM::TrafficManager
473
461
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
474
462
 
475
463
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'
464
+
465
+ request_url = @base_url || @client.base_url
466
+
476
467
  options = {
477
468
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
478
469
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
479
470
  query_params: {'api-version' => @client.api_version},
480
471
  body: request_content,
481
- headers: request_headers.merge(custom_headers || {})
472
+ headers: request_headers.merge(custom_headers || {}),
473
+ base_url: request_url
482
474
  }
475
+ promise = @client.make_request_async(:put, path_template, options)
483
476
 
484
- request_url = @base_url || @client.base_url
485
-
486
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
487
- promise = request.run_promise do |req|
488
- @client.credentials.sign_request(req) unless @client.credentials.nil?
489
- end
490
-
491
- promise = promise.then do |http_response|
477
+ promise = promise.then do |result|
478
+ http_response = result.response
492
479
  status_code = http_response.status
493
480
  response_content = http_response.body
494
481
  unless status_code == 200 || status_code == 201
495
482
  error_model = JSON.load(response_content)
496
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
483
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
497
484
  end
498
485
 
499
- # Create Result
500
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
501
486
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
502
487
  # Deserialize Response
503
488
  if status_code == 200
@@ -583,30 +568,27 @@ module Azure::ARM::TrafficManager
583
568
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
584
569
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
585
570
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'
571
+
572
+ request_url = @base_url || @client.base_url
573
+
586
574
  options = {
587
575
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
588
576
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
589
577
  query_params: {'api-version' => @client.api_version},
590
- headers: request_headers.merge(custom_headers || {})
578
+ headers: request_headers.merge(custom_headers || {}),
579
+ base_url: request_url
591
580
  }
581
+ promise = @client.make_request_async(:delete, path_template, options)
592
582
 
593
- request_url = @base_url || @client.base_url
594
-
595
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
596
- promise = request.run_promise do |req|
597
- @client.credentials.sign_request(req) unless @client.credentials.nil?
598
- end
599
-
600
- promise = promise.then do |http_response|
583
+ promise = promise.then do |result|
584
+ http_response = result.response
601
585
  status_code = http_response.status
602
586
  response_content = http_response.body
603
587
  unless status_code == 200 || status_code == 204
604
588
  error_model = JSON.load(response_content)
605
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
589
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
606
590
  end
607
591
 
608
- # Create Result
609
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
610
592
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
611
593
 
612
594
  result
@@ -685,31 +667,28 @@ module Azure::ARM::TrafficManager
685
667
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
686
668
 
687
669
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'
670
+
671
+ request_url = @base_url || @client.base_url
672
+
688
673
  options = {
689
674
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
690
675
  path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
691
676
  query_params: {'api-version' => @client.api_version},
692
677
  body: request_content,
693
- headers: request_headers.merge(custom_headers || {})
678
+ headers: request_headers.merge(custom_headers || {}),
679
+ base_url: request_url
694
680
  }
681
+ promise = @client.make_request_async(:patch, path_template, options)
695
682
 
696
- request_url = @base_url || @client.base_url
697
-
698
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
699
- promise = request.run_promise do |req|
700
- @client.credentials.sign_request(req) unless @client.credentials.nil?
701
- end
702
-
703
- promise = promise.then do |http_response|
683
+ promise = promise.then do |result|
684
+ http_response = result.response
704
685
  status_code = http_response.status
705
686
  response_content = http_response.body
706
687
  unless status_code == 200
707
688
  error_model = JSON.load(response_content)
708
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
689
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
709
690
  end
710
691
 
711
- # Create Result
712
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
713
692
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
714
693
  # Deserialize Response
715
694
  if status_code == 200
@@ -36,10 +36,6 @@ module Azure::ARM::TrafficManager
36
36
  # is generated and included in each request. Default is true.
37
37
  attr_accessor :generate_client_request_id
38
38
 
39
- # @return Subscription credentials which uniquely identify client
40
- # subscription.
41
- attr_accessor :credentials
42
-
43
39
  # @return [Endpoints] endpoints
44
40
  attr_reader :endpoints
45
41
 
@@ -68,5 +64,60 @@ module Azure::ARM::TrafficManager
68
64
  @generate_client_request_id = true
69
65
  end
70
66
 
67
+ #
68
+ # Makes a request and returns the body of the response.
69
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
70
+ # @param path [String] the path, relative to {base_url}.
71
+ # @param options [Hash{String=>String}] specifying any request options like :body.
72
+ # @return [Hash{String=>String}] containing the body of the response.
73
+ # Example:
74
+ #
75
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
76
+ # path = "/path"
77
+ # options = {
78
+ # body: request_content,
79
+ # query_params: {'api-version' => '2016-02-01'}
80
+ # }
81
+ # result = @client.make_request(:put, path, options)
82
+ #
83
+ def make_request(method, path, options = {})
84
+ result = make_request_with_http_info(method, path, options)
85
+ result.body unless result.nil?
86
+ end
87
+
88
+ #
89
+ # Makes a request and returns the operation response.
90
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
+ # @param path [String] the path, relative to {base_url}.
92
+ # @param options [Hash{String=>String}] specifying any request options like :body.
93
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
94
+ #
95
+ def make_request_with_http_info(method, path, options = {})
96
+ result = make_request_async(method, path, options).value!
97
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
98
+ result
99
+ end
100
+
101
+ #
102
+ # Makes a request asynchronously.
103
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
104
+ # @param path [String] the path, relative to {base_url}.
105
+ # @param options [Hash{String=>String}] specifying any request options like :body.
106
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
107
+ #
108
+ def make_request_async(method, path, options = {})
109
+ fail ArgumentError, 'method is nil' if method.nil?
110
+ fail ArgumentError, 'path is nil' if path.nil?
111
+
112
+ request_url = options[:base_url] || @base_url
113
+
114
+ request_headers = @request_headers
115
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
116
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
117
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
118
+
119
+ super(request_url, method, path, options)
120
+ end
121
+
71
122
  end
72
123
  end
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::TrafficManager
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_traffic_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.0
75
+ version: 0.6.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.5.0
82
+ version: 0.6.0
83
83
  description: Microsoft Azure Traffic Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 1.9.3
116
+ version: 2.0.0
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - ">="