azure_mgmt_event_hub 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_event_hub.rb +15 -10
- data/lib/generated/azure_mgmt_event_hub/consumer_groups.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +711 -0
- data/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -1
- data/lib/generated/azure_mgmt_event_hub/event_hubs.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/access_keys.rb +25 -1
- data/lib/generated/azure_mgmt_event_hub/models/access_rights.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +99 -0
- data/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_event_hub/models/authorization_rule.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/capture_description.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/destination.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/ehnamespace.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/entity_status.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/eventhub.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/key_type.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/operation.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/operation_display.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb +17 -0
- data/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb +17 -0
- data/lib/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/tracked_resource.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/namespaces.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/operations.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/version.rb +2 -2
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a28d1222739c1de61a2822ea51a7204c45ee2442
|
4
|
+
data.tar.gz: 2fe48d6d2835439ac119339f4ba424f9bc19f774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a1424ee17489ca27085e16d624a9b48cd69b784da20b1d26f6e95ddbb56a7ab335bb9d311017cc9f081015f318746217914fec02411e4ae5f6f45d9736a7078
|
7
|
+
data.tar.gz: 481ecf3774f43814344d9b840950db6167519ce8e54fd290426a8c2f29d9b7cc9b01cc8f1336092f8ac8f9e8dd3b155dbc656e4c8ac8187ebaf7a9423161ed00
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -22,31 +22,34 @@ require 'ms_rest_azure'
|
|
22
22
|
module Azure::ARM::EventHub
|
23
23
|
autoload :Operations, 'generated/azure_mgmt_event_hub/operations.rb'
|
24
24
|
autoload :Namespaces, 'generated/azure_mgmt_event_hub/namespaces.rb'
|
25
|
+
autoload :DisasterRecoveryConfigs, 'generated/azure_mgmt_event_hub/disaster_recovery_configs.rb'
|
25
26
|
autoload :EventHubs, 'generated/azure_mgmt_event_hub/event_hubs.rb'
|
26
27
|
autoload :ConsumerGroups, 'generated/azure_mgmt_event_hub/consumer_groups.rb'
|
27
28
|
autoload :EventHubManagementClient, 'generated/azure_mgmt_event_hub/event_hub_management_client.rb'
|
28
29
|
|
29
30
|
module Models
|
30
31
|
autoload :CaptureDescription, 'generated/azure_mgmt_event_hub/models/capture_description.rb'
|
31
|
-
autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb'
|
32
32
|
autoload :Destination, 'generated/azure_mgmt_event_hub/models/destination.rb'
|
33
|
-
autoload :Sku, 'generated/azure_mgmt_event_hub/models/sku.rb'
|
34
|
-
autoload :OperationDisplay, 'generated/azure_mgmt_event_hub/models/operation_display.rb'
|
35
|
-
autoload :EHNamespaceListResult, 'generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb'
|
36
|
-
autoload :AuthorizationRuleListResult, 'generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb'
|
37
|
-
autoload :EventHubListResult, 'generated/azure_mgmt_event_hub/models/event_hub_list_result.rb'
|
38
|
-
autoload :ErrorResponse, 'generated/azure_mgmt_event_hub/models/error_response.rb'
|
39
33
|
autoload :Operation, 'generated/azure_mgmt_event_hub/models/operation.rb'
|
40
|
-
autoload :
|
34
|
+
autoload :ErrorResponse, 'generated/azure_mgmt_event_hub/models/error_response.rb'
|
41
35
|
autoload :OperationListResult, 'generated/azure_mgmt_event_hub/models/operation_list_result.rb'
|
42
|
-
autoload :
|
36
|
+
autoload :EventHubListResult, 'generated/azure_mgmt_event_hub/models/event_hub_list_result.rb'
|
43
37
|
autoload :AccessKeys, 'generated/azure_mgmt_event_hub/models/access_keys.rb'
|
38
|
+
autoload :ArmDisasterRecoveryListResult, 'generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb'
|
39
|
+
autoload :Sku, 'generated/azure_mgmt_event_hub/models/sku.rb'
|
40
|
+
autoload :ConsumerGroupListResult, 'generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb'
|
41
|
+
autoload :AuthorizationRuleListResult, 'generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb'
|
42
|
+
autoload :CheckNameAvailabilityParameter, 'generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb'
|
43
|
+
autoload :EHNamespaceListResult, 'generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb'
|
44
44
|
autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_event_hub/models/check_name_availability_result.rb'
|
45
|
+
autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb'
|
46
|
+
autoload :OperationDisplay, 'generated/azure_mgmt_event_hub/models/operation_display.rb'
|
45
47
|
autoload :TrackedResource, 'generated/azure_mgmt_event_hub/models/tracked_resource.rb'
|
46
48
|
autoload :EHNamespace, 'generated/azure_mgmt_event_hub/models/ehnamespace.rb'
|
47
49
|
autoload :AuthorizationRule, 'generated/azure_mgmt_event_hub/models/authorization_rule.rb'
|
48
50
|
autoload :Eventhub, 'generated/azure_mgmt_event_hub/models/eventhub.rb'
|
49
51
|
autoload :ConsumerGroup, 'generated/azure_mgmt_event_hub/models/consumer_group.rb'
|
52
|
+
autoload :ArmDisasterRecovery, 'generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb'
|
50
53
|
autoload :SkuName, 'generated/azure_mgmt_event_hub/models/sku_name.rb'
|
51
54
|
autoload :SkuTier, 'generated/azure_mgmt_event_hub/models/sku_tier.rb'
|
52
55
|
autoload :AccessRights, 'generated/azure_mgmt_event_hub/models/access_rights.rb'
|
@@ -54,5 +57,7 @@ module Azure::ARM::EventHub
|
|
54
57
|
autoload :EntityStatus, 'generated/azure_mgmt_event_hub/models/entity_status.rb'
|
55
58
|
autoload :EncodingCaptureDescription, 'generated/azure_mgmt_event_hub/models/encoding_capture_description.rb'
|
56
59
|
autoload :UnavailableReason, 'generated/azure_mgmt_event_hub/models/unavailable_reason.rb'
|
60
|
+
autoload :ProvisioningStateDR, 'generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb'
|
61
|
+
autoload :RoleDisasterRecovery, 'generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb'
|
57
62
|
end
|
58
63
|
end
|
@@ -0,0 +1,711 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::EventHub
|
7
|
+
#
|
8
|
+
# Azure Event Hubs client
|
9
|
+
#
|
10
|
+
class DisasterRecoveryConfigs
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the DisasterRecoveryConfigs class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [EventHubManagementClient] reference to the EventHubManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets all Alias(Disaster Recovery configurations)
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] Name of the resource group within the
|
28
|
+
# azure subscription.
|
29
|
+
# @param namespace_name [String] The Namespace name
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [Array<ArmDisasterRecovery>] operation results.
|
34
|
+
#
|
35
|
+
def list(resource_group_name, namespace_name, custom_headers = nil)
|
36
|
+
first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers)
|
37
|
+
first_page.get_all_items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets all Alias(Disaster Recovery configurations)
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] Name of the resource group within the
|
44
|
+
# azure subscription.
|
45
|
+
# @param namespace_name [String] The Namespace name
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
|
52
|
+
list_async(resource_group_name, namespace_name, custom_headers).value!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Gets all Alias(Disaster Recovery configurations)
|
57
|
+
#
|
58
|
+
# @param resource_group_name [String] Name of the resource group within the
|
59
|
+
# azure subscription.
|
60
|
+
# @param namespace_name [String] The Namespace name
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_async(resource_group_name, namespace_name, custom_headers = nil)
|
67
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
68
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
69
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
70
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
71
|
+
|
72
|
+
|
73
|
+
request_headers = {}
|
74
|
+
|
75
|
+
# Set Headers
|
76
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
77
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
78
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'
|
79
|
+
|
80
|
+
request_url = @base_url || @client.base_url
|
81
|
+
|
82
|
+
options = {
|
83
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
84
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
85
|
+
query_params: {'api-version' => @client.api_version},
|
86
|
+
headers: request_headers.merge(custom_headers || {}),
|
87
|
+
base_url: request_url
|
88
|
+
}
|
89
|
+
promise = @client.make_request_async(:get, path_template, options)
|
90
|
+
|
91
|
+
promise = promise.then do |result|
|
92
|
+
http_response = result.response
|
93
|
+
status_code = http_response.status
|
94
|
+
response_content = http_response.body
|
95
|
+
unless status_code == 200
|
96
|
+
error_model = JSON.load(response_content)
|
97
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
98
|
+
end
|
99
|
+
|
100
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
101
|
+
# Deserialize Response
|
102
|
+
if status_code == 200
|
103
|
+
begin
|
104
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
105
|
+
result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecoveryListResult.mapper()
|
106
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
107
|
+
rescue Exception => e
|
108
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
promise.execute
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Creates or updates a new Alias(Disaster Recovery configuration)
|
120
|
+
#
|
121
|
+
# @param resource_group_name [String] Name of the resource group within the
|
122
|
+
# azure subscription.
|
123
|
+
# @param namespace_name [String] The Namespace name
|
124
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
125
|
+
# @param parameters [ArmDisasterRecovery] Parameters required to create an
|
126
|
+
# Alias(Disaster Recovery configuration)
|
127
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
128
|
+
# will be added to the HTTP request.
|
129
|
+
#
|
130
|
+
# @return [ArmDisasterRecovery] operation results.
|
131
|
+
#
|
132
|
+
def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil)
|
133
|
+
response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value!
|
134
|
+
response.body unless response.nil?
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Creates or updates a new Alias(Disaster Recovery configuration)
|
139
|
+
#
|
140
|
+
# @param resource_group_name [String] Name of the resource group within the
|
141
|
+
# azure subscription.
|
142
|
+
# @param namespace_name [String] The Namespace name
|
143
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
144
|
+
# @param parameters [ArmDisasterRecovery] Parameters required to create an
|
145
|
+
# Alias(Disaster Recovery configuration)
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
150
|
+
#
|
151
|
+
def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil)
|
152
|
+
create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value!
|
153
|
+
end
|
154
|
+
|
155
|
+
#
|
156
|
+
# Creates or updates a new Alias(Disaster Recovery configuration)
|
157
|
+
#
|
158
|
+
# @param resource_group_name [String] Name of the resource group within the
|
159
|
+
# azure subscription.
|
160
|
+
# @param namespace_name [String] The Namespace name
|
161
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
162
|
+
# @param parameters [ArmDisasterRecovery] Parameters required to create an
|
163
|
+
# Alias(Disaster Recovery configuration)
|
164
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
165
|
+
# to the HTTP request.
|
166
|
+
#
|
167
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
168
|
+
#
|
169
|
+
def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil)
|
170
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
171
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
172
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
173
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
174
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
175
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
176
|
+
|
177
|
+
|
178
|
+
request_headers = {}
|
179
|
+
|
180
|
+
# Set Headers
|
181
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
182
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
183
|
+
|
184
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
185
|
+
|
186
|
+
# Serialize Request
|
187
|
+
request_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecovery.mapper()
|
188
|
+
request_content = @client.serialize(request_mapper, parameters)
|
189
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
190
|
+
|
191
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
|
192
|
+
|
193
|
+
request_url = @base_url || @client.base_url
|
194
|
+
|
195
|
+
options = {
|
196
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
197
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
198
|
+
query_params: {'api-version' => @client.api_version},
|
199
|
+
body: request_content,
|
200
|
+
headers: request_headers.merge(custom_headers || {}),
|
201
|
+
base_url: request_url
|
202
|
+
}
|
203
|
+
promise = @client.make_request_async(:put, path_template, options)
|
204
|
+
|
205
|
+
promise = promise.then do |result|
|
206
|
+
http_response = result.response
|
207
|
+
status_code = http_response.status
|
208
|
+
response_content = http_response.body
|
209
|
+
unless status_code == 200 || status_code == 201
|
210
|
+
error_model = JSON.load(response_content)
|
211
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
212
|
+
end
|
213
|
+
|
214
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
215
|
+
# Deserialize Response
|
216
|
+
if status_code == 200
|
217
|
+
begin
|
218
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
219
|
+
result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecovery.mapper()
|
220
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
221
|
+
rescue Exception => e
|
222
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
result
|
227
|
+
end
|
228
|
+
|
229
|
+
promise.execute
|
230
|
+
end
|
231
|
+
|
232
|
+
#
|
233
|
+
# Deletes an Alias(Disaster Recovery configuration)
|
234
|
+
#
|
235
|
+
# @param resource_group_name [String] Name of the resource group within the
|
236
|
+
# azure subscription.
|
237
|
+
# @param namespace_name [String] The Namespace name
|
238
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
239
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
240
|
+
# will be added to the HTTP request.
|
241
|
+
#
|
242
|
+
#
|
243
|
+
def delete(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
244
|
+
response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
245
|
+
nil
|
246
|
+
end
|
247
|
+
|
248
|
+
#
|
249
|
+
# Deletes an Alias(Disaster Recovery configuration)
|
250
|
+
#
|
251
|
+
# @param resource_group_name [String] Name of the resource group within the
|
252
|
+
# azure subscription.
|
253
|
+
# @param namespace_name [String] The Namespace name
|
254
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
255
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
256
|
+
# will be added to the HTTP request.
|
257
|
+
#
|
258
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
259
|
+
#
|
260
|
+
def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
261
|
+
delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
262
|
+
end
|
263
|
+
|
264
|
+
#
|
265
|
+
# Deletes an Alias(Disaster Recovery configuration)
|
266
|
+
#
|
267
|
+
# @param resource_group_name [String] Name of the resource group within the
|
268
|
+
# azure subscription.
|
269
|
+
# @param namespace_name [String] The Namespace name
|
270
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
271
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
272
|
+
# to the HTTP request.
|
273
|
+
#
|
274
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
275
|
+
#
|
276
|
+
def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
277
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
278
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
279
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
280
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
281
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
282
|
+
|
283
|
+
|
284
|
+
request_headers = {}
|
285
|
+
|
286
|
+
# Set Headers
|
287
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
288
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
289
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
|
290
|
+
|
291
|
+
request_url = @base_url || @client.base_url
|
292
|
+
|
293
|
+
options = {
|
294
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
295
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
296
|
+
query_params: {'api-version' => @client.api_version},
|
297
|
+
headers: request_headers.merge(custom_headers || {}),
|
298
|
+
base_url: request_url
|
299
|
+
}
|
300
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
301
|
+
|
302
|
+
promise = promise.then do |result|
|
303
|
+
http_response = result.response
|
304
|
+
status_code = http_response.status
|
305
|
+
response_content = http_response.body
|
306
|
+
unless status_code == 200
|
307
|
+
error_model = JSON.load(response_content)
|
308
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
309
|
+
end
|
310
|
+
|
311
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
312
|
+
|
313
|
+
result
|
314
|
+
end
|
315
|
+
|
316
|
+
promise.execute
|
317
|
+
end
|
318
|
+
|
319
|
+
#
|
320
|
+
# Retrieves Alias(Disaster Recovery configuration) for primary or secondary
|
321
|
+
# namespace
|
322
|
+
#
|
323
|
+
# @param resource_group_name [String] Name of the resource group within the
|
324
|
+
# azure subscription.
|
325
|
+
# @param namespace_name [String] The Namespace name
|
326
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
327
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
328
|
+
# will be added to the HTTP request.
|
329
|
+
#
|
330
|
+
# @return [ArmDisasterRecovery] operation results.
|
331
|
+
#
|
332
|
+
def get(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
333
|
+
response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
334
|
+
response.body unless response.nil?
|
335
|
+
end
|
336
|
+
|
337
|
+
#
|
338
|
+
# Retrieves Alias(Disaster Recovery configuration) for primary or secondary
|
339
|
+
# namespace
|
340
|
+
#
|
341
|
+
# @param resource_group_name [String] Name of the resource group within the
|
342
|
+
# azure subscription.
|
343
|
+
# @param namespace_name [String] The Namespace name
|
344
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
345
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
346
|
+
# will be added to the HTTP request.
|
347
|
+
#
|
348
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
349
|
+
#
|
350
|
+
def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
351
|
+
get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
352
|
+
end
|
353
|
+
|
354
|
+
#
|
355
|
+
# Retrieves Alias(Disaster Recovery configuration) for primary or secondary
|
356
|
+
# namespace
|
357
|
+
#
|
358
|
+
# @param resource_group_name [String] Name of the resource group within the
|
359
|
+
# azure subscription.
|
360
|
+
# @param namespace_name [String] The Namespace name
|
361
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
362
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
363
|
+
# to the HTTP request.
|
364
|
+
#
|
365
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
366
|
+
#
|
367
|
+
def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
368
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
369
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
370
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
371
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
372
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
373
|
+
|
374
|
+
|
375
|
+
request_headers = {}
|
376
|
+
|
377
|
+
# Set Headers
|
378
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
379
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
380
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'
|
381
|
+
|
382
|
+
request_url = @base_url || @client.base_url
|
383
|
+
|
384
|
+
options = {
|
385
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
386
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
387
|
+
query_params: {'api-version' => @client.api_version},
|
388
|
+
headers: request_headers.merge(custom_headers || {}),
|
389
|
+
base_url: request_url
|
390
|
+
}
|
391
|
+
promise = @client.make_request_async(:get, path_template, options)
|
392
|
+
|
393
|
+
promise = promise.then do |result|
|
394
|
+
http_response = result.response
|
395
|
+
status_code = http_response.status
|
396
|
+
response_content = http_response.body
|
397
|
+
unless status_code == 200
|
398
|
+
error_model = JSON.load(response_content)
|
399
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
400
|
+
end
|
401
|
+
|
402
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
403
|
+
# Deserialize Response
|
404
|
+
if status_code == 200
|
405
|
+
begin
|
406
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
407
|
+
result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecovery.mapper()
|
408
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
409
|
+
rescue Exception => e
|
410
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
result
|
415
|
+
end
|
416
|
+
|
417
|
+
promise.execute
|
418
|
+
end
|
419
|
+
|
420
|
+
#
|
421
|
+
# This operation disables the Disaster Recovery and stops replicating changes
|
422
|
+
# from primary to secondary namespaces
|
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 alias_parameter [String] The Disaster Recovery configuration name
|
428
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
429
|
+
# will be added to the HTTP request.
|
430
|
+
#
|
431
|
+
#
|
432
|
+
def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
433
|
+
response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
434
|
+
nil
|
435
|
+
end
|
436
|
+
|
437
|
+
#
|
438
|
+
# This operation disables the Disaster Recovery and stops replicating changes
|
439
|
+
# from primary to secondary namespaces
|
440
|
+
#
|
441
|
+
# @param resource_group_name [String] Name of the resource group within the
|
442
|
+
# azure subscription.
|
443
|
+
# @param namespace_name [String] The Namespace name
|
444
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
445
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
446
|
+
# will be added to the HTTP request.
|
447
|
+
#
|
448
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
449
|
+
#
|
450
|
+
def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
451
|
+
break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
452
|
+
end
|
453
|
+
|
454
|
+
#
|
455
|
+
# This operation disables the Disaster Recovery and stops replicating changes
|
456
|
+
# from primary to secondary namespaces
|
457
|
+
#
|
458
|
+
# @param resource_group_name [String] Name of the resource group within the
|
459
|
+
# azure subscription.
|
460
|
+
# @param namespace_name [String] The Namespace name
|
461
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
462
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
463
|
+
# to the HTTP request.
|
464
|
+
#
|
465
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
466
|
+
#
|
467
|
+
def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
468
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
469
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
470
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
471
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
472
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
473
|
+
|
474
|
+
|
475
|
+
request_headers = {}
|
476
|
+
|
477
|
+
# Set Headers
|
478
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
479
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
480
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'
|
481
|
+
|
482
|
+
request_url = @base_url || @client.base_url
|
483
|
+
|
484
|
+
options = {
|
485
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
486
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
487
|
+
query_params: {'api-version' => @client.api_version},
|
488
|
+
headers: request_headers.merge(custom_headers || {}),
|
489
|
+
base_url: request_url
|
490
|
+
}
|
491
|
+
promise = @client.make_request_async(:post, path_template, options)
|
492
|
+
|
493
|
+
promise = promise.then do |result|
|
494
|
+
http_response = result.response
|
495
|
+
status_code = http_response.status
|
496
|
+
response_content = http_response.body
|
497
|
+
unless status_code == 200
|
498
|
+
error_model = JSON.load(response_content)
|
499
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
500
|
+
end
|
501
|
+
|
502
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
503
|
+
|
504
|
+
result
|
505
|
+
end
|
506
|
+
|
507
|
+
promise.execute
|
508
|
+
end
|
509
|
+
|
510
|
+
#
|
511
|
+
# envokes GEO DR failover and reconfigure the alias to point to the secondary
|
512
|
+
# namespace
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] Name of the resource group within the
|
515
|
+
# azure subscription.
|
516
|
+
# @param namespace_name [String] The Namespace name
|
517
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
518
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
519
|
+
# will be added to the HTTP request.
|
520
|
+
#
|
521
|
+
#
|
522
|
+
def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
523
|
+
response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
524
|
+
nil
|
525
|
+
end
|
526
|
+
|
527
|
+
#
|
528
|
+
# envokes GEO DR failover and reconfigure the alias to point to the secondary
|
529
|
+
# namespace
|
530
|
+
#
|
531
|
+
# @param resource_group_name [String] Name of the resource group within the
|
532
|
+
# azure subscription.
|
533
|
+
# @param namespace_name [String] The Namespace name
|
534
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
535
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
536
|
+
# will be added to the HTTP request.
|
537
|
+
#
|
538
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
539
|
+
#
|
540
|
+
def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
541
|
+
fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
542
|
+
end
|
543
|
+
|
544
|
+
#
|
545
|
+
# envokes GEO DR failover and reconfigure the alias to point to the secondary
|
546
|
+
# namespace
|
547
|
+
#
|
548
|
+
# @param resource_group_name [String] Name of the resource group within the
|
549
|
+
# azure subscription.
|
550
|
+
# @param namespace_name [String] The Namespace name
|
551
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
552
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
553
|
+
# to the HTTP request.
|
554
|
+
#
|
555
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
556
|
+
#
|
557
|
+
def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil)
|
558
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
559
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
560
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
561
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
562
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
563
|
+
|
564
|
+
|
565
|
+
request_headers = {}
|
566
|
+
|
567
|
+
# Set Headers
|
568
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
569
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
570
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'
|
571
|
+
|
572
|
+
request_url = @base_url || @client.base_url
|
573
|
+
|
574
|
+
options = {
|
575
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
576
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
577
|
+
query_params: {'api-version' => @client.api_version},
|
578
|
+
headers: request_headers.merge(custom_headers || {}),
|
579
|
+
base_url: request_url
|
580
|
+
}
|
581
|
+
promise = @client.make_request_async(:post, path_template, options)
|
582
|
+
|
583
|
+
promise = promise.then do |result|
|
584
|
+
http_response = result.response
|
585
|
+
status_code = http_response.status
|
586
|
+
response_content = http_response.body
|
587
|
+
unless status_code == 200
|
588
|
+
error_model = JSON.load(response_content)
|
589
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
590
|
+
end
|
591
|
+
|
592
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
593
|
+
|
594
|
+
result
|
595
|
+
end
|
596
|
+
|
597
|
+
promise.execute
|
598
|
+
end
|
599
|
+
|
600
|
+
#
|
601
|
+
# Gets all Alias(Disaster Recovery configurations)
|
602
|
+
#
|
603
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
604
|
+
# to List operation.
|
605
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
606
|
+
# will be added to the HTTP request.
|
607
|
+
#
|
608
|
+
# @return [ArmDisasterRecoveryListResult] operation results.
|
609
|
+
#
|
610
|
+
def list_next(next_page_link, custom_headers = nil)
|
611
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
612
|
+
response.body unless response.nil?
|
613
|
+
end
|
614
|
+
|
615
|
+
#
|
616
|
+
# Gets all Alias(Disaster Recovery configurations)
|
617
|
+
#
|
618
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
619
|
+
# to List operation.
|
620
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
621
|
+
# will be added to the HTTP request.
|
622
|
+
#
|
623
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
624
|
+
#
|
625
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
626
|
+
list_next_async(next_page_link, custom_headers).value!
|
627
|
+
end
|
628
|
+
|
629
|
+
#
|
630
|
+
# Gets all Alias(Disaster Recovery configurations)
|
631
|
+
#
|
632
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
633
|
+
# to List operation.
|
634
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
635
|
+
# to the HTTP request.
|
636
|
+
#
|
637
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
638
|
+
#
|
639
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
640
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
641
|
+
|
642
|
+
|
643
|
+
request_headers = {}
|
644
|
+
|
645
|
+
# Set Headers
|
646
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
647
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
648
|
+
path_template = '{nextLink}'
|
649
|
+
|
650
|
+
request_url = @base_url || @client.base_url
|
651
|
+
|
652
|
+
options = {
|
653
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
654
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
655
|
+
headers: request_headers.merge(custom_headers || {}),
|
656
|
+
base_url: request_url
|
657
|
+
}
|
658
|
+
promise = @client.make_request_async(:get, path_template, options)
|
659
|
+
|
660
|
+
promise = promise.then do |result|
|
661
|
+
http_response = result.response
|
662
|
+
status_code = http_response.status
|
663
|
+
response_content = http_response.body
|
664
|
+
unless status_code == 200
|
665
|
+
error_model = JSON.load(response_content)
|
666
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
667
|
+
end
|
668
|
+
|
669
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
670
|
+
# Deserialize Response
|
671
|
+
if status_code == 200
|
672
|
+
begin
|
673
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
674
|
+
result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecoveryListResult.mapper()
|
675
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
676
|
+
rescue Exception => e
|
677
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
678
|
+
end
|
679
|
+
end
|
680
|
+
|
681
|
+
result
|
682
|
+
end
|
683
|
+
|
684
|
+
promise.execute
|
685
|
+
end
|
686
|
+
|
687
|
+
#
|
688
|
+
# Gets all Alias(Disaster Recovery configurations)
|
689
|
+
#
|
690
|
+
# @param resource_group_name [String] Name of the resource group within the
|
691
|
+
# azure subscription.
|
692
|
+
# @param namespace_name [String] The Namespace name
|
693
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
694
|
+
# will be added to the HTTP request.
|
695
|
+
#
|
696
|
+
# @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of
|
697
|
+
# the response.
|
698
|
+
#
|
699
|
+
def list_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
|
700
|
+
response = list_async(resource_group_name, namespace_name, custom_headers).value!
|
701
|
+
unless response.nil?
|
702
|
+
page = response.body
|
703
|
+
page.next_method = Proc.new do |next_page_link|
|
704
|
+
list_next_async(next_page_link, custom_headers)
|
705
|
+
end
|
706
|
+
page
|
707
|
+
end
|
708
|
+
end
|
709
|
+
|
710
|
+
end
|
711
|
+
end
|