azure_mgmt_event_hub 0.17.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2014-09-01/generated/azure_mgmt_event_hub.rb +59 -0
  3. data/lib/2014-09-01/generated/azure_mgmt_event_hub/consumer_groups.rb +598 -0
  4. data/lib/{2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb → 2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb} +14 -14
  5. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hubs.rb +1239 -0
  6. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/access_rights.rb +17 -0
  7. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +46 -0
  8. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +75 -0
  9. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb +115 -0
  10. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +100 -0
  11. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb} +26 -43
  12. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/entity_status.rb +23 -0
  13. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +150 -0
  14. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +100 -0
  15. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb +152 -0
  16. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +160 -0
  17. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb} +13 -12
  18. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb} +31 -38
  19. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_state.rb +27 -0
  20. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb +66 -0
  21. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation.rb +1 -1
  22. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_display.rb +1 -1
  23. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_list_result.rb +2 -2
  24. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/resource.rb +91 -0
  25. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb +79 -0
  26. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +102 -0
  27. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_post_resource.rb +175 -0
  28. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb +90 -0
  29. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku.rb +6 -11
  30. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_name.rb +1 -1
  31. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_tier.rb +2 -1
  32. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +89 -0
  33. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +20 -0
  34. data/lib/2014-09-01/generated/azure_mgmt_event_hub/module_definition.rb +9 -0
  35. data/lib/2014-09-01/generated/azure_mgmt_event_hub/namespaces.rb +2044 -0
  36. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/operations.rb +11 -8
  37. data/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +10 -0
  38. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  39. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +31 -5
  40. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  41. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  42. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +1 -1
  43. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  44. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +1 -1
  45. data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +32 -0
  46. data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  47. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +16 -22
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +15 -1
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +263 -239
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -5
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +302 -263
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +1 -1
  53. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +1 -1
  54. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
  55. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +11 -0
  56. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
  57. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  58. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  59. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  60. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +1 -1
  61. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +1 -1
  62. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +1 -2
  63. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  64. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
  65. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  66. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  67. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +193 -1212
  68. data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  69. data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +4 -0
  70. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +35 -14
  71. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +530 -29
  72. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +11 -7
  73. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub_management_client.rb +149 -0
  74. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_cluster.rb +47 -0
  75. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_clusters_list.rb +56 -0
  76. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +18 -6
  77. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +1 -1
  78. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/connection_state.rb +59 -0
  79. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
  80. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +36 -1
  81. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_container.rb +46 -0
  82. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_list_result.rb +56 -0
  83. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
  84. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +70 -0
  85. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/end_point_provisioning_state.rb +20 -0
  86. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  87. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity.rb +72 -0
  88. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity_type.rb +15 -0
  89. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +1 -1
  90. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_source.rb +15 -0
  91. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +68 -0
  92. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
  93. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +126 -0
  94. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +58 -0
  95. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
  96. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint.rb +46 -0
  97. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection.rb +100 -0
  98. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection_list_result.rb +100 -0
  99. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_connection_status.rb +18 -0
  100. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resource.rb +119 -0
  101. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resources_list_result.rb +67 -0
  102. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  103. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
  104. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
  105. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  106. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +6 -6
  107. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +661 -412
  108. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_endpoint_connections.rb +625 -0
  109. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_link_resources.rb +127 -0
  110. data/lib/azure_mgmt_event_hub.rb +3 -2
  111. data/lib/profiles/latest/modules/eventhub_profile_module.rb +254 -46
  112. data/lib/version.rb +1 -1
  113. metadata +66 -16
@@ -19,7 +19,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
19
19
  attr_accessor :provisioning_state
20
20
 
21
21
  # @return [String] ARM Id of the Primary/Secondary eventhub namespace
22
- # name, which is part of GEO DR pairning
22
+ # name, which is part of GEO DR pairing
23
23
  attr_accessor :partner_namespace
24
24
 
25
25
  # @return [String] Alternate name specified when alias and namespace
@@ -32,7 +32,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
32
32
  def get_all_items
33
33
  items = @value
34
34
  page = self
35
- while page.next_link != nil do
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
36
  page = page.get_next_page
37
37
  items.concat(page.value)
38
38
  end
@@ -32,7 +32,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
32
32
  def get_all_items
33
33
  items = @value
34
34
  page = self
35
- while page.next_link != nil do
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
36
  page = page.get_next_page
37
37
  items.concat(page.value)
38
38
  end
@@ -36,6 +36,9 @@ module Azure::EventHub::Mgmt::V2017_04_01
36
36
  # stored. (Storage Account, Blob Names)
37
37
  attr_accessor :destination
38
38
 
39
+ # @return [Boolean] A value that indicates whether to Skip Empty Archives
40
+ attr_accessor :skip_empty_archives
41
+
39
42
 
40
43
  #
41
44
  # Mapper for CaptureDescription class as Ruby Hash.
@@ -99,6 +102,14 @@ module Azure::EventHub::Mgmt::V2017_04_01
99
102
  name: 'Composite',
100
103
  class_name: 'Destination'
101
104
  }
105
+ },
106
+ skip_empty_archives: {
107
+ client_side_validation: true,
108
+ required: false,
109
+ serialized_name: 'skipEmptyArchives',
110
+ type: {
111
+ name: 'Boolean'
112
+ }
102
113
  }
103
114
  }
104
115
  }
@@ -18,7 +18,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
18
18
  # @return [DateTime] The exact time the message was updated.
19
19
  attr_accessor :updated_at
20
20
 
21
- # @return [String] Usermetadata is a placeholder to store user-defined
21
+ # @return [String] User Metadata is a placeholder to store user-defined
22
22
  # string data with maximum length 1024. e.g. it can be used to store
23
23
  # descriptive data, such as list of teams and their contact information
24
24
  # also user-defined configuration settings can be stored.
@@ -32,7 +32,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
32
32
  def get_all_items
33
33
  items = @value
34
34
  page = self
35
- while page.next_link != nil do
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
36
  page = page.get_next_page
37
37
  items.concat(page.value)
38
38
  end
@@ -6,7 +6,7 @@
6
6
  module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
- # Error reponse indicates EventHub service is not able to process the
9
+ # Error response indicates Event Hub service is not able to process the
10
10
  # incoming request. The reason is provided in the error message.
11
11
  #
12
12
  class ErrorResponse
@@ -31,7 +31,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -12,7 +12,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [MessagingRegionsProperties]
15
+ # @return [MessagingRegionsProperties] Properties of Messaging Region
16
16
  attr_accessor :properties
17
17
 
18
18
 
@@ -32,7 +32,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
32
32
  def get_all_items
33
33
  items = @value
34
34
  page = self
35
- while page.next_link != nil do
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
36
  page = page.get_next_page
37
37
  items.concat(page.value)
38
38
  end
@@ -6,8 +6,7 @@
6
6
  module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
- # Model object.
10
- #
9
+ # Properties of Messaging Region
11
10
  #
12
11
  class MessagingRegionsProperties
13
12
 
@@ -33,7 +33,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -7,7 +7,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
9
  # Parameters supplied to the Regenerate Authorization Rule operation,
10
- # specifies which key neeeds to be reset.
10
+ # specifies which key needs to be reset.
11
11
  #
12
12
  class RegenerateAccessKeyParameters
13
13
 
@@ -6,19 +6,19 @@
6
6
  module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
- # The Resource definition
9
+ # The resource definition.
10
10
  #
11
11
  class Resource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Resource Id
15
+ # @return [String] Resource ID.
16
16
  attr_accessor :id
17
17
 
18
- # @return [String] Resource name
18
+ # @return [String] Resource name.
19
19
  attr_accessor :name
20
20
 
21
- # @return [String] Resource type
21
+ # @return [String] Resource type.
22
22
  attr_accessor :type
23
23
 
24
24
 
@@ -6,16 +6,16 @@
6
6
  module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
- # Definition of Resource
9
+ # Definition of resource.
10
10
  #
11
11
  class TrackedResource < Resource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Resource location
15
+ # @return [String] Resource location.
16
16
  attr_accessor :location
17
17
 
18
- # @return [Hash{String => String}] Resource tags
18
+ # @return [Hash{String => String}] Resource tags.
19
19
  attr_accessor :tags
20
20
 
21
21
 
@@ -22,859 +22,54 @@ module Azure::EventHub::Mgmt::V2017_04_01
22
22
  attr_reader :client
23
23
 
24
24
  #
25
- # Check the give Namespace name availability.
26
- #
27
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
28
- # availability of the given Namespace name
29
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
- # will be added to the HTTP request.
31
- #
32
- # @return [CheckNameAvailabilityResult] operation results.
33
- #
34
- def check_name_availability(parameters, custom_headers:nil)
35
- response = check_name_availability_async(parameters, custom_headers:custom_headers).value!
36
- response.body unless response.nil?
37
- end
38
-
39
- #
40
- # Check the give Namespace name availability.
41
- #
42
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
43
- # availability of the given Namespace name
44
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
- # will be added to the HTTP request.
46
- #
47
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
- #
49
- def check_name_availability_with_http_info(parameters, custom_headers:nil)
50
- check_name_availability_async(parameters, custom_headers:custom_headers).value!
51
- end
52
-
53
- #
54
- # Check the give Namespace name availability.
55
- #
56
- # @param parameters [CheckNameAvailabilityParameter] Parameters to check
57
- # availability of the given Namespace name
58
- # @param [Hash{String => String}] A hash of custom headers that will be added
59
- # to the HTTP request.
60
- #
61
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
- #
63
- def check_name_availability_async(parameters, custom_headers:nil)
64
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
- fail ArgumentError, 'parameters is nil' if parameters.nil?
67
-
68
-
69
- request_headers = {}
70
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
-
72
- # Set Headers
73
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
-
76
- # Serialize Request
77
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper()
78
- request_content = @client.serialize(request_mapper, parameters)
79
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
80
-
81
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability'
82
-
83
- request_url = @base_url || @client.base_url
84
-
85
- options = {
86
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
- path_params: {'subscriptionId' => @client.subscription_id},
88
- query_params: {'api-version' => @client.api_version},
89
- body: request_content,
90
- headers: request_headers.merge(custom_headers || {}),
91
- base_url: request_url
92
- }
93
- promise = @client.make_request_async(:post, path_template, options)
94
-
95
- promise = promise.then do |result|
96
- http_response = result.response
97
- status_code = http_response.status
98
- response_content = http_response.body
99
- unless status_code == 200
100
- error_model = JSON.load(response_content)
101
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
102
- end
103
-
104
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
- # Deserialize Response
106
- if status_code == 200
107
- begin
108
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
109
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult.mapper()
110
- result.body = @client.deserialize(result_mapper, parsed_response)
111
- rescue Exception => e
112
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
113
- end
114
- end
115
-
116
- result
117
- end
118
-
119
- promise.execute
120
- end
121
-
122
- #
123
- # Lists all the available Namespaces within a subscription, irrespective of the
124
- # resource groups.
125
- #
126
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
- # will be added to the HTTP request.
128
- #
129
- # @return [Array<EHNamespace>] operation results.
130
- #
131
- def list(custom_headers:nil)
132
- first_page = list_as_lazy(custom_headers:custom_headers)
133
- first_page.get_all_items
134
- end
135
-
136
- #
137
- # Lists all the available Namespaces within a subscription, irrespective of the
138
- # resource groups.
139
- #
140
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
- # will be added to the HTTP request.
142
- #
143
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
144
- #
145
- def list_with_http_info(custom_headers:nil)
146
- list_async(custom_headers:custom_headers).value!
147
- end
148
-
149
- #
150
- # Lists all the available Namespaces within a subscription, irrespective of the
151
- # resource groups.
152
- #
153
- # @param [Hash{String => String}] A hash of custom headers that will be added
154
- # to the HTTP request.
155
- #
156
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
157
- #
158
- def list_async(custom_headers:nil)
159
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
160
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
161
-
162
-
163
- request_headers = {}
164
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
165
-
166
- # Set Headers
167
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
168
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
169
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'
170
-
171
- request_url = @base_url || @client.base_url
172
-
173
- options = {
174
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
175
- path_params: {'subscriptionId' => @client.subscription_id},
176
- query_params: {'api-version' => @client.api_version},
177
- headers: request_headers.merge(custom_headers || {}),
178
- base_url: request_url
179
- }
180
- promise = @client.make_request_async(:get, path_template, options)
181
-
182
- promise = promise.then do |result|
183
- http_response = result.response
184
- status_code = http_response.status
185
- response_content = http_response.body
186
- unless status_code == 200
187
- error_model = JSON.load(response_content)
188
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
189
- end
190
-
191
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
192
- # Deserialize Response
193
- if status_code == 200
194
- begin
195
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult.mapper()
197
- result.body = @client.deserialize(result_mapper, parsed_response)
198
- rescue Exception => e
199
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
200
- end
201
- end
202
-
203
- result
204
- end
205
-
206
- promise.execute
207
- end
208
-
209
- #
210
- # Lists the available Namespaces within a resource group.
211
- #
212
- # @param resource_group_name [String] Name of the resource group within the
213
- # azure subscription.
214
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
215
- # will be added to the HTTP request.
216
- #
217
- # @return [Array<EHNamespace>] operation results.
218
- #
219
- def list_by_resource_group(resource_group_name, custom_headers:nil)
220
- first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
221
- first_page.get_all_items
222
- end
223
-
224
- #
225
- # Lists the available Namespaces within a resource group.
226
- #
227
- # @param resource_group_name [String] Name of the resource group within the
228
- # azure subscription.
229
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
230
- # will be added to the HTTP request.
231
- #
232
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
233
- #
234
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
235
- list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
236
- end
237
-
238
- #
239
- # Lists the available Namespaces within a resource group.
240
- #
241
- # @param resource_group_name [String] Name of the resource group within the
242
- # azure subscription.
243
- # @param [Hash{String => String}] A hash of custom headers that will be added
244
- # to the HTTP request.
245
- #
246
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
247
- #
248
- def list_by_resource_group_async(resource_group_name, custom_headers:nil)
249
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
250
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
251
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
252
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
253
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
254
-
255
-
256
- request_headers = {}
257
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
258
-
259
- # Set Headers
260
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
261
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
262
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'
263
-
264
- request_url = @base_url || @client.base_url
265
-
266
- options = {
267
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
268
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
269
- query_params: {'api-version' => @client.api_version},
270
- headers: request_headers.merge(custom_headers || {}),
271
- base_url: request_url
272
- }
273
- promise = @client.make_request_async(:get, path_template, options)
274
-
275
- promise = promise.then do |result|
276
- http_response = result.response
277
- status_code = http_response.status
278
- response_content = http_response.body
279
- unless status_code == 200
280
- error_model = JSON.load(response_content)
281
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
282
- end
283
-
284
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
285
- # Deserialize Response
286
- if status_code == 200
287
- begin
288
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
289
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult.mapper()
290
- result.body = @client.deserialize(result_mapper, parsed_response)
291
- rescue Exception => e
292
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
293
- end
294
- end
295
-
296
- result
297
- end
298
-
299
- promise.execute
300
- end
301
-
302
- #
303
- # Creates or updates a namespace. Once created, this namespace's resource
304
- # manifest is immutable. This operation is idempotent.
305
- #
306
- # @param resource_group_name [String] Name of the resource group within the
307
- # azure subscription.
308
- # @param namespace_name [String] The Namespace name
309
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
310
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
- # will be added to the HTTP request.
312
- #
313
- # @return [EHNamespace] operation results.
314
- #
315
- def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
316
- response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
317
- response.body unless response.nil?
318
- end
319
-
320
- #
321
- # @param resource_group_name [String] Name of the resource group within the
322
- # azure subscription.
323
- # @param namespace_name [String] The Namespace name
324
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
325
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
326
- # will be added to the HTTP request.
327
- #
328
- # @return [Concurrent::Promise] promise which provides async access to http
329
- # response.
330
- #
331
- def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
332
- # Send request
333
- promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers)
334
-
335
- promise = promise.then do |response|
336
- # Defining deserialization method.
337
- deserialize_method = lambda do |parsed_response|
338
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
339
- parsed_response = @client.deserialize(result_mapper, parsed_response)
340
- end
341
-
342
- # Waiting for response.
343
- @client.get_long_running_operation_result(response, deserialize_method)
344
- end
345
-
346
- promise
347
- end
348
-
349
- #
350
- # Deletes an existing namespace. This operation also removes all associated
351
- # resources under the namespace.
352
- #
353
- # @param resource_group_name [String] Name of the resource group within the
354
- # azure subscription.
355
- # @param namespace_name [String] The Namespace name
356
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
357
- # will be added to the HTTP request.
358
- #
359
- def delete(resource_group_name, namespace_name, custom_headers:nil)
360
- response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
361
- nil
362
- end
363
-
364
- #
365
- # @param resource_group_name [String] Name of the resource group within the
366
- # azure subscription.
367
- # @param namespace_name [String] The Namespace name
368
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
- # will be added to the HTTP request.
370
- #
371
- # @return [Concurrent::Promise] promise which provides async access to http
372
- # response.
373
- #
374
- def delete_async(resource_group_name, namespace_name, custom_headers:nil)
375
- # Send request
376
- promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers)
377
-
378
- promise = promise.then do |response|
379
- # Defining deserialization method.
380
- deserialize_method = lambda do |parsed_response|
381
- end
382
-
383
- # Waiting for response.
384
- @client.get_long_running_operation_result(response, deserialize_method)
385
- end
386
-
387
- promise
388
- end
389
-
390
- #
391
- # Gets the description of the specified namespace.
392
- #
393
- # @param resource_group_name [String] Name of the resource group within the
394
- # azure subscription.
395
- # @param namespace_name [String] The Namespace name
396
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
397
- # will be added to the HTTP request.
398
- #
399
- # @return [EHNamespace] operation results.
400
- #
401
- def get(resource_group_name, namespace_name, custom_headers:nil)
402
- response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
403
- response.body unless response.nil?
404
- end
405
-
406
- #
407
- # Gets the description of the specified namespace.
408
- #
409
- # @param resource_group_name [String] Name of the resource group within the
410
- # azure subscription.
411
- # @param namespace_name [String] The Namespace name
412
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
413
- # will be added to the HTTP request.
414
- #
415
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
416
- #
417
- def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
418
- get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
419
- end
420
-
421
- #
422
- # Gets the description of the specified namespace.
423
- #
424
- # @param resource_group_name [String] Name of the resource group within the
425
- # azure subscription.
426
- # @param namespace_name [String] The Namespace name
427
- # @param [Hash{String => String}] A hash of custom headers that will be added
428
- # to the HTTP request.
429
- #
430
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
431
- #
432
- def get_async(resource_group_name, namespace_name, custom_headers:nil)
433
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
434
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
435
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
436
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
437
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
438
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
439
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
440
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
441
-
442
-
443
- request_headers = {}
444
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
445
-
446
- # Set Headers
447
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
448
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
449
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
450
-
451
- request_url = @base_url || @client.base_url
452
-
453
- options = {
454
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
455
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
456
- query_params: {'api-version' => @client.api_version},
457
- headers: request_headers.merge(custom_headers || {}),
458
- base_url: request_url
459
- }
460
- promise = @client.make_request_async(:get, path_template, options)
461
-
462
- promise = promise.then do |result|
463
- http_response = result.response
464
- status_code = http_response.status
465
- response_content = http_response.body
466
- unless status_code == 200 || status_code == 201
467
- error_model = JSON.load(response_content)
468
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
469
- end
470
-
471
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
472
- # Deserialize Response
473
- if status_code == 200
474
- begin
475
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
476
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
477
- result.body = @client.deserialize(result_mapper, parsed_response)
478
- rescue Exception => e
479
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
480
- end
481
- end
482
- # Deserialize Response
483
- if status_code == 201
484
- begin
485
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
486
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
487
- result.body = @client.deserialize(result_mapper, parsed_response)
488
- rescue Exception => e
489
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
490
- end
491
- end
492
-
493
- result
494
- end
495
-
496
- promise.execute
497
- end
498
-
499
- #
500
- # Creates or updates a namespace. Once created, this namespace's resource
501
- # manifest is immutable. This operation is idempotent.
502
- #
503
- # @param resource_group_name [String] Name of the resource group within the
504
- # azure subscription.
505
- # @param namespace_name [String] The Namespace name
506
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
507
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
508
- # will be added to the HTTP request.
509
- #
510
- # @return [EHNamespace] operation results.
511
- #
512
- def update(resource_group_name, namespace_name, parameters, custom_headers:nil)
513
- response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
514
- response.body unless response.nil?
515
- end
516
-
517
- #
518
- # Creates or updates a namespace. Once created, this namespace's resource
519
- # manifest is immutable. This operation is idempotent.
520
- #
521
- # @param resource_group_name [String] Name of the resource group within the
522
- # azure subscription.
523
- # @param namespace_name [String] The Namespace name
524
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
525
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
526
- # will be added to the HTTP request.
527
- #
528
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
529
- #
530
- def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
531
- update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
532
- end
533
-
534
- #
535
- # Creates or updates a namespace. Once created, this namespace's resource
536
- # manifest is immutable. This operation is idempotent.
537
- #
538
- # @param resource_group_name [String] Name of the resource group within the
539
- # azure subscription.
540
- # @param namespace_name [String] The Namespace name
541
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
542
- # @param [Hash{String => String}] A hash of custom headers that will be added
543
- # to the HTTP request.
544
- #
545
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
546
- #
547
- def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
548
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
549
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
550
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
551
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
552
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
553
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
554
- fail ArgumentError, 'parameters is nil' if parameters.nil?
555
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
556
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
557
-
558
-
559
- request_headers = {}
560
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
561
-
562
- # Set Headers
563
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
564
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
565
-
566
- # Serialize Request
567
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
568
- request_content = @client.serialize(request_mapper, parameters)
569
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
570
-
571
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
572
-
573
- request_url = @base_url || @client.base_url
574
-
575
- options = {
576
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
577
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
578
- query_params: {'api-version' => @client.api_version},
579
- body: request_content,
580
- headers: request_headers.merge(custom_headers || {}),
581
- base_url: request_url
582
- }
583
- promise = @client.make_request_async(:patch, path_template, options)
584
-
585
- promise = promise.then do |result|
586
- http_response = result.response
587
- status_code = http_response.status
588
- response_content = http_response.body
589
- unless status_code == 201 || status_code == 200 || status_code == 202
590
- error_model = JSON.load(response_content)
591
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
592
- end
593
-
594
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
595
- # Deserialize Response
596
- if status_code == 201
597
- begin
598
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
599
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
600
- result.body = @client.deserialize(result_mapper, parsed_response)
601
- rescue Exception => e
602
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
603
- end
604
- end
605
- # Deserialize Response
606
- if status_code == 200
607
- begin
608
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
609
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
610
- result.body = @client.deserialize(result_mapper, parsed_response)
611
- rescue Exception => e
612
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
613
- end
614
- end
615
-
616
- result
617
- end
618
-
619
- promise.execute
620
- end
621
-
622
- #
623
- # Gets messaging plan for specified namespace.
624
- #
625
- # @param resource_group_name [String] Name of the resource group within the
626
- # azure subscription.
627
- # @param namespace_name [String] The Namespace name
628
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
629
- # will be added to the HTTP request.
630
- #
631
- # @return [MessagingPlan] operation results.
632
- #
633
- def get_messaging_plan(resource_group_name, namespace_name, custom_headers:nil)
634
- response = get_messaging_plan_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
635
- response.body unless response.nil?
636
- end
637
-
638
- #
639
- # Gets messaging plan for specified namespace.
640
- #
641
- # @param resource_group_name [String] Name of the resource group within the
642
- # azure subscription.
643
- # @param namespace_name [String] The Namespace name
644
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
645
- # will be added to the HTTP request.
646
- #
647
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
648
- #
649
- def get_messaging_plan_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
650
- get_messaging_plan_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
651
- end
652
-
653
- #
654
- # Gets messaging plan for specified namespace.
655
- #
656
- # @param resource_group_name [String] Name of the resource group within the
657
- # azure subscription.
658
- # @param namespace_name [String] The Namespace name
659
- # @param [Hash{String => String}] A hash of custom headers that will be added
660
- # to the HTTP request.
661
- #
662
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
663
- #
664
- def get_messaging_plan_async(resource_group_name, namespace_name, custom_headers:nil)
665
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
666
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
667
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
668
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
669
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
670
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
671
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
672
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
673
-
674
-
675
- request_headers = {}
676
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
677
-
678
- # Set Headers
679
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
680
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
681
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/messagingplan'
682
-
683
- request_url = @base_url || @client.base_url
684
-
685
- options = {
686
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
687
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
688
- query_params: {'api-version' => @client.api_version},
689
- headers: request_headers.merge(custom_headers || {}),
690
- base_url: request_url
691
- }
692
- promise = @client.make_request_async(:get, path_template, options)
693
-
694
- promise = promise.then do |result|
695
- http_response = result.response
696
- status_code = http_response.status
697
- response_content = http_response.body
698
- unless status_code == 200
699
- error_model = JSON.load(response_content)
700
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
701
- end
702
-
703
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
704
- # Deserialize Response
705
- if status_code == 200
706
- begin
707
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
708
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::MessagingPlan.mapper()
709
- result.body = @client.deserialize(result_mapper, parsed_response)
710
- rescue Exception => e
711
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
712
- end
713
- end
714
-
715
- result
716
- end
717
-
718
- promise.execute
719
- end
720
-
721
- #
722
- # Gets a list of authorization rules for a Namespace.
723
- #
724
- # @param resource_group_name [String] Name of the resource group within the
725
- # azure subscription.
726
- # @param namespace_name [String] The Namespace name
727
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
728
- # will be added to the HTTP request.
729
- #
730
- # @return [Array<AuthorizationRule>] operation results.
731
- #
732
- def list_authorization_rules(resource_group_name, namespace_name, custom_headers:nil)
733
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
734
- first_page.get_all_items
735
- end
736
-
737
- #
738
- # Gets a list of authorization rules for a Namespace.
739
- #
740
- # @param resource_group_name [String] Name of the resource group within the
741
- # azure subscription.
742
- # @param namespace_name [String] The Namespace name
743
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
744
- # will be added to the HTTP request.
745
- #
746
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
747
- #
748
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
749
- list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
750
- end
751
-
752
- #
753
- # Gets a list of authorization rules for a Namespace.
754
- #
755
- # @param resource_group_name [String] Name of the resource group within the
756
- # azure subscription.
757
- # @param namespace_name [String] The Namespace name
758
- # @param [Hash{String => String}] A hash of custom headers that will be added
759
- # to the HTTP request.
760
- #
761
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
762
- #
763
- def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:nil)
764
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
765
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
766
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
767
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
768
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
769
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
770
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
771
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
772
-
773
-
774
- request_headers = {}
775
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
776
-
777
- # Set Headers
778
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
779
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
780
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules'
781
-
782
- request_url = @base_url || @client.base_url
783
-
784
- options = {
785
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
786
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
787
- query_params: {'api-version' => @client.api_version},
788
- headers: request_headers.merge(custom_headers || {}),
789
- base_url: request_url
790
- }
791
- promise = @client.make_request_async(:get, path_template, options)
792
-
793
- promise = promise.then do |result|
794
- http_response = result.response
795
- status_code = http_response.status
796
- response_content = http_response.body
797
- unless status_code == 200
798
- error_model = JSON.load(response_content)
799
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
800
- end
801
-
802
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
803
- # Deserialize Response
804
- if status_code == 200
805
- begin
806
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
807
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
808
- result.body = @client.deserialize(result_mapper, parsed_response)
809
- rescue Exception => e
810
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
811
- end
812
- end
813
-
814
- result
815
- end
816
-
817
- promise.execute
818
- end
819
-
820
- #
821
- # Creates or updates an AuthorizationRule for a Namespace.
25
+ # Gets a list of authorization rules for a Namespace.
822
26
  #
823
27
  # @param resource_group_name [String] Name of the resource group within the
824
28
  # azure subscription.
825
29
  # @param namespace_name [String] The Namespace name
826
- # @param authorization_rule_name [String] The authorization rule name.
827
- # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
828
30
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
829
31
  # will be added to the HTTP request.
830
32
  #
831
- # @return [AuthorizationRule] operation results.
33
+ # @return [Array<AuthorizationRule>] operation results.
832
34
  #
833
- def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
834
- response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
835
- response.body unless response.nil?
35
+ def list_authorization_rules(resource_group_name, namespace_name, custom_headers:nil)
36
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
37
+ first_page.get_all_items
836
38
  end
837
39
 
838
40
  #
839
- # Creates or updates an AuthorizationRule for a Namespace.
41
+ # Gets a list of authorization rules for a Namespace.
840
42
  #
841
43
  # @param resource_group_name [String] Name of the resource group within the
842
44
  # azure subscription.
843
45
  # @param namespace_name [String] The Namespace name
844
- # @param authorization_rule_name [String] The authorization rule name.
845
- # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
846
46
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
847
47
  # will be added to the HTTP request.
848
48
  #
849
49
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
850
50
  #
851
- def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
852
- create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
51
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
52
+ list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
853
53
  end
854
54
 
855
55
  #
856
- # Creates or updates an AuthorizationRule for a Namespace.
56
+ # Gets a list of authorization rules for a Namespace.
857
57
  #
858
58
  # @param resource_group_name [String] Name of the resource group within the
859
59
  # azure subscription.
860
60
  # @param namespace_name [String] The Namespace name
861
- # @param authorization_rule_name [String] The authorization rule name.
862
- # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
863
61
  # @param [Hash{String => String}] A hash of custom headers that will be added
864
62
  # to the HTTP request.
865
63
  #
866
64
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
867
65
  #
868
- def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
66
+ def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:nil)
869
67
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
870
68
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
871
69
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
872
70
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
873
71
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
874
72
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
875
- fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
876
- fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
877
- fail ArgumentError, 'parameters is nil' if parameters.nil?
878
73
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
879
74
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
880
75
 
@@ -885,25 +80,18 @@ module Azure::EventHub::Mgmt::V2017_04_01
885
80
  # Set Headers
886
81
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
887
82
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
888
-
889
- # Serialize Request
890
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
891
- request_content = @client.serialize(request_mapper, parameters)
892
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
893
-
894
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
83
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules'
895
84
 
896
85
  request_url = @base_url || @client.base_url
897
86
 
898
87
  options = {
899
88
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
900
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
89
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
901
90
  query_params: {'api-version' => @client.api_version},
902
- body: request_content,
903
91
  headers: request_headers.merge(custom_headers || {}),
904
92
  base_url: request_url
905
93
  }
906
- promise = @client.make_request_async(:put, path_template, options)
94
+ promise = @client.make_request_async(:get, path_template, options)
907
95
 
908
96
  promise = promise.then do |result|
909
97
  http_response = result.response
@@ -915,11 +103,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
915
103
  end
916
104
 
917
105
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
918
108
  # Deserialize Response
919
109
  if status_code == 200
920
110
  begin
921
111
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
922
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
112
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
923
113
  result.body = @client.deserialize(result_mapper, parsed_response)
924
114
  rescue Exception => e
925
115
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -933,144 +123,54 @@ module Azure::EventHub::Mgmt::V2017_04_01
933
123
  end
934
124
 
935
125
  #
936
- # Deletes an AuthorizationRule for a Namespace.
937
- #
938
- # @param resource_group_name [String] Name of the resource group within the
939
- # azure subscription.
940
- # @param namespace_name [String] The Namespace name
941
- # @param authorization_rule_name [String] The authorization rule name.
942
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
- # will be added to the HTTP request.
944
- #
945
- #
946
- def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
947
- response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
948
- nil
949
- end
950
-
951
- #
952
- # Deletes an AuthorizationRule for a Namespace.
953
- #
954
- # @param resource_group_name [String] Name of the resource group within the
955
- # azure subscription.
956
- # @param namespace_name [String] The Namespace name
957
- # @param authorization_rule_name [String] The authorization rule name.
958
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
- # will be added to the HTTP request.
960
- #
961
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
962
- #
963
- def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
964
- delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
965
- end
966
-
967
- #
968
- # Deletes an AuthorizationRule for a Namespace.
969
- #
970
- # @param resource_group_name [String] Name of the resource group within the
971
- # azure subscription.
972
- # @param namespace_name [String] The Namespace name
973
- # @param authorization_rule_name [String] The authorization rule name.
974
- # @param [Hash{String => String}] A hash of custom headers that will be added
975
- # to the HTTP request.
976
- #
977
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
978
- #
979
- def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
980
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
981
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
982
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
983
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
984
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
985
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
986
- fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
987
- fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
988
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
989
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
990
-
991
-
992
- request_headers = {}
993
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
994
-
995
- # Set Headers
996
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
997
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
998
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
999
-
1000
- request_url = @base_url || @client.base_url
1001
-
1002
- options = {
1003
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1004
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1005
- query_params: {'api-version' => @client.api_version},
1006
- headers: request_headers.merge(custom_headers || {}),
1007
- base_url: request_url
1008
- }
1009
- promise = @client.make_request_async(:delete, path_template, options)
1010
-
1011
- promise = promise.then do |result|
1012
- http_response = result.response
1013
- status_code = http_response.status
1014
- response_content = http_response.body
1015
- unless status_code == 204 || status_code == 200
1016
- error_model = JSON.load(response_content)
1017
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1018
- end
1019
-
1020
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1021
-
1022
- result
1023
- end
1024
-
1025
- promise.execute
1026
- end
1027
-
1028
- #
1029
- # Gets an AuthorizationRule for a Namespace by rule name.
126
+ # Creates or updates an AuthorizationRule for a Namespace.
1030
127
  #
1031
128
  # @param resource_group_name [String] Name of the resource group within the
1032
129
  # azure subscription.
1033
130
  # @param namespace_name [String] The Namespace name
1034
131
  # @param authorization_rule_name [String] The authorization rule name.
132
+ # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
1035
133
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1036
134
  # will be added to the HTTP request.
1037
135
  #
1038
136
  # @return [AuthorizationRule] operation results.
1039
137
  #
1040
- def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1041
- response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
138
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
139
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1042
140
  response.body unless response.nil?
1043
141
  end
1044
142
 
1045
143
  #
1046
- # Gets an AuthorizationRule for a Namespace by rule name.
144
+ # Creates or updates an AuthorizationRule for a Namespace.
1047
145
  #
1048
146
  # @param resource_group_name [String] Name of the resource group within the
1049
147
  # azure subscription.
1050
148
  # @param namespace_name [String] The Namespace name
1051
149
  # @param authorization_rule_name [String] The authorization rule name.
150
+ # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
1052
151
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1053
152
  # will be added to the HTTP request.
1054
153
  #
1055
154
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1056
155
  #
1057
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1058
- get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
156
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
157
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1059
158
  end
1060
159
 
1061
160
  #
1062
- # Gets an AuthorizationRule for a Namespace by rule name.
161
+ # Creates or updates an AuthorizationRule for a Namespace.
1063
162
  #
1064
163
  # @param resource_group_name [String] Name of the resource group within the
1065
164
  # azure subscription.
1066
165
  # @param namespace_name [String] The Namespace name
1067
166
  # @param authorization_rule_name [String] The authorization rule name.
167
+ # @param parameters [AuthorizationRule] The shared access AuthorizationRule.
1068
168
  # @param [Hash{String => String}] A hash of custom headers that will be added
1069
169
  # to the HTTP request.
1070
170
  #
1071
171
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1072
172
  #
1073
- def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
173
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1074
174
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1075
175
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1076
176
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1079,6 +179,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
1079
179
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1080
180
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1081
181
  fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
182
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1082
183
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1083
184
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1084
185
 
@@ -1089,111 +190,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1089
190
  # Set Headers
1090
191
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1091
192
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1092
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
1093
-
1094
- request_url = @base_url || @client.base_url
1095
-
1096
- options = {
1097
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1098
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1099
- query_params: {'api-version' => @client.api_version},
1100
- headers: request_headers.merge(custom_headers || {}),
1101
- base_url: request_url
1102
- }
1103
- promise = @client.make_request_async(:get, path_template, options)
1104
-
1105
- promise = promise.then do |result|
1106
- http_response = result.response
1107
- status_code = http_response.status
1108
- response_content = http_response.body
1109
- unless status_code == 200
1110
- error_model = JSON.load(response_content)
1111
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1112
- end
1113
-
1114
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1115
- # Deserialize Response
1116
- if status_code == 200
1117
- begin
1118
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1119
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
1120
- result.body = @client.deserialize(result_mapper, parsed_response)
1121
- rescue Exception => e
1122
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1123
- end
1124
- end
1125
-
1126
- result
1127
- end
1128
-
1129
- promise.execute
1130
- end
1131
-
1132
- #
1133
- # Gets the primary and secondary connection strings for the Namespace.
1134
- #
1135
- # @param resource_group_name [String] Name of the resource group within the
1136
- # azure subscription.
1137
- # @param namespace_name [String] The Namespace name
1138
- # @param authorization_rule_name [String] The authorization rule name.
1139
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1140
- # will be added to the HTTP request.
1141
- #
1142
- # @return [AccessKeys] operation results.
1143
- #
1144
- def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1145
- response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1146
- response.body unless response.nil?
1147
- end
1148
-
1149
- #
1150
- # Gets the primary and secondary connection strings for the Namespace.
1151
- #
1152
- # @param resource_group_name [String] Name of the resource group within the
1153
- # azure subscription.
1154
- # @param namespace_name [String] The Namespace name
1155
- # @param authorization_rule_name [String] The authorization rule name.
1156
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1157
- # will be added to the HTTP request.
1158
- #
1159
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1160
- #
1161
- def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1162
- list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1163
- end
1164
-
1165
- #
1166
- # Gets the primary and secondary connection strings for the Namespace.
1167
- #
1168
- # @param resource_group_name [String] Name of the resource group within the
1169
- # azure subscription.
1170
- # @param namespace_name [String] The Namespace name
1171
- # @param authorization_rule_name [String] The authorization rule name.
1172
- # @param [Hash{String => String}] A hash of custom headers that will be added
1173
- # to the HTTP request.
1174
- #
1175
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1176
- #
1177
- def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1178
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1179
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1180
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1181
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1182
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1183
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1184
- fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1185
- fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1186
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1187
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1188
-
1189
193
 
1190
- request_headers = {}
1191
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
194
+ # Serialize Request
195
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
196
+ request_content = @client.serialize(request_mapper, parameters)
197
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1192
198
 
1193
- # Set Headers
1194
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1195
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1196
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'
199
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'
1197
200
 
1198
201
  request_url = @base_url || @client.base_url
1199
202
 
@@ -1201,10 +204,11 @@ module Azure::EventHub::Mgmt::V2017_04_01
1201
204
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1202
205
  path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1203
206
  query_params: {'api-version' => @client.api_version},
207
+ body: request_content,
1204
208
  headers: request_headers.merge(custom_headers || {}),
1205
209
  base_url: request_url
1206
210
  }
1207
- promise = @client.make_request_async(:post, path_template, options)
211
+ promise = @client.make_request_async(:put, path_template, options)
1208
212
 
1209
213
  promise = promise.then do |result|
1210
214
  http_response = result.response
@@ -1216,11 +220,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1216
220
  end
1217
221
 
1218
222
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
223
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
224
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1219
225
  # Deserialize Response
1220
226
  if status_code == 200
1221
227
  begin
1222
228
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1223
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
229
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
1224
230
  result.body = @client.deserialize(result_mapper, parsed_response)
1225
231
  rescue Exception => e
1226
232
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1234,60 +240,50 @@ module Azure::EventHub::Mgmt::V2017_04_01
1234
240
  end
1235
241
 
1236
242
  #
1237
- # Regenerates the primary or secondary connection strings for the specified
1238
- # Namespace.
243
+ # Deletes an AuthorizationRule for a Namespace.
1239
244
  #
1240
245
  # @param resource_group_name [String] Name of the resource group within the
1241
246
  # azure subscription.
1242
247
  # @param namespace_name [String] The Namespace name
1243
248
  # @param authorization_rule_name [String] The authorization rule name.
1244
- # @param parameters [RegenerateAccessKeyParameters] Parameters required to
1245
- # regenerate the connection string.
1246
249
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1247
250
  # will be added to the HTTP request.
1248
251
  #
1249
- # @return [AccessKeys] operation results.
1250
252
  #
1251
- def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1252
- response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1253
- response.body unless response.nil?
253
+ def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
254
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
255
+ nil
1254
256
  end
1255
257
 
1256
258
  #
1257
- # Regenerates the primary or secondary connection strings for the specified
1258
- # Namespace.
259
+ # Deletes an AuthorizationRule for a Namespace.
1259
260
  #
1260
261
  # @param resource_group_name [String] Name of the resource group within the
1261
262
  # azure subscription.
1262
263
  # @param namespace_name [String] The Namespace name
1263
264
  # @param authorization_rule_name [String] The authorization rule name.
1264
- # @param parameters [RegenerateAccessKeyParameters] Parameters required to
1265
- # regenerate the connection string.
1266
265
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1267
266
  # will be added to the HTTP request.
1268
267
  #
1269
268
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1270
269
  #
1271
- def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1272
- regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
270
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
271
+ delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1273
272
  end
1274
273
 
1275
274
  #
1276
- # Regenerates the primary or secondary connection strings for the specified
1277
- # Namespace.
275
+ # Deletes an AuthorizationRule for a Namespace.
1278
276
  #
1279
277
  # @param resource_group_name [String] Name of the resource group within the
1280
278
  # azure subscription.
1281
279
  # @param namespace_name [String] The Namespace name
1282
280
  # @param authorization_rule_name [String] The authorization rule name.
1283
- # @param parameters [RegenerateAccessKeyParameters] Parameters required to
1284
- # regenerate the connection string.
1285
281
  # @param [Hash{String => String}] A hash of custom headers that will be added
1286
282
  # to the HTTP request.
1287
283
  #
1288
284
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1289
285
  #
1290
- def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
286
+ def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1291
287
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1292
288
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1293
289
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1296,7 +292,6 @@ module Azure::EventHub::Mgmt::V2017_04_01
1296
292
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1297
293
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1298
294
  fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1299
- fail ArgumentError, 'parameters is nil' if parameters.nil?
1300
295
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1301
296
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1302
297
 
@@ -1307,13 +302,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
1307
302
  # Set Headers
1308
303
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1309
304
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1310
-
1311
- # Serialize Request
1312
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper()
1313
- request_content = @client.serialize(request_mapper, parameters)
1314
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1315
-
1316
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'
305
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'
1317
306
 
1318
307
  request_url = @base_url || @client.base_url
1319
308
 
@@ -1321,32 +310,23 @@ module Azure::EventHub::Mgmt::V2017_04_01
1321
310
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1322
311
  path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1323
312
  query_params: {'api-version' => @client.api_version},
1324
- body: request_content,
1325
313
  headers: request_headers.merge(custom_headers || {}),
1326
314
  base_url: request_url
1327
315
  }
1328
- promise = @client.make_request_async(:post, path_template, options)
316
+ promise = @client.make_request_async(:delete, path_template, options)
1329
317
 
1330
318
  promise = promise.then do |result|
1331
319
  http_response = result.response
1332
320
  status_code = http_response.status
1333
321
  response_content = http_response.body
1334
- unless status_code == 200
322
+ unless status_code == 200 || status_code == 204
1335
323
  error_model = JSON.load(response_content)
1336
324
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1337
325
  end
1338
326
 
1339
327
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1340
- # Deserialize Response
1341
- if status_code == 200
1342
- begin
1343
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1344
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
1345
- result.body = @client.deserialize(result_mapper, parsed_response)
1346
- rescue Exception => e
1347
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1348
- end
1349
- end
328
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
329
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1350
330
 
1351
331
  result
1352
332
  end
@@ -1355,61 +335,59 @@ module Azure::EventHub::Mgmt::V2017_04_01
1355
335
  end
1356
336
 
1357
337
  #
1358
- # Creates or updates a namespace. Once created, this namespace's resource
1359
- # manifest is immutable. This operation is idempotent.
338
+ # Gets an AuthorizationRule for a Namespace by rule name.
1360
339
  #
1361
340
  # @param resource_group_name [String] Name of the resource group within the
1362
341
  # azure subscription.
1363
342
  # @param namespace_name [String] The Namespace name
1364
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
343
+ # @param authorization_rule_name [String] The authorization rule name.
1365
344
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1366
345
  # will be added to the HTTP request.
1367
346
  #
1368
- # @return [EHNamespace] operation results.
347
+ # @return [AuthorizationRule] operation results.
1369
348
  #
1370
- def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
1371
- response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
349
+ def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
350
+ response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1372
351
  response.body unless response.nil?
1373
352
  end
1374
353
 
1375
354
  #
1376
- # Creates or updates a namespace. Once created, this namespace's resource
1377
- # manifest is immutable. This operation is idempotent.
355
+ # Gets an AuthorizationRule for a Namespace by rule name.
1378
356
  #
1379
357
  # @param resource_group_name [String] Name of the resource group within the
1380
358
  # azure subscription.
1381
359
  # @param namespace_name [String] The Namespace name
1382
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
360
+ # @param authorization_rule_name [String] The authorization rule name.
1383
361
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1384
362
  # will be added to the HTTP request.
1385
363
  #
1386
364
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1387
365
  #
1388
- def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1389
- begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
366
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
367
+ get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1390
368
  end
1391
369
 
1392
370
  #
1393
- # Creates or updates a namespace. Once created, this namespace's resource
1394
- # manifest is immutable. This operation is idempotent.
371
+ # Gets an AuthorizationRule for a Namespace by rule name.
1395
372
  #
1396
373
  # @param resource_group_name [String] Name of the resource group within the
1397
374
  # azure subscription.
1398
375
  # @param namespace_name [String] The Namespace name
1399
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
376
+ # @param authorization_rule_name [String] The authorization rule name.
1400
377
  # @param [Hash{String => String}] A hash of custom headers that will be added
1401
378
  # to the HTTP request.
1402
379
  #
1403
380
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1404
381
  #
1405
- def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
382
+ def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1406
383
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1407
384
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1408
385
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1409
386
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1410
387
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1411
388
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1412
- fail ArgumentError, 'parameters is nil' if parameters.nil?
389
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
390
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1413
391
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1414
392
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1415
393
 
@@ -1420,51 +398,36 @@ module Azure::EventHub::Mgmt::V2017_04_01
1420
398
  # Set Headers
1421
399
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1422
400
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1423
-
1424
- # Serialize Request
1425
- request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
1426
- request_content = @client.serialize(request_mapper, parameters)
1427
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1428
-
1429
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
401
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'
1430
402
 
1431
403
  request_url = @base_url || @client.base_url
1432
404
 
1433
405
  options = {
1434
406
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1435
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
407
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1436
408
  query_params: {'api-version' => @client.api_version},
1437
- body: request_content,
1438
409
  headers: request_headers.merge(custom_headers || {}),
1439
410
  base_url: request_url
1440
411
  }
1441
- promise = @client.make_request_async(:put, path_template, options)
412
+ promise = @client.make_request_async(:get, path_template, options)
1442
413
 
1443
414
  promise = promise.then do |result|
1444
415
  http_response = result.response
1445
416
  status_code = http_response.status
1446
417
  response_content = http_response.body
1447
- unless status_code == 201 || status_code == 200 || status_code == 202
418
+ unless status_code == 200
1448
419
  error_model = JSON.load(response_content)
1449
420
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1450
421
  end
1451
422
 
1452
423
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1453
- # Deserialize Response
1454
- if status_code == 201
1455
- begin
1456
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1457
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
1458
- result.body = @client.deserialize(result_mapper, parsed_response)
1459
- rescue Exception => e
1460
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1461
- end
1462
- end
424
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
425
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1463
426
  # Deserialize Response
1464
427
  if status_code == 200
1465
428
  begin
1466
429
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1467
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespace.mapper()
430
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
1468
431
  result.body = @client.deserialize(result_mapper, parsed_response)
1469
432
  rescue Exception => e
1470
433
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1478,56 +441,59 @@ module Azure::EventHub::Mgmt::V2017_04_01
1478
441
  end
1479
442
 
1480
443
  #
1481
- # Deletes an existing namespace. This operation also removes all associated
1482
- # resources under the namespace.
444
+ # Gets the primary and secondary connection strings for the Namespace.
1483
445
  #
1484
446
  # @param resource_group_name [String] Name of the resource group within the
1485
447
  # azure subscription.
1486
448
  # @param namespace_name [String] The Namespace name
449
+ # @param authorization_rule_name [String] The authorization rule name.
1487
450
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1488
451
  # will be added to the HTTP request.
1489
452
  #
453
+ # @return [AccessKeys] operation results.
1490
454
  #
1491
- def begin_delete(resource_group_name, namespace_name, custom_headers:nil)
1492
- response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1493
- nil
455
+ def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
456
+ response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
457
+ response.body unless response.nil?
1494
458
  end
1495
459
 
1496
460
  #
1497
- # Deletes an existing namespace. This operation also removes all associated
1498
- # resources under the namespace.
461
+ # Gets the primary and secondary connection strings for the Namespace.
1499
462
  #
1500
463
  # @param resource_group_name [String] Name of the resource group within the
1501
464
  # azure subscription.
1502
465
  # @param namespace_name [String] The Namespace name
466
+ # @param authorization_rule_name [String] The authorization rule name.
1503
467
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1504
468
  # will be added to the HTTP request.
1505
469
  #
1506
470
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1507
471
  #
1508
- def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1509
- begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
472
+ def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
473
+ list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1510
474
  end
1511
475
 
1512
476
  #
1513
- # Deletes an existing namespace. This operation also removes all associated
1514
- # resources under the namespace.
477
+ # Gets the primary and secondary connection strings for the Namespace.
1515
478
  #
1516
479
  # @param resource_group_name [String] Name of the resource group within the
1517
480
  # azure subscription.
1518
481
  # @param namespace_name [String] The Namespace name
482
+ # @param authorization_rule_name [String] The authorization rule name.
1519
483
  # @param [Hash{String => String}] A hash of custom headers that will be added
1520
484
  # to the HTTP request.
1521
485
  #
1522
486
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1523
487
  #
1524
- def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil)
488
+ def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1525
489
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1526
490
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1527
491
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1528
492
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1529
493
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1530
494
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
495
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
496
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
1531
497
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1532
498
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1533
499
 
@@ -1538,29 +504,41 @@ module Azure::EventHub::Mgmt::V2017_04_01
1538
504
  # Set Headers
1539
505
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1540
506
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1541
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
507
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys'
1542
508
 
1543
509
  request_url = @base_url || @client.base_url
1544
510
 
1545
511
  options = {
1546
512
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1547
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
513
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1548
514
  query_params: {'api-version' => @client.api_version},
1549
515
  headers: request_headers.merge(custom_headers || {}),
1550
516
  base_url: request_url
1551
517
  }
1552
- promise = @client.make_request_async(:delete, path_template, options)
518
+ promise = @client.make_request_async(:post, path_template, options)
1553
519
 
1554
520
  promise = promise.then do |result|
1555
521
  http_response = result.response
1556
522
  status_code = http_response.status
1557
523
  response_content = http_response.body
1558
- unless status_code == 204 || status_code == 200 || status_code == 202
524
+ unless status_code == 200
1559
525
  error_model = JSON.load(response_content)
1560
526
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1561
527
  end
1562
528
 
1563
529
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
530
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
531
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
532
+ # Deserialize Response
533
+ if status_code == 200
534
+ begin
535
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
536
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
537
+ result.body = @client.deserialize(result_mapper, parsed_response)
538
+ rescue Exception => e
539
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
540
+ end
541
+ end
1564
542
 
1565
543
  result
1566
544
  end
@@ -1569,49 +547,71 @@ module Azure::EventHub::Mgmt::V2017_04_01
1569
547
  end
1570
548
 
1571
549
  #
1572
- # Lists all the available Namespaces within a subscription, irrespective of the
1573
- # resource groups.
550
+ # Regenerates the primary or secondary connection strings for the specified
551
+ # Namespace.
1574
552
  #
1575
- # @param next_page_link [String] The NextLink from the previous successful call
1576
- # to List operation.
553
+ # @param resource_group_name [String] Name of the resource group within the
554
+ # azure subscription.
555
+ # @param namespace_name [String] The Namespace name
556
+ # @param authorization_rule_name [String] The authorization rule name.
557
+ # @param parameters [RegenerateAccessKeyParameters] Parameters required to
558
+ # regenerate the connection string.
1577
559
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1578
560
  # will be added to the HTTP request.
1579
561
  #
1580
- # @return [EHNamespaceListResult] operation results.
562
+ # @return [AccessKeys] operation results.
1581
563
  #
1582
- def list_next(next_page_link, custom_headers:nil)
1583
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
564
+ def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
565
+ response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1584
566
  response.body unless response.nil?
1585
567
  end
1586
568
 
1587
569
  #
1588
- # Lists all the available Namespaces within a subscription, irrespective of the
1589
- # resource groups.
570
+ # Regenerates the primary or secondary connection strings for the specified
571
+ # Namespace.
1590
572
  #
1591
- # @param next_page_link [String] The NextLink from the previous successful call
1592
- # to List operation.
573
+ # @param resource_group_name [String] Name of the resource group within the
574
+ # azure subscription.
575
+ # @param namespace_name [String] The Namespace name
576
+ # @param authorization_rule_name [String] The authorization rule name.
577
+ # @param parameters [RegenerateAccessKeyParameters] Parameters required to
578
+ # regenerate the connection string.
1593
579
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1594
580
  # will be added to the HTTP request.
1595
581
  #
1596
582
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1597
583
  #
1598
- def list_next_with_http_info(next_page_link, custom_headers:nil)
1599
- list_next_async(next_page_link, custom_headers:custom_headers).value!
584
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
585
+ regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1600
586
  end
1601
587
 
1602
588
  #
1603
- # Lists all the available Namespaces within a subscription, irrespective of the
1604
- # resource groups.
589
+ # Regenerates the primary or secondary connection strings for the specified
590
+ # Namespace.
1605
591
  #
1606
- # @param next_page_link [String] The NextLink from the previous successful call
1607
- # to List operation.
592
+ # @param resource_group_name [String] Name of the resource group within the
593
+ # azure subscription.
594
+ # @param namespace_name [String] The Namespace name
595
+ # @param authorization_rule_name [String] The authorization rule name.
596
+ # @param parameters [RegenerateAccessKeyParameters] Parameters required to
597
+ # regenerate the connection string.
1608
598
  # @param [Hash{String => String}] A hash of custom headers that will be added
1609
599
  # to the HTTP request.
1610
600
  #
1611
601
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1612
602
  #
1613
- def list_next_async(next_page_link, custom_headers:nil)
1614
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
603
+ def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
604
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
605
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
606
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
607
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
608
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
609
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
610
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
611
+ fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
612
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
613
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
614
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1615
615
 
1616
616
 
1617
617
  request_headers = {}
@@ -1620,17 +620,25 @@ module Azure::EventHub::Mgmt::V2017_04_01
1620
620
  # Set Headers
1621
621
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1622
622
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1623
- path_template = '{nextLink}'
623
+
624
+ # Serialize Request
625
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper()
626
+ request_content = @client.serialize(request_mapper, parameters)
627
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
628
+
629
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys'
1624
630
 
1625
631
  request_url = @base_url || @client.base_url
1626
632
 
1627
633
  options = {
1628
634
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1629
- skip_encoding_path_params: {'nextLink' => next_page_link},
635
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
636
+ query_params: {'api-version' => @client.api_version},
637
+ body: request_content,
1630
638
  headers: request_headers.merge(custom_headers || {}),
1631
639
  base_url: request_url
1632
640
  }
1633
- promise = @client.make_request_async(:get, path_template, options)
641
+ promise = @client.make_request_async(:post, path_template, options)
1634
642
 
1635
643
  promise = promise.then do |result|
1636
644
  http_response = result.response
@@ -1642,11 +650,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1642
650
  end
1643
651
 
1644
652
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
653
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
654
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1645
655
  # Deserialize Response
1646
656
  if status_code == 200
1647
657
  begin
1648
658
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1649
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult.mapper()
659
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
1650
660
  result.body = @client.deserialize(result_mapper, parsed_response)
1651
661
  rescue Exception => e
1652
662
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1660,46 +670,48 @@ module Azure::EventHub::Mgmt::V2017_04_01
1660
670
  end
1661
671
 
1662
672
  #
1663
- # Lists the available Namespaces within a resource group.
673
+ # Check the give Namespace name availability.
1664
674
  #
1665
- # @param next_page_link [String] The NextLink from the previous successful call
1666
- # to List operation.
675
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
676
+ # availability of the given Namespace name
1667
677
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1668
678
  # will be added to the HTTP request.
1669
679
  #
1670
- # @return [EHNamespaceListResult] operation results.
680
+ # @return [CheckNameAvailabilityResult] operation results.
1671
681
  #
1672
- def list_by_resource_group_next(next_page_link, custom_headers:nil)
1673
- response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
682
+ def check_name_availability(parameters, custom_headers:nil)
683
+ response = check_name_availability_async(parameters, custom_headers:custom_headers).value!
1674
684
  response.body unless response.nil?
1675
685
  end
1676
686
 
1677
687
  #
1678
- # Lists the available Namespaces within a resource group.
688
+ # Check the give Namespace name availability.
1679
689
  #
1680
- # @param next_page_link [String] The NextLink from the previous successful call
1681
- # to List operation.
690
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
691
+ # availability of the given Namespace name
1682
692
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1683
693
  # will be added to the HTTP request.
1684
694
  #
1685
695
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1686
696
  #
1687
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1688
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
697
+ def check_name_availability_with_http_info(parameters, custom_headers:nil)
698
+ check_name_availability_async(parameters, custom_headers:custom_headers).value!
1689
699
  end
1690
700
 
1691
701
  #
1692
- # Lists the available Namespaces within a resource group.
702
+ # Check the give Namespace name availability.
1693
703
  #
1694
- # @param next_page_link [String] The NextLink from the previous successful call
1695
- # to List operation.
704
+ # @param parameters [CheckNameAvailabilityParameter] Parameters to check
705
+ # availability of the given Namespace name
1696
706
  # @param [Hash{String => String}] A hash of custom headers that will be added
1697
707
  # to the HTTP request.
1698
708
  #
1699
709
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1700
710
  #
1701
- def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1702
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
711
+ def check_name_availability_async(parameters, custom_headers:nil)
712
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
713
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
714
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1703
715
 
1704
716
 
1705
717
  request_headers = {}
@@ -1708,17 +720,25 @@ module Azure::EventHub::Mgmt::V2017_04_01
1708
720
  # Set Headers
1709
721
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1710
722
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1711
- path_template = '{nextLink}'
723
+
724
+ # Serialize Request
725
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper()
726
+ request_content = @client.serialize(request_mapper, parameters)
727
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
728
+
729
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability'
1712
730
 
1713
731
  request_url = @base_url || @client.base_url
1714
732
 
1715
733
  options = {
1716
734
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1717
- skip_encoding_path_params: {'nextLink' => next_page_link},
735
+ path_params: {'subscriptionId' => @client.subscription_id},
736
+ query_params: {'api-version' => @client.api_version},
737
+ body: request_content,
1718
738
  headers: request_headers.merge(custom_headers || {}),
1719
739
  base_url: request_url
1720
740
  }
1721
- promise = @client.make_request_async(:get, path_template, options)
741
+ promise = @client.make_request_async(:post, path_template, options)
1722
742
 
1723
743
  promise = promise.then do |result|
1724
744
  http_response = result.response
@@ -1730,11 +750,13 @@ module Azure::EventHub::Mgmt::V2017_04_01
1730
750
  end
1731
751
 
1732
752
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
753
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
754
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1733
755
  # Deserialize Response
1734
756
  if status_code == 200
1735
757
  begin
1736
758
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1737
- result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::EHNamespaceListResult.mapper()
759
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult.mapper()
1738
760
  result.body = @client.deserialize(result_mapper, parsed_response)
1739
761
  rescue Exception => e
1740
762
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1818,6 +840,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1818
840
  end
1819
841
 
1820
842
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
843
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
844
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1821
845
  # Deserialize Response
1822
846
  if status_code == 200
1823
847
  begin
@@ -1835,49 +859,6 @@ module Azure::EventHub::Mgmt::V2017_04_01
1835
859
  promise.execute
1836
860
  end
1837
861
 
1838
- #
1839
- # Lists all the available Namespaces within a subscription, irrespective of the
1840
- # resource groups.
1841
- #
1842
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1843
- # will be added to the HTTP request.
1844
- #
1845
- # @return [EHNamespaceListResult] which provide lazy access to pages of the
1846
- # response.
1847
- #
1848
- def list_as_lazy(custom_headers:nil)
1849
- response = list_async(custom_headers:custom_headers).value!
1850
- unless response.nil?
1851
- page = response.body
1852
- page.next_method = Proc.new do |next_page_link|
1853
- list_next_async(next_page_link, custom_headers:custom_headers)
1854
- end
1855
- page
1856
- end
1857
- end
1858
-
1859
- #
1860
- # Lists the available Namespaces within a resource group.
1861
- #
1862
- # @param resource_group_name [String] Name of the resource group within the
1863
- # azure subscription.
1864
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1865
- # will be added to the HTTP request.
1866
- #
1867
- # @return [EHNamespaceListResult] which provide lazy access to pages of the
1868
- # response.
1869
- #
1870
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1871
- response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1872
- unless response.nil?
1873
- page = response.body
1874
- page.next_method = Proc.new do |next_page_link|
1875
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1876
- end
1877
- page
1878
- end
1879
- end
1880
-
1881
862
  #
1882
863
  # Gets a list of authorization rules for a Namespace.
1883
864
  #