azure_mgmt_relay 0.15.2 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2016-07-01/generated/azure_mgmt_relay/hybrid_connections.rb +406 -72
  3. data/lib/2016-07-01/generated/azure_mgmt_relay/models/authorization_rule_list_result.rb +1 -1
  4. data/lib/2016-07-01/generated/azure_mgmt_relay/models/hybrid_connection_list_result.rb +1 -1
  5. data/lib/2016-07-01/generated/azure_mgmt_relay/models/operation_list_result.rb +1 -1
  6. data/lib/2016-07-01/generated/azure_mgmt_relay/models/relay_namespace_list_result.rb +1 -1
  7. data/lib/2016-07-01/generated/azure_mgmt_relay/models/resource.rb +9 -0
  8. data/lib/2016-07-01/generated/azure_mgmt_relay/models/wcf_relays_list_result.rb +1 -1
  9. data/lib/2016-07-01/generated/azure_mgmt_relay/namespaces.rb +428 -107
  10. data/lib/2016-07-01/generated/azure_mgmt_relay/operations.rb +15 -13
  11. data/lib/2016-07-01/generated/azure_mgmt_relay/relay_management_client.rb +10 -6
  12. data/lib/2016-07-01/generated/azure_mgmt_relay/wcfrelays.rb +406 -72
  13. data/lib/2017-04-01/generated/azure_mgmt_relay/hybrid_connections.rb +78 -72
  14. data/lib/2017-04-01/generated/azure_mgmt_relay/models/authorization_rule_list_result.rb +1 -1
  15. data/lib/2017-04-01/generated/azure_mgmt_relay/models/hybrid_connection_list_result.rb +1 -1
  16. data/lib/2017-04-01/generated/azure_mgmt_relay/models/operation_list_result.rb +1 -1
  17. data/lib/2017-04-01/generated/azure_mgmt_relay/models/relay_namespace_list_result.rb +1 -1
  18. data/lib/2017-04-01/generated/azure_mgmt_relay/models/resource.rb +9 -0
  19. data/lib/2017-04-01/generated/azure_mgmt_relay/models/wcf_relays_list_result.rb +1 -1
  20. data/lib/2017-04-01/generated/azure_mgmt_relay/namespaces.rb +113 -107
  21. data/lib/2017-04-01/generated/azure_mgmt_relay/operations.rb +15 -13
  22. data/lib/2017-04-01/generated/azure_mgmt_relay/relay_management_client.rb +10 -6
  23. data/lib/2017-04-01/generated/azure_mgmt_relay/wcfrelays.rb +78 -72
  24. data/lib/azure_mgmt_relay.rb +1 -1
  25. data/lib/profiles/latest/modules/relay_profile_module.rb +112 -93
  26. data/lib/profiles/latest/relay_latest_profile_client.rb +28 -9
  27. data/lib/profiles/latest/relay_module_definition.rb +0 -1
  28. data/lib/version.rb +1 -1
  29. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 29434fa3e75bd7bfb0495ae38ee491a59a13b289
4
- data.tar.gz: ee43d68c7c699282ce7d6da762da6031d1a800c1
2
+ SHA256:
3
+ metadata.gz: 909f4a163e85cd4fe5e5f8b8a2cfc27aad5cb41d6bd7fb53a5b278ef12faac4c
4
+ data.tar.gz: b4cb0f29aed1eadc33089a8356740f204d98108fa708f87809900f3bf55b1e5a
5
5
  SHA512:
6
- metadata.gz: 0947ae5d08c1cab1e5712bace19821ee34dfc6d45509d74e59fab20eb54bba123600f8801111a353f9bf3aaf627676970132825fd5c28ed93ee450aad5beeced
7
- data.tar.gz: 3d26e7f8b9a1498fbd1d016fbce094fc198360133e76a6a37507e27b415839c53a345a3c4196877b288cf915990ceb5b53cb281e4786079d885bdde9bc3c722a
6
+ metadata.gz: f2501ec169c32501748f25d5f27f3f4389e1f3edd490f1ed9f0683dc1e9d76b45aa2e7584f32b899d9fd61b835b943807a9f2d7075ecac82a904a2d9d6ac914c
7
+ data.tar.gz: 82a0bfc24a7a3b908c49c9b178c583b2582068575f2eafd1bf11ce5bbb00a8c832494bacd1fb6dd2638360fc84deeaafa5a974452dd97d0b137bb6833b935e7e
@@ -33,8 +33,8 @@ module Azure::Relay::Mgmt::V2016_07_01
33
33
  #
34
34
  # @return [Array<HybridConnection>] operation results.
35
35
  #
36
- def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil)
37
- first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers)
36
+ def list_by_namespace(resource_group_name, namespace_name, custom_headers:nil)
37
+ first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
38
38
  first_page.get_all_items
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::Relay::Mgmt::V2016_07_01
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
53
- list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
52
+ def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
53
+ list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,7 +64,7 @@ module Azure::Relay::Mgmt::V2016_07_01
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil)
67
+ def list_by_namespace_async(resource_group_name, namespace_name, custom_headers:nil)
68
68
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
69
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
70
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -76,6 +76,7 @@ module Azure::Relay::Mgmt::V2016_07_01
76
76
 
77
77
 
78
78
  request_headers = {}
79
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
80
 
80
81
  # Set Headers
81
82
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -134,8 +135,8 @@ module Azure::Relay::Mgmt::V2016_07_01
134
135
  #
135
136
  # @return [HybridConnection] operation results.
136
137
  #
137
- def create_or_update(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers = nil)
138
- response = create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers).value!
138
+ def create_or_update(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers:nil)
139
+ response = create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers:custom_headers).value!
139
140
  response.body unless response.nil?
140
141
  end
141
142
 
@@ -153,8 +154,8 @@ module Azure::Relay::Mgmt::V2016_07_01
153
154
  #
154
155
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
155
156
  #
156
- def create_or_update_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers = nil)
157
- create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers).value!
157
+ def create_or_update_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers:nil)
158
+ create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers:custom_headers).value!
158
159
  end
159
160
 
160
161
  #
@@ -171,7 +172,7 @@ module Azure::Relay::Mgmt::V2016_07_01
171
172
  #
172
173
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
173
174
  #
174
- def create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers = nil)
175
+ def create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers:nil)
175
176
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
176
177
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
177
178
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -187,13 +188,12 @@ module Azure::Relay::Mgmt::V2016_07_01
187
188
 
188
189
 
189
190
  request_headers = {}
191
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
190
192
 
191
193
  # Set Headers
192
194
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
193
195
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
194
196
 
195
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
196
-
197
197
  # Serialize Request
198
198
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::HybridConnection.mapper()
199
199
  request_content = @client.serialize(request_mapper, parameters)
@@ -251,8 +251,8 @@ module Azure::Relay::Mgmt::V2016_07_01
251
251
  # will be added to the HTTP request.
252
252
  #
253
253
  #
254
- def delete(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
255
- response = delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
254
+ def delete(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
255
+ response = delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
256
256
  nil
257
257
  end
258
258
 
@@ -268,8 +268,8 @@ module Azure::Relay::Mgmt::V2016_07_01
268
268
  #
269
269
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
270
270
  #
271
- def delete_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
272
- delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
271
+ def delete_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
272
+ delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
273
273
  end
274
274
 
275
275
  #
@@ -284,7 +284,7 @@ module Azure::Relay::Mgmt::V2016_07_01
284
284
  #
285
285
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
286
  #
287
- def delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
287
+ def delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
288
288
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
289
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
290
290
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -299,6 +299,7 @@ module Azure::Relay::Mgmt::V2016_07_01
299
299
 
300
300
 
301
301
  request_headers = {}
302
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
303
 
303
304
  # Set Headers
304
305
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -345,8 +346,8 @@ module Azure::Relay::Mgmt::V2016_07_01
345
346
  #
346
347
  # @return [HybridConnection] operation results.
347
348
  #
348
- def get(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
349
- response = get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
349
+ def get(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
350
+ response = get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
350
351
  response.body unless response.nil?
351
352
  end
352
353
 
@@ -362,8 +363,8 @@ module Azure::Relay::Mgmt::V2016_07_01
362
363
  #
363
364
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
364
365
  #
365
- def get_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
366
- get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
366
+ def get_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
367
+ get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
367
368
  end
368
369
 
369
370
  #
@@ -378,7 +379,7 @@ module Azure::Relay::Mgmt::V2016_07_01
378
379
  #
379
380
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
380
381
  #
381
- def get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
382
+ def get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
382
383
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
383
384
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
384
385
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -393,6 +394,7 @@ module Azure::Relay::Mgmt::V2016_07_01
393
394
 
394
395
 
395
396
  request_headers = {}
397
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
396
398
 
397
399
  # Set Headers
398
400
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -449,8 +451,8 @@ module Azure::Relay::Mgmt::V2016_07_01
449
451
  #
450
452
  # @return [Array<AuthorizationRule>] operation results.
451
453
  #
452
- def list_authorization_rules(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
453
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers)
454
+ def list_authorization_rules(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
455
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers)
454
456
  first_page.get_all_items
455
457
  end
456
458
 
@@ -466,8 +468,8 @@ module Azure::Relay::Mgmt::V2016_07_01
466
468
  #
467
469
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
468
470
  #
469
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
470
- list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
471
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
472
+ list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
471
473
  end
472
474
 
473
475
  #
@@ -482,7 +484,7 @@ module Azure::Relay::Mgmt::V2016_07_01
482
484
  #
483
485
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
484
486
  #
485
- def list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
487
+ def list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
486
488
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
487
489
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
488
490
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -497,6 +499,7 @@ module Azure::Relay::Mgmt::V2016_07_01
497
499
 
498
500
 
499
501
  request_headers = {}
502
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
500
503
 
501
504
  # Set Headers
502
505
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -541,6 +544,111 @@ module Azure::Relay::Mgmt::V2016_07_01
541
544
  promise.execute
542
545
  end
543
546
 
547
+ #
548
+ # Authorization rules for a HybridConnection.
549
+ #
550
+ # @param resource_group_name [String] Name of the Resource group within the
551
+ # Azure subscription.
552
+ # @param namespace_name [String] The Namespace Name
553
+ # @param hybrid_connection_name [String] The hybrid connection name.
554
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
555
+ # will be added to the HTTP request.
556
+ #
557
+ # @return [Array<AuthorizationRule>] operation results.
558
+ #
559
+ def list_post_authorization_rules(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
560
+ first_page = list_post_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers)
561
+ first_page.get_all_items
562
+ end
563
+
564
+ #
565
+ # Authorization rules for a HybridConnection.
566
+ #
567
+ # @param resource_group_name [String] Name of the Resource group within the
568
+ # Azure subscription.
569
+ # @param namespace_name [String] The Namespace Name
570
+ # @param hybrid_connection_name [String] The hybrid connection name.
571
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
572
+ # will be added to the HTTP request.
573
+ #
574
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
575
+ #
576
+ def list_post_authorization_rules_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
577
+ list_post_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
578
+ end
579
+
580
+ #
581
+ # Authorization rules for a HybridConnection.
582
+ #
583
+ # @param resource_group_name [String] Name of the Resource group within the
584
+ # Azure subscription.
585
+ # @param namespace_name [String] The Namespace Name
586
+ # @param hybrid_connection_name [String] The hybrid connection name.
587
+ # @param [Hash{String => String}] A hash of custom headers that will be added
588
+ # to the HTTP request.
589
+ #
590
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
591
+ #
592
+ def list_post_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
593
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
594
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
595
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
596
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
597
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
598
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
599
+ fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil?
600
+ fail ArgumentError, "'hybrid_connection_name' should satisfy the constraint - 'MaxLength': '50'" if !hybrid_connection_name.nil? && hybrid_connection_name.length > 50
601
+ fail ArgumentError, "'hybrid_connection_name' should satisfy the constraint - 'MinLength': '1'" if !hybrid_connection_name.nil? && hybrid_connection_name.length < 1
602
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
603
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
604
+
605
+
606
+ request_headers = {}
607
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
608
+
609
+ # Set Headers
610
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
611
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
612
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules'
613
+
614
+ request_url = @base_url || @client.base_url
615
+
616
+ options = {
617
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
618
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'subscriptionId' => @client.subscription_id},
619
+ query_params: {'api-version' => @client.api_version},
620
+ headers: request_headers.merge(custom_headers || {}),
621
+ base_url: request_url
622
+ }
623
+ promise = @client.make_request_async(:post, path_template, options)
624
+
625
+ promise = promise.then do |result|
626
+ http_response = result.response
627
+ status_code = http_response.status
628
+ response_content = http_response.body
629
+ unless status_code == 200
630
+ error_model = JSON.load(response_content)
631
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
632
+ end
633
+
634
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
635
+ # Deserialize Response
636
+ if status_code == 200
637
+ begin
638
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
639
+ result_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::AuthorizationRuleListResult.mapper()
640
+ result.body = @client.deserialize(result_mapper, parsed_response)
641
+ rescue Exception => e
642
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
643
+ end
644
+ end
645
+
646
+ result
647
+ end
648
+
649
+ promise.execute
650
+ end
651
+
544
652
  #
545
653
  # Creates or Updates an authorization rule for a HybridConnection
546
654
  #
@@ -555,8 +663,8 @@ module Azure::Relay::Mgmt::V2016_07_01
555
663
  #
556
664
  # @return [AuthorizationRule] operation results.
557
665
  #
558
- def create_or_update_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
559
- response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value!
666
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
667
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
560
668
  response.body unless response.nil?
561
669
  end
562
670
 
@@ -574,8 +682,8 @@ module Azure::Relay::Mgmt::V2016_07_01
574
682
  #
575
683
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
576
684
  #
577
- def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
578
- create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value!
685
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
686
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
579
687
  end
580
688
 
581
689
  #
@@ -592,7 +700,7 @@ module Azure::Relay::Mgmt::V2016_07_01
592
700
  #
593
701
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
594
702
  #
595
- def create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
703
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
596
704
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
597
705
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
598
706
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -611,13 +719,12 @@ module Azure::Relay::Mgmt::V2016_07_01
611
719
 
612
720
 
613
721
  request_headers = {}
722
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
614
723
 
615
724
  # Set Headers
616
725
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
617
726
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
618
727
 
619
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
620
-
621
728
  # Serialize Request
622
729
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::AuthorizationRule.mapper()
623
730
  request_content = @client.serialize(request_mapper, parameters)
@@ -676,8 +783,8 @@ module Azure::Relay::Mgmt::V2016_07_01
676
783
  # will be added to the HTTP request.
677
784
  #
678
785
  #
679
- def delete_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
680
- response = delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
786
+ def delete_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
787
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
681
788
  nil
682
789
  end
683
790
 
@@ -694,8 +801,8 @@ module Azure::Relay::Mgmt::V2016_07_01
694
801
  #
695
802
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
696
803
  #
697
- def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
698
- delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
804
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
805
+ delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
699
806
  end
700
807
 
701
808
  #
@@ -711,7 +818,7 @@ module Azure::Relay::Mgmt::V2016_07_01
711
818
  #
712
819
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
713
820
  #
714
- def delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
821
+ def delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
715
822
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
716
823
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
717
824
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -729,6 +836,7 @@ module Azure::Relay::Mgmt::V2016_07_01
729
836
 
730
837
 
731
838
  request_headers = {}
839
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
732
840
 
733
841
  # Set Headers
734
842
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -776,8 +884,8 @@ module Azure::Relay::Mgmt::V2016_07_01
776
884
  #
777
885
  # @return [AuthorizationRule] operation results.
778
886
  #
779
- def get_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
780
- response = get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
887
+ def get_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
888
+ response = get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
781
889
  response.body unless response.nil?
782
890
  end
783
891
 
@@ -794,8 +902,8 @@ module Azure::Relay::Mgmt::V2016_07_01
794
902
  #
795
903
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
796
904
  #
797
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
798
- get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
905
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
906
+ get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
799
907
  end
800
908
 
801
909
  #
@@ -811,7 +919,7 @@ module Azure::Relay::Mgmt::V2016_07_01
811
919
  #
812
920
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
813
921
  #
814
- def get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
922
+ def get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
815
923
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
816
924
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
817
925
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -829,6 +937,7 @@ module Azure::Relay::Mgmt::V2016_07_01
829
937
 
830
938
 
831
939
  request_headers = {}
940
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
832
941
 
833
942
  # Set Headers
834
943
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -873,6 +982,117 @@ module Azure::Relay::Mgmt::V2016_07_01
873
982
  promise.execute
874
983
  end
875
984
 
985
+ #
986
+ # HybridConnection authorizationRule for a HybridConnection by name.
987
+ #
988
+ # @param resource_group_name [String] Name of the Resource group within the
989
+ # Azure subscription.
990
+ # @param namespace_name [String] The Namespace Name
991
+ # @param hybrid_connection_name [String] The hybrid connection name.
992
+ # @param authorization_rule_name [String] The authorizationRule name.
993
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
994
+ # will be added to the HTTP request.
995
+ #
996
+ # @return [AuthorizationRule] operation results.
997
+ #
998
+ def post_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
999
+ response = post_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
1000
+ response.body unless response.nil?
1001
+ end
1002
+
1003
+ #
1004
+ # HybridConnection authorizationRule for a HybridConnection by name.
1005
+ #
1006
+ # @param resource_group_name [String] Name of the Resource group within the
1007
+ # Azure subscription.
1008
+ # @param namespace_name [String] The Namespace Name
1009
+ # @param hybrid_connection_name [String] The hybrid connection name.
1010
+ # @param authorization_rule_name [String] The authorizationRule name.
1011
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1012
+ # will be added to the HTTP request.
1013
+ #
1014
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1015
+ #
1016
+ def post_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
1017
+ post_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
1018
+ end
1019
+
1020
+ #
1021
+ # HybridConnection authorizationRule for a HybridConnection by name.
1022
+ #
1023
+ # @param resource_group_name [String] Name of the Resource group within the
1024
+ # Azure subscription.
1025
+ # @param namespace_name [String] The Namespace Name
1026
+ # @param hybrid_connection_name [String] The hybrid connection name.
1027
+ # @param authorization_rule_name [String] The authorizationRule name.
1028
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1029
+ # to the HTTP request.
1030
+ #
1031
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1032
+ #
1033
+ def post_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
1034
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1035
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1036
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1037
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1038
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1039
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1040
+ fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil?
1041
+ fail ArgumentError, "'hybrid_connection_name' should satisfy the constraint - 'MaxLength': '50'" if !hybrid_connection_name.nil? && hybrid_connection_name.length > 50
1042
+ fail ArgumentError, "'hybrid_connection_name' should satisfy the constraint - 'MinLength': '1'" if !hybrid_connection_name.nil? && hybrid_connection_name.length < 1
1043
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1044
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50
1045
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1046
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1047
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1048
+
1049
+
1050
+ request_headers = {}
1051
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1052
+
1053
+ # Set Headers
1054
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1055
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1056
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}'
1057
+
1058
+ request_url = @base_url || @client.base_url
1059
+
1060
+ options = {
1061
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1062
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1063
+ query_params: {'api-version' => @client.api_version},
1064
+ headers: request_headers.merge(custom_headers || {}),
1065
+ base_url: request_url
1066
+ }
1067
+ promise = @client.make_request_async(:post, path_template, options)
1068
+
1069
+ promise = promise.then do |result|
1070
+ http_response = result.response
1071
+ status_code = http_response.status
1072
+ response_content = http_response.body
1073
+ unless status_code == 200
1074
+ error_model = JSON.load(response_content)
1075
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1076
+ end
1077
+
1078
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1079
+ # Deserialize Response
1080
+ if status_code == 200
1081
+ begin
1082
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1083
+ result_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::AuthorizationRule.mapper()
1084
+ result.body = @client.deserialize(result_mapper, parsed_response)
1085
+ rescue Exception => e
1086
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1087
+ end
1088
+ end
1089
+
1090
+ result
1091
+ end
1092
+
1093
+ promise.execute
1094
+ end
1095
+
876
1096
  #
877
1097
  # Primary and Secondary ConnectionStrings to the HybridConnection.
878
1098
  #
@@ -886,8 +1106,8 @@ module Azure::Relay::Mgmt::V2016_07_01
886
1106
  #
887
1107
  # @return [AuthorizationRuleKeys] operation results.
888
1108
  #
889
- def list_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
890
- response = list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
1109
+ def list_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
1110
+ response = list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
891
1111
  response.body unless response.nil?
892
1112
  end
893
1113
 
@@ -904,8 +1124,8 @@ module Azure::Relay::Mgmt::V2016_07_01
904
1124
  #
905
1125
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
906
1126
  #
907
- def list_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
908
- list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value!
1127
+ def list_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
1128
+ list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:custom_headers).value!
909
1129
  end
910
1130
 
911
1131
  #
@@ -921,7 +1141,7 @@ module Azure::Relay::Mgmt::V2016_07_01
921
1141
  #
922
1142
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
923
1143
  #
924
- def list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil)
1144
+ def list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers:nil)
925
1145
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
926
1146
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
927
1147
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -939,6 +1159,7 @@ module Azure::Relay::Mgmt::V2016_07_01
939
1159
 
940
1160
 
941
1161
  request_headers = {}
1162
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
942
1163
 
943
1164
  # Set Headers
944
1165
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -999,8 +1220,8 @@ module Azure::Relay::Mgmt::V2016_07_01
999
1220
  #
1000
1221
  # @return [AuthorizationRuleKeys] operation results.
1001
1222
  #
1002
- def regenerate_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
1003
- response = regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value!
1223
+ def regenerate_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
1224
+ response = regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1004
1225
  response.body unless response.nil?
1005
1226
  end
1006
1227
 
@@ -1020,8 +1241,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1020
1241
  #
1021
1242
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1022
1243
  #
1023
- def regenerate_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
1024
- regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value!
1244
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
1245
+ regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1025
1246
  end
1026
1247
 
1027
1248
  #
@@ -1040,7 +1261,7 @@ module Azure::Relay::Mgmt::V2016_07_01
1040
1261
  #
1041
1262
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1042
1263
  #
1043
- def regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil)
1264
+ def regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers:nil)
1044
1265
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1045
1266
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1046
1267
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1059,13 +1280,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1059
1280
 
1060
1281
 
1061
1282
  request_headers = {}
1283
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1062
1284
 
1063
1285
  # Set Headers
1064
1286
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1065
1287
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1066
1288
 
1067
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1068
-
1069
1289
  # Serialize Request
1070
1290
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::RegenerateKeysParameters.mapper()
1071
1291
  request_content = @client.serialize(request_mapper, parameters)
@@ -1122,8 +1342,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1122
1342
  #
1123
1343
  # @return [HybridConnectionListResult] operation results.
1124
1344
  #
1125
- def list_by_namespace_next(next_page_link, custom_headers = nil)
1126
- response = list_by_namespace_next_async(next_page_link, custom_headers).value!
1345
+ def list_by_namespace_next(next_page_link, custom_headers:nil)
1346
+ response = list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1127
1347
  response.body unless response.nil?
1128
1348
  end
1129
1349
 
@@ -1137,8 +1357,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1137
1357
  #
1138
1358
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1139
1359
  #
1140
- def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil)
1141
- list_by_namespace_next_async(next_page_link, custom_headers).value!
1360
+ def list_by_namespace_next_with_http_info(next_page_link, custom_headers:nil)
1361
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1142
1362
  end
1143
1363
 
1144
1364
  #
@@ -1151,11 +1371,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1151
1371
  #
1152
1372
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1153
1373
  #
1154
- def list_by_namespace_next_async(next_page_link, custom_headers = nil)
1374
+ def list_by_namespace_next_async(next_page_link, custom_headers:nil)
1155
1375
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1156
1376
 
1157
1377
 
1158
1378
  request_headers = {}
1379
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1159
1380
 
1160
1381
  # Set Headers
1161
1382
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1209,8 +1430,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1209
1430
  #
1210
1431
  # @return [AuthorizationRuleListResult] operation results.
1211
1432
  #
1212
- def list_authorization_rules_next(next_page_link, custom_headers = nil)
1213
- response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
1433
+ def list_authorization_rules_next(next_page_link, custom_headers:nil)
1434
+ response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1214
1435
  response.body unless response.nil?
1215
1436
  end
1216
1437
 
@@ -1224,8 +1445,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1224
1445
  #
1225
1446
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1226
1447
  #
1227
- def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil)
1228
- list_authorization_rules_next_async(next_page_link, custom_headers).value!
1448
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1449
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1229
1450
  end
1230
1451
 
1231
1452
  #
@@ -1238,11 +1459,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1238
1459
  #
1239
1460
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1240
1461
  #
1241
- def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1462
+ def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1242
1463
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1243
1464
 
1244
1465
 
1245
1466
  request_headers = {}
1467
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1246
1468
 
1247
1469
  # Set Headers
1248
1470
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1286,6 +1508,94 @@ module Azure::Relay::Mgmt::V2016_07_01
1286
1508
  promise.execute
1287
1509
  end
1288
1510
 
1511
+ #
1512
+ # Authorization rules for a HybridConnection.
1513
+ #
1514
+ # @param next_page_link [String] The NextLink from the previous successful call
1515
+ # to List operation.
1516
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1517
+ # will be added to the HTTP request.
1518
+ #
1519
+ # @return [AuthorizationRuleListResult] operation results.
1520
+ #
1521
+ def list_post_authorization_rules_next(next_page_link, custom_headers:nil)
1522
+ response = list_post_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1523
+ response.body unless response.nil?
1524
+ end
1525
+
1526
+ #
1527
+ # Authorization rules for a HybridConnection.
1528
+ #
1529
+ # @param next_page_link [String] The NextLink from the previous successful call
1530
+ # to List operation.
1531
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1532
+ # will be added to the HTTP request.
1533
+ #
1534
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1535
+ #
1536
+ def list_post_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1537
+ list_post_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1538
+ end
1539
+
1540
+ #
1541
+ # Authorization rules for a HybridConnection.
1542
+ #
1543
+ # @param next_page_link [String] The NextLink from the previous successful call
1544
+ # to List operation.
1545
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1546
+ # to the HTTP request.
1547
+ #
1548
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1549
+ #
1550
+ def list_post_authorization_rules_next_async(next_page_link, custom_headers:nil)
1551
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1552
+
1553
+
1554
+ request_headers = {}
1555
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1556
+
1557
+ # Set Headers
1558
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1559
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1560
+ path_template = '{nextLink}'
1561
+
1562
+ request_url = @base_url || @client.base_url
1563
+
1564
+ options = {
1565
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1566
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1567
+ headers: request_headers.merge(custom_headers || {}),
1568
+ base_url: request_url
1569
+ }
1570
+ promise = @client.make_request_async(:post, path_template, options)
1571
+
1572
+ promise = promise.then do |result|
1573
+ http_response = result.response
1574
+ status_code = http_response.status
1575
+ response_content = http_response.body
1576
+ unless status_code == 200
1577
+ error_model = JSON.load(response_content)
1578
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1579
+ end
1580
+
1581
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1582
+ # Deserialize Response
1583
+ if status_code == 200
1584
+ begin
1585
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1586
+ result_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::AuthorizationRuleListResult.mapper()
1587
+ result.body = @client.deserialize(result_mapper, parsed_response)
1588
+ rescue Exception => e
1589
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1590
+ end
1591
+ end
1592
+
1593
+ result
1594
+ end
1595
+
1596
+ promise.execute
1597
+ end
1598
+
1289
1599
  #
1290
1600
  # Lists the HybridConnection within the namespace.
1291
1601
  #
@@ -1298,12 +1608,36 @@ module Azure::Relay::Mgmt::V2016_07_01
1298
1608
  # @return [HybridConnectionListResult] which provide lazy access to pages of
1299
1609
  # the response.
1300
1610
  #
1301
- def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
1302
- response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
1611
+ def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1612
+ response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1613
+ unless response.nil?
1614
+ page = response.body
1615
+ page.next_method = Proc.new do |next_page_link|
1616
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers)
1617
+ end
1618
+ page
1619
+ end
1620
+ end
1621
+
1622
+ #
1623
+ # Authorization rules for a HybridConnection.
1624
+ #
1625
+ # @param resource_group_name [String] Name of the Resource group within the
1626
+ # Azure subscription.
1627
+ # @param namespace_name [String] The Namespace Name
1628
+ # @param hybrid_connection_name [String] The hybrid connection name.
1629
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1630
+ # will be added to the HTTP request.
1631
+ #
1632
+ # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1633
+ # the response.
1634
+ #
1635
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
1636
+ response = list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
1303
1637
  unless response.nil?
1304
1638
  page = response.body
1305
1639
  page.next_method = Proc.new do |next_page_link|
1306
- list_by_namespace_next_async(next_page_link, custom_headers)
1640
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1307
1641
  end
1308
1642
  page
1309
1643
  end
@@ -1322,12 +1656,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1322
1656
  # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1323
1657
  # the response.
1324
1658
  #
1325
- def list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil)
1326
- response = list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value!
1659
+ def list_post_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil)
1660
+ response = list_post_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value!
1327
1661
  unless response.nil?
1328
1662
  page = response.body
1329
1663
  page.next_method = Proc.new do |next_page_link|
1330
- list_authorization_rules_next_async(next_page_link, custom_headers)
1664
+ list_post_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1331
1665
  end
1332
1666
  page
1333
1667
  end