azure_mgmt_event_hub 0.17.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2014-09-01/generated/azure_mgmt_event_hub.rb +59 -0
  3. data/lib/2014-09-01/generated/azure_mgmt_event_hub/consumer_groups.rb +598 -0
  4. data/lib/{2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb → 2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb} +14 -14
  5. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hubs.rb +1239 -0
  6. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/access_rights.rb +17 -0
  7. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +46 -0
  8. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +75 -0
  9. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb +115 -0
  10. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +100 -0
  11. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb} +26 -43
  12. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/entity_status.rb +23 -0
  13. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +150 -0
  14. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +100 -0
  15. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb +152 -0
  16. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +160 -0
  17. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb} +13 -12
  18. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb} +31 -38
  19. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_state.rb +27 -0
  20. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb +66 -0
  21. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation.rb +1 -1
  22. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_display.rb +1 -1
  23. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_list_result.rb +2 -2
  24. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/resource.rb +91 -0
  25. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb +79 -0
  26. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +102 -0
  27. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_post_resource.rb +175 -0
  28. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb +90 -0
  29. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku.rb +6 -11
  30. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_name.rb +1 -1
  31. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_tier.rb +2 -1
  32. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +89 -0
  33. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +20 -0
  34. data/lib/2014-09-01/generated/azure_mgmt_event_hub/module_definition.rb +9 -0
  35. data/lib/2014-09-01/generated/azure_mgmt_event_hub/namespaces.rb +2044 -0
  36. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/operations.rb +11 -8
  37. data/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +10 -0
  38. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  39. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +31 -5
  40. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  41. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  42. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +1 -1
  43. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  44. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +1 -1
  45. data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +32 -0
  46. data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  47. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +16 -22
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +15 -1
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +263 -239
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -5
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +302 -263
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +1 -1
  53. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +1 -1
  54. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
  55. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +11 -0
  56. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
  57. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  58. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  59. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  60. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +1 -1
  61. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +1 -1
  62. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +1 -2
  63. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  64. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
  65. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  66. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  67. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +193 -1212
  68. data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  69. data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +4 -0
  70. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +35 -14
  71. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +530 -29
  72. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +11 -7
  73. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub_management_client.rb +149 -0
  74. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_cluster.rb +47 -0
  75. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_clusters_list.rb +56 -0
  76. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +18 -6
  77. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +1 -1
  78. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/connection_state.rb +59 -0
  79. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
  80. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +36 -1
  81. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_container.rb +46 -0
  82. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_list_result.rb +56 -0
  83. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
  84. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +70 -0
  85. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/end_point_provisioning_state.rb +20 -0
  86. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  87. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity.rb +72 -0
  88. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity_type.rb +15 -0
  89. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +1 -1
  90. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_source.rb +15 -0
  91. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +68 -0
  92. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
  93. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +126 -0
  94. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +58 -0
  95. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
  96. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint.rb +46 -0
  97. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection.rb +100 -0
  98. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection_list_result.rb +100 -0
  99. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_connection_status.rb +18 -0
  100. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resource.rb +119 -0
  101. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resources_list_result.rb +67 -0
  102. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  103. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
  104. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
  105. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  106. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +6 -6
  107. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +661 -412
  108. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_endpoint_connections.rb +625 -0
  109. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_link_resources.rb +127 -0
  110. data/lib/azure_mgmt_event_hub.rb +3 -2
  111. data/lib/profiles/latest/modules/eventhub_profile_module.rb +254 -46
  112. data/lib/version.rb +1 -1
  113. metadata +66 -16
@@ -20,50 +20,44 @@ require '2017-04-01/generated/azure_mgmt_event_hub/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::EventHub::Mgmt::V2017_04_01
23
- autoload :Operations, '2017-04-01/generated/azure_mgmt_event_hub/operations.rb'
24
23
  autoload :Namespaces, '2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb'
25
24
  autoload :DisasterRecoveryConfigs, '2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb'
26
25
  autoload :EventHubs, '2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb'
27
26
  autoload :ConsumerGroups, '2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb'
27
+ autoload :Operations, '2017-04-01/generated/azure_mgmt_event_hub/operations.rb'
28
28
  autoload :Regions, '2017-04-01/generated/azure_mgmt_event_hub/regions.rb'
29
29
  autoload :EventHubManagementClient, '2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb'
30
30
 
31
31
  module Models
32
- autoload :MessagingRegionsProperties, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb'
33
- autoload :CaptureDescription, '2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb'
34
- autoload :Resource, '2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb'
35
- autoload :ErrorResponse, '2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb'
36
- autoload :ArmDisasterRecoveryListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb'
32
+ autoload :ConsumerGroupListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb'
37
33
  autoload :EventHubListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb'
34
+ autoload :AuthorizationRuleListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb'
38
35
  autoload :MessagingRegionsListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb'
39
- autoload :AccessKeys, '2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb'
40
- autoload :ConsumerGroupListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb'
41
- autoload :Destination, '2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb'
42
- autoload :CheckNameAvailabilityParameter, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb'
43
- autoload :EHNamespaceListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb'
44
- autoload :CheckNameAvailabilityResult, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb'
45
36
  autoload :RegenerateAccessKeyParameters, '2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb'
37
+ autoload :Resource, '2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb'
38
+ autoload :ArmDisasterRecoveryListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb'
39
+ autoload :CheckNameAvailabilityParameter, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb'
46
40
  autoload :OperationDisplay, '2017-04-01/generated/azure_mgmt_event_hub/models/operation_display.rb'
47
- autoload :AuthorizationRuleListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb'
41
+ autoload :AccessKeys, '2017-04-01/generated/azure_mgmt_event_hub/models/access_keys.rb'
48
42
  autoload :Operation, '2017-04-01/generated/azure_mgmt_event_hub/models/operation.rb'
49
- autoload :Sku, '2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb'
43
+ autoload :ErrorResponse, '2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb'
50
44
  autoload :OperationListResult, '2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb'
51
- autoload :TrackedResource, '2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb'
52
- autoload :EHNamespace, '2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb'
45
+ autoload :MessagingRegionsProperties, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb'
46
+ autoload :Destination, '2017-04-01/generated/azure_mgmt_event_hub/models/destination.rb'
47
+ autoload :CheckNameAvailabilityResult, '2017-04-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb'
48
+ autoload :CaptureDescription, '2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb'
53
49
  autoload :AuthorizationRule, '2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule.rb'
54
- autoload :Eventhub, '2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb'
50
+ autoload :TrackedResource, '2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb'
55
51
  autoload :ConsumerGroup, '2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb'
56
52
  autoload :ArmDisasterRecovery, '2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb'
53
+ autoload :Eventhub, '2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb'
57
54
  autoload :MessagingRegions, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb'
58
- autoload :MessagingPlan, '2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb'
59
- autoload :SkuName, '2017-04-01/generated/azure_mgmt_event_hub/models/sku_name.rb'
60
- autoload :SkuTier, '2017-04-01/generated/azure_mgmt_event_hub/models/sku_tier.rb'
61
55
  autoload :AccessRights, '2017-04-01/generated/azure_mgmt_event_hub/models/access_rights.rb'
62
56
  autoload :KeyType, '2017-04-01/generated/azure_mgmt_event_hub/models/key_type.rb'
63
- autoload :EntityStatus, '2017-04-01/generated/azure_mgmt_event_hub/models/entity_status.rb'
64
- autoload :EncodingCaptureDescription, '2017-04-01/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb'
65
57
  autoload :UnavailableReason, '2017-04-01/generated/azure_mgmt_event_hub/models/unavailable_reason.rb'
66
58
  autoload :ProvisioningStateDR, '2017-04-01/generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb'
67
59
  autoload :RoleDisasterRecovery, '2017-04-01/generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb'
60
+ autoload :EncodingCaptureDescription, '2017-04-01/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb'
61
+ autoload :EntityStatus, '2017-04-01/generated/azure_mgmt_event_hub/models/entity_status.rb'
68
62
  end
69
63
  end
@@ -86,6 +86,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
86
86
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
87
87
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
88
88
  fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil?
89
+ fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '256'" if !event_hub_name.nil? && event_hub_name.length > 256
89
90
  fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1
90
91
  fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil?
91
92
  fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50
@@ -131,6 +132,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
131
132
  end
132
133
 
133
134
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
135
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
136
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
134
137
  # Deserialize Response
135
138
  if status_code == 200
136
139
  begin
@@ -203,6 +206,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
203
206
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
204
207
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
205
208
  fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil?
209
+ fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '256'" if !event_hub_name.nil? && event_hub_name.length > 256
206
210
  fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1
207
211
  fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil?
208
212
  fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50
@@ -234,12 +238,14 @@ module Azure::EventHub::Mgmt::V2017_04_01
234
238
  http_response = result.response
235
239
  status_code = http_response.status
236
240
  response_content = http_response.body
237
- unless status_code == 204 || status_code == 200
241
+ unless status_code == 200 || status_code == 204
238
242
  error_model = JSON.load(response_content)
239
243
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
240
244
  end
241
245
 
242
246
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
247
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
248
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
243
249
 
244
250
  result
245
251
  end
@@ -303,6 +309,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
303
309
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
304
310
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
305
311
  fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil?
312
+ fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '256'" if !event_hub_name.nil? && event_hub_name.length > 256
306
313
  fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1
307
314
  fail ArgumentError, 'consumer_group_name is nil' if consumer_group_name.nil?
308
315
  fail ArgumentError, "'consumer_group_name' should satisfy the constraint - 'MaxLength': '50'" if !consumer_group_name.nil? && consumer_group_name.length > 50
@@ -340,6 +347,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
340
347
  end
341
348
 
342
349
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
350
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
351
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
343
352
  # Deserialize Response
344
353
  if status_code == 200
345
354
  begin
@@ -431,6 +440,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
431
440
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
432
441
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
433
442
  fail ArgumentError, 'event_hub_name is nil' if event_hub_name.nil?
443
+ fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MaxLength': '256'" if !event_hub_name.nil? && event_hub_name.length > 256
434
444
  fail ArgumentError, "'event_hub_name' should satisfy the constraint - 'MinLength': '1'" if !event_hub_name.nil? && event_hub_name.length < 1
435
445
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
436
446
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -469,6 +479,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
469
479
  end
470
480
 
471
481
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
482
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
483
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
472
484
  # Deserialize Response
473
485
  if status_code == 200
474
486
  begin
@@ -560,6 +572,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
560
572
  end
561
573
 
562
574
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
575
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
576
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
563
577
  # Deserialize Response
564
578
  if status_code == 200
565
579
  begin
@@ -22,63 +22,62 @@ module Azure::EventHub::Mgmt::V2017_04_01
22
22
  attr_reader :client
23
23
 
24
24
  #
25
- # Check the give Namespace name availability.
25
+ # Gets a list of authorization rules for a Namespace.
26
26
  #
27
27
  # @param resource_group_name [String] Name of the resource group within the
28
28
  # azure subscription.
29
29
  # @param namespace_name [String] The Namespace name
30
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
31
- # availability of the given Alias name
30
+ # @param alias_parameter [String] The Disaster Recovery configuration name
32
31
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
32
  # will be added to the HTTP request.
34
33
  #
35
- # @return [CheckNameAvailabilityResult] operation results.
34
+ # @return [Array<AuthorizationRule>] operation results.
36
35
  #
37
- def check_name_availability(resource_group_name, namespace_name, parameters, custom_headers:nil)
38
- response = check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
39
- response.body unless response.nil?
36
+ def list_authorization_rules(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
37
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers)
38
+ first_page.get_all_items
40
39
  end
41
40
 
42
41
  #
43
- # Check the give Namespace name availability.
42
+ # Gets a list of authorization rules for a Namespace.
44
43
  #
45
44
  # @param resource_group_name [String] Name of the resource group within the
46
45
  # azure subscription.
47
46
  # @param namespace_name [String] The Namespace name
48
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
49
- # availability of the given Alias name
47
+ # @param alias_parameter [String] The Disaster Recovery configuration name
50
48
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
49
  # will be added to the HTTP request.
52
50
  #
53
51
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
52
  #
55
- def check_name_availability_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
56
- check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
53
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
54
+ list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
57
55
  end
58
56
 
59
57
  #
60
- # Check the give Namespace name availability.
58
+ # Gets a list of authorization rules for a Namespace.
61
59
  #
62
60
  # @param resource_group_name [String] Name of the resource group within the
63
61
  # azure subscription.
64
62
  # @param namespace_name [String] The Namespace name
65
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
66
- # availability of the given Alias name
63
+ # @param alias_parameter [String] The Disaster Recovery configuration name
67
64
  # @param [Hash{String => String}] A hash of custom headers that will be added
68
65
  # to the HTTP request.
69
66
  #
70
67
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
68
  #
72
- def check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
73
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ def list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
75
70
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
71
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
77
72
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
78
73
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
79
74
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
80
75
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
81
- fail ArgumentError, 'parameters is nil' if parameters.nil?
76
+ fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
77
+ fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
78
+ fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
79
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
82
81
 
83
82
 
84
83
  request_headers = {}
@@ -87,25 +86,18 @@ module Azure::EventHub::Mgmt::V2017_04_01
87
86
  # Set Headers
88
87
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
88
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
-
91
- # Serialize Request
92
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper()
93
- request_content = @client.serialize(request_mapper, parameters)
94
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
95
-
96
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability'
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'
97
90
 
98
91
  request_url = @base_url || @client.base_url
99
92
 
100
93
  options = {
101
94
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
102
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name},
95
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
103
96
  query_params: {'api-version' => @client.api_version},
104
- body: request_content,
105
97
  headers: request_headers.merge(custom_headers || {}),
106
98
  base_url: request_url
107
99
  }
108
- promise = @client.make_request_async(:post, path_template, options)
100
+ promise = @client.make_request_async(:get, path_template, options)
109
101
 
110
102
  promise = promise.then do |result|
111
103
  http_response = result.response
@@ -117,11 +109,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
117
109
  end
118
110
 
119
111
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
114
  # Deserialize Response
121
115
  if status_code == 200
122
116
  begin
123
117
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult.mapper()
118
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
125
119
  result.body = @client.deserialize(result_mapper, parsed_response)
126
120
  rescue Exception => e
127
121
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -135,54 +129,65 @@ module Azure::EventHub::Mgmt::V2017_04_01
135
129
  end
136
130
 
137
131
  #
138
- # Gets all Alias(Disaster Recovery configurations)
132
+ # Gets an AuthorizationRule for a Namespace by rule name.
139
133
  #
140
134
  # @param resource_group_name [String] Name of the resource group within the
141
135
  # azure subscription.
142
136
  # @param namespace_name [String] The Namespace name
137
+ # @param alias_parameter [String] The Disaster Recovery configuration name
138
+ # @param authorization_rule_name [String] The authorization rule name.
143
139
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
140
  # will be added to the HTTP request.
145
141
  #
146
- # @return [Array<ArmDisasterRecovery>] operation results.
142
+ # @return [AuthorizationRule] operation results.
147
143
  #
148
- def list(resource_group_name, namespace_name, custom_headers:nil)
149
- first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
150
- first_page.get_all_items
144
+ def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
145
+ response = get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
146
+ response.body unless response.nil?
151
147
  end
152
148
 
153
149
  #
154
- # Gets all Alias(Disaster Recovery configurations)
150
+ # Gets an AuthorizationRule for a Namespace by rule name.
155
151
  #
156
152
  # @param resource_group_name [String] Name of the resource group within the
157
153
  # azure subscription.
158
154
  # @param namespace_name [String] The Namespace name
155
+ # @param alias_parameter [String] The Disaster Recovery configuration name
156
+ # @param authorization_rule_name [String] The authorization rule name.
159
157
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
158
  # will be added to the HTTP request.
161
159
  #
162
160
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
163
161
  #
164
- def list_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
165
- list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
162
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
163
+ get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
166
164
  end
167
165
 
168
166
  #
169
- # Gets all Alias(Disaster Recovery configurations)
167
+ # Gets an AuthorizationRule for a Namespace by rule name.
170
168
  #
171
169
  # @param resource_group_name [String] Name of the resource group within the
172
170
  # azure subscription.
173
171
  # @param namespace_name [String] The Namespace name
172
+ # @param alias_parameter [String] The Disaster Recovery configuration name
173
+ # @param authorization_rule_name [String] The authorization rule name.
174
174
  # @param [Hash{String => String}] A hash of custom headers that will be added
175
175
  # to the HTTP request.
176
176
  #
177
177
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
178
178
  #
179
- def list_async(resource_group_name, namespace_name, custom_headers:nil)
179
+ def get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
180
180
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
181
181
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
182
182
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
183
183
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
184
184
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
185
185
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
186
+ fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
187
+ fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
188
+ fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
189
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
190
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
186
191
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
187
192
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
188
193
 
@@ -193,13 +198,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
193
198
  # Set Headers
194
199
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
195
200
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
196
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'
201
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'
197
202
 
198
203
  request_url = @base_url || @client.base_url
199
204
 
200
205
  options = {
201
206
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
202
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
207
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
203
208
  query_params: {'api-version' => @client.api_version},
204
209
  headers: request_headers.merge(custom_headers || {}),
205
210
  base_url: request_url
@@ -216,11 +221,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
216
221
  end
217
222
 
218
223
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
224
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
225
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
219
226
  # Deserialize Response
220
227
  if status_code == 200
221
228
  begin
222
229
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
223
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult.mapper()
230
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
224
231
  result.body = @client.deserialize(result_mapper, parsed_response)
225
232
  rescue Exception => e
226
233
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -234,57 +241,54 @@ module Azure::EventHub::Mgmt::V2017_04_01
234
241
  end
235
242
 
236
243
  #
237
- # Creates or updates a new Alias(Disaster Recovery configuration)
244
+ # Gets the primary and secondary connection strings for the Namespace.
238
245
  #
239
246
  # @param resource_group_name [String] Name of the resource group within the
240
247
  # azure subscription.
241
248
  # @param namespace_name [String] The Namespace name
242
249
  # @param alias_parameter [String] The Disaster Recovery configuration name
243
- # @param parameters [ArmDisasterRecovery] Parameters required to create an
244
- # Alias(Disaster Recovery configuration)
250
+ # @param authorization_rule_name [String] The authorization rule name.
245
251
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
252
  # will be added to the HTTP request.
247
253
  #
248
- # @return [ArmDisasterRecovery] operation results.
254
+ # @return [AccessKeys] operation results.
249
255
  #
250
- def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
251
- response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
256
+ def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
257
+ response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
252
258
  response.body unless response.nil?
253
259
  end
254
260
 
255
261
  #
256
- # Creates or updates a new Alias(Disaster Recovery configuration)
262
+ # Gets the primary and secondary connection strings for the Namespace.
257
263
  #
258
264
  # @param resource_group_name [String] Name of the resource group within the
259
265
  # azure subscription.
260
266
  # @param namespace_name [String] The Namespace name
261
267
  # @param alias_parameter [String] The Disaster Recovery configuration name
262
- # @param parameters [ArmDisasterRecovery] Parameters required to create an
263
- # Alias(Disaster Recovery configuration)
268
+ # @param authorization_rule_name [String] The authorization rule name.
264
269
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
265
270
  # will be added to the HTTP request.
266
271
  #
267
272
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
268
273
  #
269
- def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
270
- create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
274
+ def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
275
+ list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
271
276
  end
272
277
 
273
278
  #
274
- # Creates or updates a new Alias(Disaster Recovery configuration)
279
+ # Gets the primary and secondary connection strings for the Namespace.
275
280
  #
276
281
  # @param resource_group_name [String] Name of the resource group within the
277
282
  # azure subscription.
278
283
  # @param namespace_name [String] The Namespace name
279
284
  # @param alias_parameter [String] The Disaster Recovery configuration name
280
- # @param parameters [ArmDisasterRecovery] Parameters required to create an
281
- # Alias(Disaster Recovery configuration)
285
+ # @param authorization_rule_name [String] The authorization rule name.
282
286
  # @param [Hash{String => String}] A hash of custom headers that will be added
283
287
  # to the HTTP request.
284
288
  #
285
289
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
290
  #
287
- def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
291
+ def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
288
292
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
293
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
290
294
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -294,7 +298,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
294
298
  fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
295
299
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
296
300
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
297
- fail ArgumentError, 'parameters is nil' if parameters.nil?
301
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
302
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
298
303
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
299
304
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
300
305
 
@@ -305,41 +310,36 @@ module Azure::EventHub::Mgmt::V2017_04_01
305
310
  # Set Headers
306
311
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
307
312
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
308
-
309
- # Serialize Request
310
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
311
- request_content = @client.serialize(request_mapper, parameters)
312
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
313
-
314
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
313
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys'
315
314
 
316
315
  request_url = @base_url || @client.base_url
317
316
 
318
317
  options = {
319
318
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
320
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
319
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
321
320
  query_params: {'api-version' => @client.api_version},
322
- body: request_content,
323
321
  headers: request_headers.merge(custom_headers || {}),
324
322
  base_url: request_url
325
323
  }
326
- promise = @client.make_request_async(:put, path_template, options)
324
+ promise = @client.make_request_async(:post, path_template, options)
327
325
 
328
326
  promise = promise.then do |result|
329
327
  http_response = result.response
330
328
  status_code = http_response.status
331
329
  response_content = http_response.body
332
- unless status_code == 200 || status_code == 201
330
+ unless status_code == 200
333
331
  error_model = JSON.load(response_content)
334
332
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
335
333
  end
336
334
 
337
335
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
336
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
337
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
338
338
  # Deserialize Response
339
339
  if status_code == 200
340
340
  begin
341
341
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
342
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
342
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
343
343
  result.body = @client.deserialize(result_mapper, parsed_response)
344
344
  rescue Exception => e
345
345
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -353,61 +353,63 @@ module Azure::EventHub::Mgmt::V2017_04_01
353
353
  end
354
354
 
355
355
  #
356
- # Deletes an Alias(Disaster Recovery configuration)
356
+ # Check the give Namespace name availability.
357
357
  #
358
358
  # @param resource_group_name [String] Name of the resource group within the
359
359
  # azure subscription.
360
360
  # @param namespace_name [String] The Namespace name
361
- # @param alias_parameter [String] The Disaster Recovery configuration name
361
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
362
+ # availability of the given Alias name
362
363
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
364
  # will be added to the HTTP request.
364
365
  #
366
+ # @return [CheckNameAvailabilityResult] operation results.
365
367
  #
366
- def delete(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
367
- response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
368
- nil
368
+ def check_name_availability(resource_group_name, namespace_name, parameters, custom_headers:nil)
369
+ response = check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
370
+ response.body unless response.nil?
369
371
  end
370
372
 
371
373
  #
372
- # Deletes an Alias(Disaster Recovery configuration)
374
+ # Check the give Namespace name availability.
373
375
  #
374
376
  # @param resource_group_name [String] Name of the resource group within the
375
377
  # azure subscription.
376
378
  # @param namespace_name [String] The Namespace name
377
- # @param alias_parameter [String] The Disaster Recovery configuration name
379
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
380
+ # availability of the given Alias name
378
381
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
379
382
  # will be added to the HTTP request.
380
383
  #
381
384
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
382
385
  #
383
- def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
384
- delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
386
+ def check_name_availability_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
387
+ check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
385
388
  end
386
389
 
387
390
  #
388
- # Deletes an Alias(Disaster Recovery configuration)
391
+ # Check the give Namespace name availability.
389
392
  #
390
393
  # @param resource_group_name [String] Name of the resource group within the
391
394
  # azure subscription.
392
395
  # @param namespace_name [String] The Namespace name
393
- # @param alias_parameter [String] The Disaster Recovery configuration name
396
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
397
+ # availability of the given Alias name
394
398
  # @param [Hash{String => String}] A hash of custom headers that will be added
395
399
  # to the HTTP request.
396
400
  #
397
401
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
398
402
  #
399
- def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
403
+ def check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
404
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
405
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
400
406
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
401
407
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
402
408
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
403
409
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
404
410
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
405
411
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
406
- fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
407
- fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
408
- fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
409
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
410
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
412
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
411
413
 
412
414
 
413
415
  request_headers = {}
@@ -416,18 +418,25 @@ module Azure::EventHub::Mgmt::V2017_04_01
416
418
  # Set Headers
417
419
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
418
420
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
419
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
421
+
422
+ # Serialize Request
423
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper()
424
+ request_content = @client.serialize(request_mapper, parameters)
425
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
426
+
427
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability'
420
428
 
421
429
  request_url = @base_url || @client.base_url
422
430
 
423
431
  options = {
424
432
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
425
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
433
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name},
426
434
  query_params: {'api-version' => @client.api_version},
435
+ body: request_content,
427
436
  headers: request_headers.merge(custom_headers || {}),
428
437
  base_url: request_url
429
438
  }
430
- promise = @client.make_request_async(:delete, path_template, options)
439
+ promise = @client.make_request_async(:post, path_template, options)
431
440
 
432
441
  promise = promise.then do |result|
433
442
  http_response = result.response
@@ -439,6 +448,18 @@ module Azure::EventHub::Mgmt::V2017_04_01
439
448
  end
440
449
 
441
450
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
451
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
452
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
453
+ # Deserialize Response
454
+ if status_code == 200
455
+ begin
456
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
457
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult.mapper()
458
+ result.body = @client.deserialize(result_mapper, parsed_response)
459
+ rescue Exception => e
460
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
461
+ end
462
+ end
442
463
 
443
464
  result
444
465
  end
@@ -447,63 +468,54 @@ module Azure::EventHub::Mgmt::V2017_04_01
447
468
  end
448
469
 
449
470
  #
450
- # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
451
- # namespace
471
+ # Gets all Alias(Disaster Recovery configurations)
452
472
  #
453
473
  # @param resource_group_name [String] Name of the resource group within the
454
474
  # azure subscription.
455
475
  # @param namespace_name [String] The Namespace name
456
- # @param alias_parameter [String] The Disaster Recovery configuration name
457
476
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
458
477
  # will be added to the HTTP request.
459
478
  #
460
- # @return [ArmDisasterRecovery] operation results.
479
+ # @return [Array<ArmDisasterRecovery>] operation results.
461
480
  #
462
- def get(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
463
- response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
464
- response.body unless response.nil?
481
+ def list(resource_group_name, namespace_name, custom_headers:nil)
482
+ first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
483
+ first_page.get_all_items
465
484
  end
466
485
 
467
486
  #
468
- # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
469
- # namespace
487
+ # Gets all Alias(Disaster Recovery configurations)
470
488
  #
471
489
  # @param resource_group_name [String] Name of the resource group within the
472
490
  # azure subscription.
473
491
  # @param namespace_name [String] The Namespace name
474
- # @param alias_parameter [String] The Disaster Recovery configuration name
475
492
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
476
493
  # will be added to the HTTP request.
477
494
  #
478
495
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
479
496
  #
480
- def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
481
- get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
497
+ def list_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
498
+ list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
482
499
  end
483
500
 
484
501
  #
485
- # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
486
- # namespace
502
+ # Gets all Alias(Disaster Recovery configurations)
487
503
  #
488
504
  # @param resource_group_name [String] Name of the resource group within the
489
505
  # azure subscription.
490
506
  # @param namespace_name [String] The Namespace name
491
- # @param alias_parameter [String] The Disaster Recovery configuration name
492
507
  # @param [Hash{String => String}] A hash of custom headers that will be added
493
508
  # to the HTTP request.
494
509
  #
495
510
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
496
511
  #
497
- def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
512
+ def list_async(resource_group_name, namespace_name, custom_headers:nil)
498
513
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
499
514
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
500
515
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
501
516
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
502
517
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
503
518
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
504
- fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
505
- fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
506
- fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
507
519
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
508
520
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
509
521
 
@@ -514,13 +526,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
514
526
  # Set Headers
515
527
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
516
528
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
517
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
529
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'
518
530
 
519
531
  request_url = @base_url || @client.base_url
520
532
 
521
533
  options = {
522
534
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
523
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
535
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
524
536
  query_params: {'api-version' => @client.api_version},
525
537
  headers: request_headers.merge(custom_headers || {}),
526
538
  base_url: request_url
@@ -537,11 +549,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
537
549
  end
538
550
 
539
551
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
552
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
553
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
540
554
  # Deserialize Response
541
555
  if status_code == 200
542
556
  begin
543
557
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
544
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
558
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult.mapper()
545
559
  result.body = @client.deserialize(result_mapper, parsed_response)
546
560
  rescue Exception => e
547
561
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -555,53 +569,57 @@ module Azure::EventHub::Mgmt::V2017_04_01
555
569
  end
556
570
 
557
571
  #
558
- # This operation disables the Disaster Recovery and stops replicating changes
559
- # from primary to secondary namespaces
572
+ # Creates or updates a new Alias(Disaster Recovery configuration)
560
573
  #
561
574
  # @param resource_group_name [String] Name of the resource group within the
562
575
  # azure subscription.
563
576
  # @param namespace_name [String] The Namespace name
564
577
  # @param alias_parameter [String] The Disaster Recovery configuration name
578
+ # @param parameters [ArmDisasterRecovery] Parameters required to create an
579
+ # Alias(Disaster Recovery configuration)
565
580
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
566
581
  # will be added to the HTTP request.
567
582
  #
583
+ # @return [ArmDisasterRecovery] operation results.
568
584
  #
569
- def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
570
- response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
571
- nil
585
+ def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
586
+ response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
587
+ response.body unless response.nil?
572
588
  end
573
589
 
574
590
  #
575
- # This operation disables the Disaster Recovery and stops replicating changes
576
- # from primary to secondary namespaces
591
+ # Creates or updates a new Alias(Disaster Recovery configuration)
577
592
  #
578
593
  # @param resource_group_name [String] Name of the resource group within the
579
594
  # azure subscription.
580
595
  # @param namespace_name [String] The Namespace name
581
596
  # @param alias_parameter [String] The Disaster Recovery configuration name
597
+ # @param parameters [ArmDisasterRecovery] Parameters required to create an
598
+ # Alias(Disaster Recovery configuration)
582
599
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
600
  # will be added to the HTTP request.
584
601
  #
585
602
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
586
603
  #
587
- def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
588
- break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
604
+ def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
605
+ create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
589
606
  end
590
607
 
591
608
  #
592
- # This operation disables the Disaster Recovery and stops replicating changes
593
- # from primary to secondary namespaces
609
+ # Creates or updates a new Alias(Disaster Recovery configuration)
594
610
  #
595
611
  # @param resource_group_name [String] Name of the resource group within the
596
612
  # azure subscription.
597
613
  # @param namespace_name [String] The Namespace name
598
614
  # @param alias_parameter [String] The Disaster Recovery configuration name
615
+ # @param parameters [ArmDisasterRecovery] Parameters required to create an
616
+ # Alias(Disaster Recovery configuration)
599
617
  # @param [Hash{String => String}] A hash of custom headers that will be added
600
618
  # to the HTTP request.
601
619
  #
602
620
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
603
621
  #
604
- def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
622
+ def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
605
623
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
606
624
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
607
625
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -611,6 +629,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
611
629
  fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
612
630
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
613
631
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
632
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
614
633
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
615
634
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
616
635
 
@@ -621,7 +640,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
621
640
  # Set Headers
622
641
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
623
642
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
624
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'
643
+
644
+ # Serialize Request
645
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
646
+ request_content = @client.serialize(request_mapper, parameters)
647
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
648
+
649
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
625
650
 
626
651
  request_url = @base_url || @client.base_url
627
652
 
@@ -629,21 +654,34 @@ module Azure::EventHub::Mgmt::V2017_04_01
629
654
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
630
655
  path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
631
656
  query_params: {'api-version' => @client.api_version},
657
+ body: request_content,
632
658
  headers: request_headers.merge(custom_headers || {}),
633
659
  base_url: request_url
634
660
  }
635
- promise = @client.make_request_async(:post, path_template, options)
661
+ promise = @client.make_request_async(:put, path_template, options)
636
662
 
637
663
  promise = promise.then do |result|
638
664
  http_response = result.response
639
665
  status_code = http_response.status
640
666
  response_content = http_response.body
641
- unless status_code == 200
667
+ unless status_code == 200 || status_code == 201
642
668
  error_model = JSON.load(response_content)
643
669
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
644
670
  end
645
671
 
646
672
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
673
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
674
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
675
+ # Deserialize Response
676
+ if status_code == 200
677
+ begin
678
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
679
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
680
+ result.body = @client.deserialize(result_mapper, parsed_response)
681
+ rescue Exception => e
682
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
683
+ end
684
+ end
647
685
 
648
686
  result
649
687
  end
@@ -652,8 +690,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
652
690
  end
653
691
 
654
692
  #
655
- # envokes GEO DR failover and reconfigure the alias to point to the secondary
656
- # namespace
693
+ # Deletes an Alias(Disaster Recovery configuration)
657
694
  #
658
695
  # @param resource_group_name [String] Name of the resource group within the
659
696
  # azure subscription.
@@ -663,14 +700,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
663
700
  # will be added to the HTTP request.
664
701
  #
665
702
  #
666
- def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
667
- response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
703
+ def delete(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
704
+ response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
668
705
  nil
669
706
  end
670
707
 
671
708
  #
672
- # envokes GEO DR failover and reconfigure the alias to point to the secondary
673
- # namespace
709
+ # Deletes an Alias(Disaster Recovery configuration)
674
710
  #
675
711
  # @param resource_group_name [String] Name of the resource group within the
676
712
  # azure subscription.
@@ -681,13 +717,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
681
717
  #
682
718
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
683
719
  #
684
- def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
685
- fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
720
+ def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
721
+ delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
686
722
  end
687
723
 
688
724
  #
689
- # envokes GEO DR failover and reconfigure the alias to point to the secondary
690
- # namespace
725
+ # Deletes an Alias(Disaster Recovery configuration)
691
726
  #
692
727
  # @param resource_group_name [String] Name of the resource group within the
693
728
  # azure subscription.
@@ -698,7 +733,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
698
733
  #
699
734
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
700
735
  #
701
- def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
736
+ def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
702
737
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
703
738
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
704
739
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -718,7 +753,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
718
753
  # Set Headers
719
754
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
720
755
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
721
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'
756
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
722
757
 
723
758
  request_url = @base_url || @client.base_url
724
759
 
@@ -729,7 +764,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
729
764
  headers: request_headers.merge(custom_headers || {}),
730
765
  base_url: request_url
731
766
  }
732
- promise = @client.make_request_async(:post, path_template, options)
767
+ promise = @client.make_request_async(:delete, path_template, options)
733
768
 
734
769
  promise = promise.then do |result|
735
770
  http_response = result.response
@@ -741,6 +776,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
741
776
  end
742
777
 
743
778
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
779
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
780
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
744
781
 
745
782
  result
746
783
  end
@@ -749,7 +786,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
749
786
  end
750
787
 
751
788
  #
752
- # Gets a list of authorization rules for a Namespace.
789
+ # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
790
+ # namespace
753
791
  #
754
792
  # @param resource_group_name [String] Name of the resource group within the
755
793
  # azure subscription.
@@ -758,15 +796,16 @@ module Azure::EventHub::Mgmt::V2017_04_01
758
796
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
797
  # will be added to the HTTP request.
760
798
  #
761
- # @return [Array<AuthorizationRule>] operation results.
799
+ # @return [ArmDisasterRecovery] operation results.
762
800
  #
763
- def list_authorization_rules(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
764
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers)
765
- first_page.get_all_items
801
+ def get(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
802
+ response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
803
+ response.body unless response.nil?
766
804
  end
767
805
 
768
806
  #
769
- # Gets a list of authorization rules for a Namespace.
807
+ # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
808
+ # namespace
770
809
  #
771
810
  # @param resource_group_name [String] Name of the resource group within the
772
811
  # azure subscription.
@@ -777,12 +816,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
777
816
  #
778
817
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
779
818
  #
780
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
781
- list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
819
+ def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
820
+ get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
782
821
  end
783
822
 
784
823
  #
785
- # Gets a list of authorization rules for a Namespace.
824
+ # Retrieves Alias(Disaster Recovery configuration) for primary or secondary
825
+ # namespace
786
826
  #
787
827
  # @param resource_group_name [String] Name of the resource group within the
788
828
  # azure subscription.
@@ -793,7 +833,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
793
833
  #
794
834
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
795
835
  #
796
- def list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
836
+ def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
797
837
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
798
838
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
799
839
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -813,7 +853,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
813
853
  # Set Headers
814
854
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
815
855
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
816
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules'
856
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
817
857
 
818
858
  request_url = @base_url || @client.base_url
819
859
 
@@ -836,11 +876,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
836
876
  end
837
877
 
838
878
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
879
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
880
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
839
881
  # Deserialize Response
840
882
  if status_code == 200
841
883
  begin
842
884
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
843
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
885
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
844
886
  result.body = @client.deserialize(result_mapper, parsed_response)
845
887
  rescue Exception => e
846
888
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -854,54 +896,53 @@ module Azure::EventHub::Mgmt::V2017_04_01
854
896
  end
855
897
 
856
898
  #
857
- # Gets an AuthorizationRule for a Namespace by rule name.
899
+ # This operation disables the Disaster Recovery and stops replicating changes
900
+ # from primary to secondary namespaces
858
901
  #
859
902
  # @param resource_group_name [String] Name of the resource group within the
860
903
  # azure subscription.
861
904
  # @param namespace_name [String] The Namespace name
862
905
  # @param alias_parameter [String] The Disaster Recovery configuration name
863
- # @param authorization_rule_name [String] The authorization rule name.
864
906
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
865
907
  # will be added to the HTTP request.
866
908
  #
867
- # @return [AuthorizationRule] operation results.
868
909
  #
869
- def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
870
- response = get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
871
- response.body unless response.nil?
910
+ def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
911
+ response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
912
+ nil
872
913
  end
873
914
 
874
915
  #
875
- # Gets an AuthorizationRule for a Namespace by rule name.
916
+ # This operation disables the Disaster Recovery and stops replicating changes
917
+ # from primary to secondary namespaces
876
918
  #
877
919
  # @param resource_group_name [String] Name of the resource group within the
878
920
  # azure subscription.
879
921
  # @param namespace_name [String] The Namespace name
880
922
  # @param alias_parameter [String] The Disaster Recovery configuration name
881
- # @param authorization_rule_name [String] The authorization rule name.
882
923
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
883
924
  # will be added to the HTTP request.
884
925
  #
885
926
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
886
927
  #
887
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
888
- get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
928
+ def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
929
+ break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
889
930
  end
890
931
 
891
932
  #
892
- # Gets an AuthorizationRule for a Namespace by rule name.
933
+ # This operation disables the Disaster Recovery and stops replicating changes
934
+ # from primary to secondary namespaces
893
935
  #
894
936
  # @param resource_group_name [String] Name of the resource group within the
895
937
  # azure subscription.
896
938
  # @param namespace_name [String] The Namespace name
897
939
  # @param alias_parameter [String] The Disaster Recovery configuration name
898
- # @param authorization_rule_name [String] The authorization rule name.
899
940
  # @param [Hash{String => String}] A hash of custom headers that will be added
900
941
  # to the HTTP request.
901
942
  #
902
943
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
903
944
  #
904
- def get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
945
+ def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
905
946
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
906
947
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
907
948
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -911,8 +952,6 @@ module Azure::EventHub::Mgmt::V2017_04_01
911
952
  fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
912
953
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
913
954
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
914
- fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
915
- fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
916
955
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
917
956
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
918
957
 
@@ -923,18 +962,18 @@ module Azure::EventHub::Mgmt::V2017_04_01
923
962
  # Set Headers
924
963
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
925
964
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
926
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}'
965
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'
927
966
 
928
967
  request_url = @base_url || @client.base_url
929
968
 
930
969
  options = {
931
970
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
932
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
971
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
933
972
  query_params: {'api-version' => @client.api_version},
934
973
  headers: request_headers.merge(custom_headers || {}),
935
974
  base_url: request_url
936
975
  }
937
- promise = @client.make_request_async(:get, path_template, options)
976
+ promise = @client.make_request_async(:post, path_template, options)
938
977
 
939
978
  promise = promise.then do |result|
940
979
  http_response = result.response
@@ -946,16 +985,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
946
985
  end
947
986
 
948
987
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
949
- # Deserialize Response
950
- if status_code == 200
951
- begin
952
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
953
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
954
- result.body = @client.deserialize(result_mapper, parsed_response)
955
- rescue Exception => e
956
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
957
- end
958
- end
988
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
989
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
959
990
 
960
991
  result
961
992
  end
@@ -964,54 +995,53 @@ module Azure::EventHub::Mgmt::V2017_04_01
964
995
  end
965
996
 
966
997
  #
967
- # Gets the primary and secondary connection strings for the Namespace.
998
+ # Invokes GEO DR failover and reconfigure the alias to point to the secondary
999
+ # namespace
968
1000
  #
969
1001
  # @param resource_group_name [String] Name of the resource group within the
970
1002
  # azure subscription.
971
1003
  # @param namespace_name [String] The Namespace name
972
1004
  # @param alias_parameter [String] The Disaster Recovery configuration name
973
- # @param authorization_rule_name [String] The authorization rule name.
974
1005
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
975
1006
  # will be added to the HTTP request.
976
1007
  #
977
- # @return [AccessKeys] operation results.
978
1008
  #
979
- def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
980
- response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
981
- response.body unless response.nil?
1009
+ def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
1010
+ response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
1011
+ nil
982
1012
  end
983
1013
 
984
1014
  #
985
- # Gets the primary and secondary connection strings for the Namespace.
1015
+ # Invokes GEO DR failover and reconfigure the alias to point to the secondary
1016
+ # namespace
986
1017
  #
987
1018
  # @param resource_group_name [String] Name of the resource group within the
988
1019
  # azure subscription.
989
1020
  # @param namespace_name [String] The Namespace name
990
1021
  # @param alias_parameter [String] The Disaster Recovery configuration name
991
- # @param authorization_rule_name [String] The authorization rule name.
992
1022
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
993
1023
  # will be added to the HTTP request.
994
1024
  #
995
1025
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
996
1026
  #
997
- def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
998
- list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
1027
+ def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
1028
+ fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
999
1029
  end
1000
1030
 
1001
1031
  #
1002
- # Gets the primary and secondary connection strings for the Namespace.
1032
+ # Invokes GEO DR failover and reconfigure the alias to point to the secondary
1033
+ # namespace
1003
1034
  #
1004
1035
  # @param resource_group_name [String] Name of the resource group within the
1005
1036
  # azure subscription.
1006
1037
  # @param namespace_name [String] The Namespace name
1007
1038
  # @param alias_parameter [String] The Disaster Recovery configuration name
1008
- # @param authorization_rule_name [String] The authorization rule name.
1009
1039
  # @param [Hash{String => String}] A hash of custom headers that will be added
1010
1040
  # to the HTTP request.
1011
1041
  #
1012
1042
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1013
1043
  #
1014
- def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
1044
+ def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
1015
1045
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1016
1046
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1017
1047
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1021,8 +1051,6 @@ module Azure::EventHub::Mgmt::V2017_04_01
1021
1051
  fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
1022
1052
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
1023
1053
  fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
1024
- fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1025
- fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1026
1054
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1027
1055
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1028
1056
 
@@ -1033,13 +1061,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1033
1061
  # Set Headers
1034
1062
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1035
1063
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1036
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys'
1064
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'
1037
1065
 
1038
1066
  request_url = @base_url || @client.base_url
1039
1067
 
1040
1068
  options = {
1041
1069
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1042
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1070
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
1043
1071
  query_params: {'api-version' => @client.api_version},
1044
1072
  headers: request_headers.merge(custom_headers || {}),
1045
1073
  base_url: request_url
@@ -1056,16 +1084,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1056
1084
  end
1057
1085
 
1058
1086
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1059
- # Deserialize Response
1060
- if status_code == 200
1061
- begin
1062
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1063
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
1064
- result.body = @client.deserialize(result_mapper, parsed_response)
1065
- rescue Exception => e
1066
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1067
- end
1068
- end
1087
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1088
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1069
1089
 
1070
1090
  result
1071
1091
  end
@@ -1074,22 +1094,22 @@ module Azure::EventHub::Mgmt::V2017_04_01
1074
1094
  end
1075
1095
 
1076
1096
  #
1077
- # Gets all Alias(Disaster Recovery configurations)
1097
+ # Gets a list of authorization rules for a Namespace.
1078
1098
  #
1079
1099
  # @param next_page_link [String] The NextLink from the previous successful call
1080
1100
  # to List operation.
1081
1101
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1082
1102
  # will be added to the HTTP request.
1083
1103
  #
1084
- # @return [ArmDisasterRecoveryListResult] operation results.
1104
+ # @return [AuthorizationRuleListResult] operation results.
1085
1105
  #
1086
- def list_next(next_page_link, custom_headers:nil)
1087
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1106
+ def list_authorization_rules_next(next_page_link, custom_headers:nil)
1107
+ response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1088
1108
  response.body unless response.nil?
1089
1109
  end
1090
1110
 
1091
1111
  #
1092
- # Gets all Alias(Disaster Recovery configurations)
1112
+ # Gets a list of authorization rules for a Namespace.
1093
1113
  #
1094
1114
  # @param next_page_link [String] The NextLink from the previous successful call
1095
1115
  # to List operation.
@@ -1098,12 +1118,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
1098
1118
  #
1099
1119
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1100
1120
  #
1101
- def list_next_with_http_info(next_page_link, custom_headers:nil)
1102
- list_next_async(next_page_link, custom_headers:custom_headers).value!
1121
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1122
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1103
1123
  end
1104
1124
 
1105
1125
  #
1106
- # Gets all Alias(Disaster Recovery configurations)
1126
+ # Gets a list of authorization rules for a Namespace.
1107
1127
  #
1108
1128
  # @param next_page_link [String] The NextLink from the previous successful call
1109
1129
  # to List operation.
@@ -1112,7 +1132,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
1112
1132
  #
1113
1133
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1114
1134
  #
1115
- def list_next_async(next_page_link, custom_headers:nil)
1135
+ def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1116
1136
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1117
1137
 
1118
1138
 
@@ -1144,11 +1164,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1144
1164
  end
1145
1165
 
1146
1166
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1167
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1168
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1147
1169
  # Deserialize Response
1148
1170
  if status_code == 200
1149
1171
  begin
1150
1172
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1151
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult.mapper()
1173
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
1152
1174
  result.body = @client.deserialize(result_mapper, parsed_response)
1153
1175
  rescue Exception => e
1154
1176
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1162,22 +1184,22 @@ module Azure::EventHub::Mgmt::V2017_04_01
1162
1184
  end
1163
1185
 
1164
1186
  #
1165
- # Gets a list of authorization rules for a Namespace.
1187
+ # Gets all Alias(Disaster Recovery configurations)
1166
1188
  #
1167
1189
  # @param next_page_link [String] The NextLink from the previous successful call
1168
1190
  # to List operation.
1169
1191
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1170
1192
  # will be added to the HTTP request.
1171
1193
  #
1172
- # @return [AuthorizationRuleListResult] operation results.
1194
+ # @return [ArmDisasterRecoveryListResult] operation results.
1173
1195
  #
1174
- def list_authorization_rules_next(next_page_link, custom_headers:nil)
1175
- response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1196
+ def list_next(next_page_link, custom_headers:nil)
1197
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1176
1198
  response.body unless response.nil?
1177
1199
  end
1178
1200
 
1179
1201
  #
1180
- # Gets a list of authorization rules for a Namespace.
1202
+ # Gets all Alias(Disaster Recovery configurations)
1181
1203
  #
1182
1204
  # @param next_page_link [String] The NextLink from the previous successful call
1183
1205
  # to List operation.
@@ -1186,12 +1208,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
1186
1208
  #
1187
1209
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1188
1210
  #
1189
- def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1190
- list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1211
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1212
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1191
1213
  end
1192
1214
 
1193
1215
  #
1194
- # Gets a list of authorization rules for a Namespace.
1216
+ # Gets all Alias(Disaster Recovery configurations)
1195
1217
  #
1196
1218
  # @param next_page_link [String] The NextLink from the previous successful call
1197
1219
  # to List operation.
@@ -1200,7 +1222,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
1200
1222
  #
1201
1223
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1202
1224
  #
1203
- def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1225
+ def list_next_async(next_page_link, custom_headers:nil)
1204
1226
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1205
1227
 
1206
1228
 
@@ -1232,11 +1254,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1232
1254
  end
1233
1255
 
1234
1256
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1257
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1258
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1235
1259
  # Deserialize Response
1236
1260
  if status_code == 200
1237
1261
  begin
1238
1262
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1239
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
1263
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult.mapper()
1240
1264
  result.body = @client.deserialize(result_mapper, parsed_response)
1241
1265
  rescue Exception => e
1242
1266
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1250,47 +1274,47 @@ module Azure::EventHub::Mgmt::V2017_04_01
1250
1274
  end
1251
1275
 
1252
1276
  #
1253
- # Gets all Alias(Disaster Recovery configurations)
1277
+ # Gets a list of authorization rules for a Namespace.
1254
1278
  #
1255
1279
  # @param resource_group_name [String] Name of the resource group within the
1256
1280
  # azure subscription.
1257
1281
  # @param namespace_name [String] The Namespace name
1282
+ # @param alias_parameter [String] The Disaster Recovery configuration name
1258
1283
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1259
1284
  # will be added to the HTTP request.
1260
1285
  #
1261
- # @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of
1286
+ # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1262
1287
  # the response.
1263
1288
  #
1264
- def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1265
- response = list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1289
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
1290
+ response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
1266
1291
  unless response.nil?
1267
1292
  page = response.body
1268
1293
  page.next_method = Proc.new do |next_page_link|
1269
- list_next_async(next_page_link, custom_headers:custom_headers)
1294
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1270
1295
  end
1271
1296
  page
1272
1297
  end
1273
1298
  end
1274
1299
 
1275
1300
  #
1276
- # Gets a list of authorization rules for a Namespace.
1301
+ # Gets all Alias(Disaster Recovery configurations)
1277
1302
  #
1278
1303
  # @param resource_group_name [String] Name of the resource group within the
1279
1304
  # azure subscription.
1280
1305
  # @param namespace_name [String] The Namespace name
1281
- # @param alias_parameter [String] The Disaster Recovery configuration name
1282
1306
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1283
1307
  # will be added to the HTTP request.
1284
1308
  #
1285
- # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1309
+ # @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of
1286
1310
  # the response.
1287
1311
  #
1288
- def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
1289
- response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
1312
+ def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1313
+ response = list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1290
1314
  unless response.nil?
1291
1315
  page = response.body
1292
1316
  page.next_method = Proc.new do |next_page_link|
1293
- list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1317
+ list_next_async(next_page_link, custom_headers:custom_headers)
1294
1318
  end
1295
1319
  page
1296
1320
  end