azure_mgmt_event_hub 0.17.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2014-09-01/generated/azure_mgmt_event_hub.rb +59 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/consumer_groups.rb +598 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +145 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hubs.rb +1239 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/access_rights.rb +17 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +46 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +75 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb +115 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +100 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb +117 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/entity_status.rb +23 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +150 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +100 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb +152 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +160 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +100 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb +181 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_state.rb +27 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb +66 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation.rb +59 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation_display.rb +72 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +103 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/resource.rb +91 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb +79 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +102 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_post_resource.rb +175 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb +90 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku.rb +70 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku_name.rb +16 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku_tier.rb +17 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +89 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +20 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/module_definition.rb +9 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/namespaces.rb +2044 -0
- data/lib/2014-09-01/generated/azure_mgmt_event_hub/operations.rb +219 -0
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +10 -0
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +31 -5
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +32 -0
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +20 -13
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +14 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +27 -3
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +33 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +11 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb +13 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set.rb +114 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set_list_result.rb +100 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +59 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +461 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +4 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +22 -7
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +483 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +4 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_cluster.rb +47 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_clusters_list.rb +56 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +12 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +36 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_container.rb +46 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_list_result.rb +56 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +62 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity.rb +72 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity_type.rb +15 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_source.rb +15 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +57 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +114 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +58 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +6 -6
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +260 -11
- data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/operations.rb +4 -0
- data/lib/azure_mgmt_event_hub.rb +2 -1
- data/lib/profiles/latest/modules/eventhub_profile_module.rb +82 -22
- data/lib/version.rb +1 -1
- metadata +62 -5
@@ -92,6 +92,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
92
92
|
end
|
93
93
|
|
94
94
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
95
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
96
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
95
97
|
# Deserialize Response
|
96
98
|
if status_code == 200
|
97
99
|
begin
|
@@ -185,6 +187,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
185
187
|
end
|
186
188
|
|
187
189
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
190
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
191
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
188
192
|
# Deserialize Response
|
189
193
|
if status_code == 200
|
190
194
|
begin
|
@@ -372,6 +376,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
372
376
|
end
|
373
377
|
|
374
378
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
379
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
380
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
375
381
|
# Deserialize Response
|
376
382
|
if status_code == 200
|
377
383
|
begin
|
@@ -489,14 +495,16 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
489
495
|
http_response = result.response
|
490
496
|
status_code = http_response.status
|
491
497
|
response_content = http_response.body
|
492
|
-
unless status_code ==
|
498
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
493
499
|
error_model = JSON.load(response_content)
|
494
500
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
495
501
|
end
|
496
502
|
|
497
503
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
504
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
505
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
498
506
|
# Deserialize Response
|
499
|
-
if status_code ==
|
507
|
+
if status_code == 200
|
500
508
|
begin
|
501
509
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
502
510
|
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
|
@@ -506,7 +514,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
506
514
|
end
|
507
515
|
end
|
508
516
|
# Deserialize Response
|
509
|
-
if status_code ==
|
517
|
+
if status_code == 201
|
510
518
|
begin
|
511
519
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
512
520
|
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
|
@@ -604,6 +612,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
604
612
|
end
|
605
613
|
|
606
614
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
615
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
616
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
607
617
|
# Deserialize Response
|
608
618
|
if status_code == 200
|
609
619
|
begin
|
@@ -719,6 +729,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
719
729
|
end
|
720
730
|
|
721
731
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
732
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
733
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
722
734
|
# Deserialize Response
|
723
735
|
if status_code == 200
|
724
736
|
begin
|
@@ -816,12 +828,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
816
828
|
http_response = result.response
|
817
829
|
status_code = http_response.status
|
818
830
|
response_content = http_response.body
|
819
|
-
unless status_code ==
|
831
|
+
unless status_code == 200 || status_code == 204
|
820
832
|
error_model = JSON.load(response_content)
|
821
833
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
822
834
|
end
|
823
835
|
|
824
836
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
837
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
838
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
825
839
|
|
826
840
|
result
|
827
841
|
end
|
@@ -916,6 +930,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
916
930
|
end
|
917
931
|
|
918
932
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
933
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
934
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
919
935
|
# Deserialize Response
|
920
936
|
if status_code == 200
|
921
937
|
begin
|
@@ -942,7 +958,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
942
958
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
943
959
|
# will be added to the HTTP request.
|
944
960
|
#
|
945
|
-
# @return [Array<
|
961
|
+
# @return [Array<VirtualNetworkRule>] operation results.
|
946
962
|
#
|
947
963
|
def list_virtual_network_rules(resource_group_name, namespace_name, custom_headers:nil)
|
948
964
|
first_page = list_virtual_network_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
|
@@ -1015,6 +1031,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1015
1031
|
end
|
1016
1032
|
|
1017
1033
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1034
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1035
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1018
1036
|
# Deserialize Response
|
1019
1037
|
if status_code == 200
|
1020
1038
|
begin
|
@@ -1089,9 +1107,9 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1089
1107
|
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
1090
1108
|
fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
|
1091
1109
|
fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
|
1092
|
-
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1093
1110
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1094
1111
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1112
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1095
1113
|
|
1096
1114
|
|
1097
1115
|
request_headers = {}
|
@@ -1130,6 +1148,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1130
1148
|
end
|
1131
1149
|
|
1132
1150
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1151
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1152
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1133
1153
|
# Deserialize Response
|
1134
1154
|
if status_code == 200
|
1135
1155
|
begin
|
@@ -1227,12 +1247,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1227
1247
|
http_response = result.response
|
1228
1248
|
status_code = http_response.status
|
1229
1249
|
response_content = http_response.body
|
1230
|
-
unless status_code ==
|
1250
|
+
unless status_code == 200 || status_code == 204
|
1231
1251
|
error_model = JSON.load(response_content)
|
1232
1252
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1233
1253
|
end
|
1234
1254
|
|
1235
1255
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1256
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1257
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1236
1258
|
|
1237
1259
|
result
|
1238
1260
|
end
|
@@ -1327,6 +1349,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1327
1349
|
end
|
1328
1350
|
|
1329
1351
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1352
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1353
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1330
1354
|
# Deserialize Response
|
1331
1355
|
if status_code == 200
|
1332
1356
|
begin
|
@@ -1344,6 +1368,219 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1344
1368
|
promise.execute
|
1345
1369
|
end
|
1346
1370
|
|
1371
|
+
#
|
1372
|
+
# Create or update NetworkRuleSet for a Namespace.
|
1373
|
+
#
|
1374
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1375
|
+
# Azure subscription.
|
1376
|
+
# @param namespace_name [String] The Namespace name
|
1377
|
+
# @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
|
1378
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1379
|
+
# will be added to the HTTP request.
|
1380
|
+
#
|
1381
|
+
# @return [NetworkRuleSet] operation results.
|
1382
|
+
#
|
1383
|
+
def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
1384
|
+
response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
|
1385
|
+
response.body unless response.nil?
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
#
|
1389
|
+
# Create or update NetworkRuleSet for a Namespace.
|
1390
|
+
#
|
1391
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1392
|
+
# Azure subscription.
|
1393
|
+
# @param namespace_name [String] The Namespace name
|
1394
|
+
# @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
|
1395
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1396
|
+
# will be added to the HTTP request.
|
1397
|
+
#
|
1398
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1399
|
+
#
|
1400
|
+
def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
1401
|
+
create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
#
|
1405
|
+
# Create or update NetworkRuleSet for a Namespace.
|
1406
|
+
#
|
1407
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1408
|
+
# Azure subscription.
|
1409
|
+
# @param namespace_name [String] The Namespace name
|
1410
|
+
# @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
|
1411
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1412
|
+
# to the HTTP request.
|
1413
|
+
#
|
1414
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1415
|
+
#
|
1416
|
+
def create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
1417
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1418
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1419
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1420
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
1421
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
1422
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
1423
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1424
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1425
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1426
|
+
|
1427
|
+
|
1428
|
+
request_headers = {}
|
1429
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1430
|
+
|
1431
|
+
# Set Headers
|
1432
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1433
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1434
|
+
|
1435
|
+
# Serialize Request
|
1436
|
+
request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
|
1437
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1438
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1439
|
+
|
1440
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
|
1441
|
+
|
1442
|
+
request_url = @base_url || @client.base_url
|
1443
|
+
|
1444
|
+
options = {
|
1445
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1446
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
1447
|
+
query_params: {'api-version' => @client.api_version},
|
1448
|
+
body: request_content,
|
1449
|
+
headers: request_headers.merge(custom_headers || {}),
|
1450
|
+
base_url: request_url
|
1451
|
+
}
|
1452
|
+
promise = @client.make_request_async(:put, path_template, options)
|
1453
|
+
|
1454
|
+
promise = promise.then do |result|
|
1455
|
+
http_response = result.response
|
1456
|
+
status_code = http_response.status
|
1457
|
+
response_content = http_response.body
|
1458
|
+
unless status_code == 200
|
1459
|
+
error_model = JSON.load(response_content)
|
1460
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1464
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1465
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1466
|
+
# Deserialize Response
|
1467
|
+
if status_code == 200
|
1468
|
+
begin
|
1469
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1470
|
+
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
|
1471
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1472
|
+
rescue Exception => e
|
1473
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1474
|
+
end
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
result
|
1478
|
+
end
|
1479
|
+
|
1480
|
+
promise.execute
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
#
|
1484
|
+
# Gets NetworkRuleSet for a Namespace.
|
1485
|
+
#
|
1486
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1487
|
+
# Azure subscription.
|
1488
|
+
# @param namespace_name [String] The Namespace name
|
1489
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1490
|
+
# will be added to the HTTP request.
|
1491
|
+
#
|
1492
|
+
# @return [NetworkRuleSet] operation results.
|
1493
|
+
#
|
1494
|
+
def get_network_rule_set(resource_group_name, namespace_name, custom_headers:nil)
|
1495
|
+
response = get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
|
1496
|
+
response.body unless response.nil?
|
1497
|
+
end
|
1498
|
+
|
1499
|
+
#
|
1500
|
+
# Gets NetworkRuleSet for a Namespace.
|
1501
|
+
#
|
1502
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1503
|
+
# Azure subscription.
|
1504
|
+
# @param namespace_name [String] The Namespace name
|
1505
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1506
|
+
# will be added to the HTTP request.
|
1507
|
+
#
|
1508
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1509
|
+
#
|
1510
|
+
def get_network_rule_set_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
|
1511
|
+
get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
#
|
1515
|
+
# Gets NetworkRuleSet for a Namespace.
|
1516
|
+
#
|
1517
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1518
|
+
# Azure subscription.
|
1519
|
+
# @param namespace_name [String] The Namespace name
|
1520
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1521
|
+
# to the HTTP request.
|
1522
|
+
#
|
1523
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1524
|
+
#
|
1525
|
+
def get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:nil)
|
1526
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1527
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1528
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1529
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
1530
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
1531
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
1532
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1533
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1534
|
+
|
1535
|
+
|
1536
|
+
request_headers = {}
|
1537
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1538
|
+
|
1539
|
+
# Set Headers
|
1540
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1541
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1542
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
|
1543
|
+
|
1544
|
+
request_url = @base_url || @client.base_url
|
1545
|
+
|
1546
|
+
options = {
|
1547
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1548
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
1549
|
+
query_params: {'api-version' => @client.api_version},
|
1550
|
+
headers: request_headers.merge(custom_headers || {}),
|
1551
|
+
base_url: request_url
|
1552
|
+
}
|
1553
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1554
|
+
|
1555
|
+
promise = promise.then do |result|
|
1556
|
+
http_response = result.response
|
1557
|
+
status_code = http_response.status
|
1558
|
+
response_content = http_response.body
|
1559
|
+
unless status_code == 200
|
1560
|
+
error_model = JSON.load(response_content)
|
1561
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1565
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1566
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1567
|
+
# Deserialize Response
|
1568
|
+
if status_code == 200
|
1569
|
+
begin
|
1570
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1571
|
+
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
|
1572
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1573
|
+
rescue Exception => e
|
1574
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1575
|
+
end
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
result
|
1579
|
+
end
|
1580
|
+
|
1581
|
+
promise.execute
|
1582
|
+
end
|
1583
|
+
|
1347
1584
|
#
|
1348
1585
|
# Creates or updates a namespace. Once created, this namespace's resource
|
1349
1586
|
# manifest is immutable. This operation is idempotent.
|
@@ -1434,14 +1671,16 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1434
1671
|
http_response = result.response
|
1435
1672
|
status_code = http_response.status
|
1436
1673
|
response_content = http_response.body
|
1437
|
-
unless status_code ==
|
1674
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
1438
1675
|
error_model = JSON.load(response_content)
|
1439
1676
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1440
1677
|
end
|
1441
1678
|
|
1442
1679
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1680
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1681
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1443
1682
|
# Deserialize Response
|
1444
|
-
if status_code ==
|
1683
|
+
if status_code == 200
|
1445
1684
|
begin
|
1446
1685
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1447
1686
|
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
|
@@ -1451,7 +1690,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1451
1690
|
end
|
1452
1691
|
end
|
1453
1692
|
# Deserialize Response
|
1454
|
-
if status_code ==
|
1693
|
+
if status_code == 201
|
1455
1694
|
begin
|
1456
1695
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1457
1696
|
result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
|
@@ -1545,12 +1784,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1545
1784
|
http_response = result.response
|
1546
1785
|
status_code = http_response.status
|
1547
1786
|
response_content = http_response.body
|
1548
|
-
unless status_code ==
|
1787
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
1549
1788
|
error_model = JSON.load(response_content)
|
1550
1789
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1551
1790
|
end
|
1552
1791
|
|
1553
1792
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1793
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1794
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1554
1795
|
|
1555
1796
|
result
|
1556
1797
|
end
|
@@ -1632,6 +1873,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1632
1873
|
end
|
1633
1874
|
|
1634
1875
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1876
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1877
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1635
1878
|
# Deserialize Response
|
1636
1879
|
if status_code == 200
|
1637
1880
|
begin
|
@@ -1720,6 +1963,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1720
1963
|
end
|
1721
1964
|
|
1722
1965
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1966
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1967
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1723
1968
|
# Deserialize Response
|
1724
1969
|
if status_code == 200
|
1725
1970
|
begin
|
@@ -1808,6 +2053,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1808
2053
|
end
|
1809
2054
|
|
1810
2055
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2056
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2057
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1811
2058
|
# Deserialize Response
|
1812
2059
|
if status_code == 200
|
1813
2060
|
begin
|
@@ -1896,6 +2143,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
1896
2143
|
end
|
1897
2144
|
|
1898
2145
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2146
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2147
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1899
2148
|
# Deserialize Response
|
1900
2149
|
if status_code == 200
|
1901
2150
|
begin
|
@@ -87,6 +87,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
87
87
|
end
|
88
88
|
|
89
89
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
90
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
91
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
90
92
|
# Deserialize Response
|
91
93
|
if status_code == 200
|
92
94
|
begin
|
@@ -175,6 +177,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
|
|
175
177
|
end
|
176
178
|
|
177
179
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
180
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
181
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
178
182
|
# Deserialize Response
|
179
183
|
if status_code == 200
|
180
184
|
begin
|