azure_mgmt_event_hub 0.18.1 → 0.18.2

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