azure_mgmt_datalake_store 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_datalake_store.rb +13 -11
- data/lib/generated/azure_mgmt_datalake_store/account.rb +485 -1083
- data/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb +23 -2
- data/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb +558 -0
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb +181 -33
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb +1 -13
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb +3 -3
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb +91 -0
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb +1 -13
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb +3 -3
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb +8 -8
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/error.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/error_details.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb +20 -29
- data/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb +16 -0
- data/lib/generated/azure_mgmt_datalake_store/models/inner_error.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb +7 -7
- data/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb +67 -0
- data/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb +16 -0
- data/lib/generated/azure_mgmt_datalake_store/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb +567 -0
- data/lib/generated/azure_mgmt_datalake_store/version.rb +2 -2
- metadata +11 -9
- data/lib/generated/azure_mgmt_datalake_store/models/azure_async_operation_result.rb +0 -66
- data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_properties.rb +0 -144
- data/lib/generated/azure_mgmt_datalake_store/models/encryption_identity_type.rb +0 -15
- data/lib/generated/azure_mgmt_datalake_store/models/firewall_rule_properties.rb +0 -54
- data/lib/generated/azure_mgmt_datalake_store/models/operation_status.rb +0 -17
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -36,6 +36,12 @@ module Azure::ARM::DataLakeStore
|
|
36
36
|
# is generated and included in each request. Default is true.
|
37
37
|
attr_accessor :generate_client_request_id
|
38
38
|
|
39
|
+
# @return [FirewallRules] firewall_rules
|
40
|
+
attr_reader :firewall_rules
|
41
|
+
|
42
|
+
# @return [TrustedIdProviders] trusted_id_providers
|
43
|
+
attr_reader :trusted_id_providers
|
44
|
+
|
39
45
|
# @return [Account] account
|
40
46
|
attr_reader :account
|
41
47
|
|
@@ -53,11 +59,14 @@ module Azure::ARM::DataLakeStore
|
|
53
59
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
54
60
|
@credentials = credentials
|
55
61
|
|
62
|
+
@firewall_rules = FirewallRules.new(self)
|
63
|
+
@trusted_id_providers = TrustedIdProviders.new(self)
|
56
64
|
@account = Account.new(self)
|
57
|
-
@api_version = '
|
65
|
+
@api_version = '2016-11-01'
|
58
66
|
@accept_language = 'en-US'
|
59
67
|
@long_running_operation_retry_timeout = 30
|
60
68
|
@generate_client_request_id = true
|
69
|
+
add_telemetry
|
61
70
|
end
|
62
71
|
|
63
72
|
#
|
@@ -115,5 +124,17 @@ module Azure::ARM::DataLakeStore
|
|
115
124
|
super(request_url, method, path, options)
|
116
125
|
end
|
117
126
|
|
127
|
+
|
128
|
+
private
|
129
|
+
#
|
130
|
+
# Adds telemetry information.
|
131
|
+
#
|
132
|
+
def add_telemetry
|
133
|
+
sdk_information = 'azure_mgmt_datalake_store'
|
134
|
+
if defined? Azure::ARM::DataLakeStore::VERSION
|
135
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::DataLakeStore::VERSION}"
|
136
|
+
end
|
137
|
+
add_user_agent_information(sdk_information)
|
138
|
+
end
|
118
139
|
end
|
119
140
|
end
|
@@ -0,0 +1,558 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::DataLakeStore
|
7
|
+
#
|
8
|
+
# Creates an Azure Data Lake Store account management client.
|
9
|
+
#
|
10
|
+
class FirewallRules
|
11
|
+
include Azure::ARM::DataLakeStore::Models
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the FirewallRules class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [DataLakeStoreAccountManagementClient] reference to the DataLakeStoreAccountManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Creates or updates the specified firewall rule. During update, the firewall
|
27
|
+
# rule with the specified name will be replaced with this new firewall rule.
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
30
|
+
# contains the Data Lake Store account.
|
31
|
+
# @param account_name [String] The name of the Data Lake Store account to which
|
32
|
+
# to add the firewall rule.
|
33
|
+
# @param firewall_rule_name [String] The name of the firewall rule to create or
|
34
|
+
# update.
|
35
|
+
# @param parameters [FirewallRule] Parameters supplied to create or update the
|
36
|
+
# firewall rule.
|
37
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
38
|
+
# will be added to the HTTP request.
|
39
|
+
#
|
40
|
+
# @return [FirewallRule] operation results.
|
41
|
+
#
|
42
|
+
def create_or_update(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers = nil)
|
43
|
+
response = create_or_update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value!
|
44
|
+
response.body unless response.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Creates or updates the specified firewall rule. During update, the firewall
|
49
|
+
# rule with the specified name will be replaced with this new firewall rule.
|
50
|
+
#
|
51
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
52
|
+
# contains the Data Lake Store account.
|
53
|
+
# @param account_name [String] The name of the Data Lake Store account to which
|
54
|
+
# to add the firewall rule.
|
55
|
+
# @param firewall_rule_name [String] The name of the firewall rule to create or
|
56
|
+
# update.
|
57
|
+
# @param parameters [FirewallRule] Parameters supplied to create or update the
|
58
|
+
# firewall rule.
|
59
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
60
|
+
# will be added to the HTTP request.
|
61
|
+
#
|
62
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
63
|
+
#
|
64
|
+
def create_or_update_with_http_info(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers = nil)
|
65
|
+
create_or_update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers).value!
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# Creates or updates the specified firewall rule. During update, the firewall
|
70
|
+
# rule with the specified name will be replaced with this new firewall rule.
|
71
|
+
#
|
72
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
73
|
+
# contains the Data Lake Store account.
|
74
|
+
# @param account_name [String] The name of the Data Lake Store account to which
|
75
|
+
# to add the firewall rule.
|
76
|
+
# @param firewall_rule_name [String] The name of the firewall rule to create or
|
77
|
+
# update.
|
78
|
+
# @param parameters [FirewallRule] Parameters supplied to create or update the
|
79
|
+
# firewall rule.
|
80
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
81
|
+
# to the HTTP request.
|
82
|
+
#
|
83
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
84
|
+
#
|
85
|
+
def create_or_update_async(resource_group_name, account_name, firewall_rule_name, parameters, custom_headers = nil)
|
86
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
87
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
88
|
+
fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
|
89
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
90
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
91
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
92
|
+
|
93
|
+
|
94
|
+
request_headers = {}
|
95
|
+
|
96
|
+
# Set Headers
|
97
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
98
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
99
|
+
|
100
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
101
|
+
|
102
|
+
# Serialize Request
|
103
|
+
request_mapper = FirewallRule.mapper()
|
104
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
105
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
106
|
+
|
107
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
|
108
|
+
|
109
|
+
request_url = @base_url || @client.base_url
|
110
|
+
|
111
|
+
options = {
|
112
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
113
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
|
114
|
+
query_params: {'api-version' => @client.api_version},
|
115
|
+
body: request_content,
|
116
|
+
headers: request_headers.merge(custom_headers || {}),
|
117
|
+
base_url: request_url
|
118
|
+
}
|
119
|
+
promise = @client.make_request_async(:put, path_template, options)
|
120
|
+
|
121
|
+
promise = promise.then do |result|
|
122
|
+
http_response = result.response
|
123
|
+
status_code = http_response.status
|
124
|
+
response_content = http_response.body
|
125
|
+
unless status_code == 200
|
126
|
+
error_model = JSON.load(response_content)
|
127
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
128
|
+
end
|
129
|
+
|
130
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
131
|
+
# Deserialize Response
|
132
|
+
if status_code == 200
|
133
|
+
begin
|
134
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
135
|
+
result_mapper = FirewallRule.mapper()
|
136
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
137
|
+
rescue Exception => e
|
138
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
result
|
143
|
+
end
|
144
|
+
|
145
|
+
promise.execute
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
150
|
+
# account
|
151
|
+
#
|
152
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
153
|
+
# contains the Data Lake Store account.
|
154
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
155
|
+
# which to delete the firewall rule.
|
156
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
157
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
158
|
+
# will be added to the HTTP request.
|
159
|
+
#
|
160
|
+
#
|
161
|
+
def delete(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
162
|
+
response = delete_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
163
|
+
nil
|
164
|
+
end
|
165
|
+
|
166
|
+
#
|
167
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
168
|
+
# account
|
169
|
+
#
|
170
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
171
|
+
# contains the Data Lake Store account.
|
172
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
173
|
+
# which to delete the firewall rule.
|
174
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
175
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
176
|
+
# will be added to the HTTP request.
|
177
|
+
#
|
178
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
179
|
+
#
|
180
|
+
def delete_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
181
|
+
delete_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
182
|
+
end
|
183
|
+
|
184
|
+
#
|
185
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
186
|
+
# account
|
187
|
+
#
|
188
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
189
|
+
# contains the Data Lake Store account.
|
190
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
191
|
+
# which to delete the firewall rule.
|
192
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
193
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
194
|
+
# to the HTTP request.
|
195
|
+
#
|
196
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
197
|
+
#
|
198
|
+
def delete_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
199
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
200
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
201
|
+
fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
|
202
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
203
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
204
|
+
|
205
|
+
|
206
|
+
request_headers = {}
|
207
|
+
|
208
|
+
# Set Headers
|
209
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
210
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
211
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
|
212
|
+
|
213
|
+
request_url = @base_url || @client.base_url
|
214
|
+
|
215
|
+
options = {
|
216
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
217
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
|
218
|
+
query_params: {'api-version' => @client.api_version},
|
219
|
+
headers: request_headers.merge(custom_headers || {}),
|
220
|
+
base_url: request_url
|
221
|
+
}
|
222
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
223
|
+
|
224
|
+
promise = promise.then do |result|
|
225
|
+
http_response = result.response
|
226
|
+
status_code = http_response.status
|
227
|
+
response_content = http_response.body
|
228
|
+
unless status_code == 200 || status_code == 204
|
229
|
+
error_model = JSON.load(response_content)
|
230
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
231
|
+
end
|
232
|
+
|
233
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
234
|
+
|
235
|
+
result
|
236
|
+
end
|
237
|
+
|
238
|
+
promise.execute
|
239
|
+
end
|
240
|
+
|
241
|
+
#
|
242
|
+
# Gets the specified Data Lake Store firewall rule.
|
243
|
+
#
|
244
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
245
|
+
# contains the Data Lake Store account.
|
246
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
247
|
+
# which to get the firewall rule.
|
248
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
249
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
250
|
+
# will be added to the HTTP request.
|
251
|
+
#
|
252
|
+
# @return [FirewallRule] operation results.
|
253
|
+
#
|
254
|
+
def get(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
255
|
+
response = get_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
256
|
+
response.body unless response.nil?
|
257
|
+
end
|
258
|
+
|
259
|
+
#
|
260
|
+
# Gets the specified Data Lake Store firewall rule.
|
261
|
+
#
|
262
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
263
|
+
# contains the Data Lake Store account.
|
264
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
265
|
+
# which to get the firewall rule.
|
266
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
267
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
268
|
+
# will be added to the HTTP request.
|
269
|
+
#
|
270
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
271
|
+
#
|
272
|
+
def get_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
273
|
+
get_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
274
|
+
end
|
275
|
+
|
276
|
+
#
|
277
|
+
# Gets the specified Data Lake Store firewall rule.
|
278
|
+
#
|
279
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
280
|
+
# contains the Data Lake Store account.
|
281
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
282
|
+
# which to get the firewall rule.
|
283
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
284
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
285
|
+
# to the HTTP request.
|
286
|
+
#
|
287
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
288
|
+
#
|
289
|
+
def get_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
290
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
291
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
292
|
+
fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
|
293
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
294
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
295
|
+
|
296
|
+
|
297
|
+
request_headers = {}
|
298
|
+
|
299
|
+
# Set Headers
|
300
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
301
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
302
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
|
303
|
+
|
304
|
+
request_url = @base_url || @client.base_url
|
305
|
+
|
306
|
+
options = {
|
307
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
308
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
|
309
|
+
query_params: {'api-version' => @client.api_version},
|
310
|
+
headers: request_headers.merge(custom_headers || {}),
|
311
|
+
base_url: request_url
|
312
|
+
}
|
313
|
+
promise = @client.make_request_async(:get, path_template, options)
|
314
|
+
|
315
|
+
promise = promise.then do |result|
|
316
|
+
http_response = result.response
|
317
|
+
status_code = http_response.status
|
318
|
+
response_content = http_response.body
|
319
|
+
unless status_code == 200
|
320
|
+
error_model = JSON.load(response_content)
|
321
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
322
|
+
end
|
323
|
+
|
324
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
325
|
+
# Deserialize Response
|
326
|
+
if status_code == 200
|
327
|
+
begin
|
328
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
329
|
+
result_mapper = FirewallRule.mapper()
|
330
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
331
|
+
rescue Exception => e
|
332
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
result
|
337
|
+
end
|
338
|
+
|
339
|
+
promise.execute
|
340
|
+
end
|
341
|
+
|
342
|
+
#
|
343
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
344
|
+
# account.
|
345
|
+
#
|
346
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
347
|
+
# contains the Data Lake Store account.
|
348
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
349
|
+
# which to get the firewall rules.
|
350
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
351
|
+
# will be added to the HTTP request.
|
352
|
+
#
|
353
|
+
# @return [Array<FirewallRule>] operation results.
|
354
|
+
#
|
355
|
+
def list_by_account(resource_group_name, account_name, custom_headers = nil)
|
356
|
+
first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers)
|
357
|
+
first_page.get_all_items
|
358
|
+
end
|
359
|
+
|
360
|
+
#
|
361
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
362
|
+
# account.
|
363
|
+
#
|
364
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
365
|
+
# contains the Data Lake Store account.
|
366
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
367
|
+
# which to get the firewall rules.
|
368
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
369
|
+
# will be added to the HTTP request.
|
370
|
+
#
|
371
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
372
|
+
#
|
373
|
+
def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
374
|
+
list_by_account_async(resource_group_name, account_name, custom_headers).value!
|
375
|
+
end
|
376
|
+
|
377
|
+
#
|
378
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
379
|
+
# account.
|
380
|
+
#
|
381
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
382
|
+
# contains the Data Lake Store account.
|
383
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
384
|
+
# which to get the firewall rules.
|
385
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
386
|
+
# to the HTTP request.
|
387
|
+
#
|
388
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
389
|
+
#
|
390
|
+
def list_by_account_async(resource_group_name, account_name, custom_headers = nil)
|
391
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
392
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
393
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
394
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
395
|
+
|
396
|
+
|
397
|
+
request_headers = {}
|
398
|
+
|
399
|
+
# Set Headers
|
400
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
401
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
402
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules'
|
403
|
+
|
404
|
+
request_url = @base_url || @client.base_url
|
405
|
+
|
406
|
+
options = {
|
407
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
408
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
409
|
+
query_params: {'api-version' => @client.api_version},
|
410
|
+
headers: request_headers.merge(custom_headers || {}),
|
411
|
+
base_url: request_url
|
412
|
+
}
|
413
|
+
promise = @client.make_request_async(:get, path_template, options)
|
414
|
+
|
415
|
+
promise = promise.then do |result|
|
416
|
+
http_response = result.response
|
417
|
+
status_code = http_response.status
|
418
|
+
response_content = http_response.body
|
419
|
+
unless status_code == 200
|
420
|
+
error_model = JSON.load(response_content)
|
421
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
422
|
+
end
|
423
|
+
|
424
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
425
|
+
# Deserialize Response
|
426
|
+
if status_code == 200
|
427
|
+
begin
|
428
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
429
|
+
result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
|
430
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
431
|
+
rescue Exception => e
|
432
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
result
|
437
|
+
end
|
438
|
+
|
439
|
+
promise.execute
|
440
|
+
end
|
441
|
+
|
442
|
+
#
|
443
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
444
|
+
# account.
|
445
|
+
#
|
446
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
447
|
+
# to List operation.
|
448
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
449
|
+
# will be added to the HTTP request.
|
450
|
+
#
|
451
|
+
# @return [DataLakeStoreFirewallRuleListResult] operation results.
|
452
|
+
#
|
453
|
+
def list_by_account_next(next_page_link, custom_headers = nil)
|
454
|
+
response = list_by_account_next_async(next_page_link, custom_headers).value!
|
455
|
+
response.body unless response.nil?
|
456
|
+
end
|
457
|
+
|
458
|
+
#
|
459
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
460
|
+
# account.
|
461
|
+
#
|
462
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
463
|
+
# to List operation.
|
464
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
465
|
+
# will be added to the HTTP request.
|
466
|
+
#
|
467
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
468
|
+
#
|
469
|
+
def list_by_account_next_with_http_info(next_page_link, custom_headers = nil)
|
470
|
+
list_by_account_next_async(next_page_link, custom_headers).value!
|
471
|
+
end
|
472
|
+
|
473
|
+
#
|
474
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
475
|
+
# account.
|
476
|
+
#
|
477
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
478
|
+
# to List operation.
|
479
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
480
|
+
# to the HTTP request.
|
481
|
+
#
|
482
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
483
|
+
#
|
484
|
+
def list_by_account_next_async(next_page_link, custom_headers = nil)
|
485
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
486
|
+
|
487
|
+
|
488
|
+
request_headers = {}
|
489
|
+
|
490
|
+
# Set Headers
|
491
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
492
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
493
|
+
path_template = '{nextLink}'
|
494
|
+
|
495
|
+
request_url = @base_url || @client.base_url
|
496
|
+
|
497
|
+
options = {
|
498
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
499
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
500
|
+
headers: request_headers.merge(custom_headers || {}),
|
501
|
+
base_url: request_url
|
502
|
+
}
|
503
|
+
promise = @client.make_request_async(:get, path_template, options)
|
504
|
+
|
505
|
+
promise = promise.then do |result|
|
506
|
+
http_response = result.response
|
507
|
+
status_code = http_response.status
|
508
|
+
response_content = http_response.body
|
509
|
+
unless status_code == 200
|
510
|
+
error_model = JSON.load(response_content)
|
511
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
512
|
+
end
|
513
|
+
|
514
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
515
|
+
# Deserialize Response
|
516
|
+
if status_code == 200
|
517
|
+
begin
|
518
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
519
|
+
result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
|
520
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
521
|
+
rescue Exception => e
|
522
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
523
|
+
end
|
524
|
+
end
|
525
|
+
|
526
|
+
result
|
527
|
+
end
|
528
|
+
|
529
|
+
promise.execute
|
530
|
+
end
|
531
|
+
|
532
|
+
#
|
533
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake Store
|
534
|
+
# account.
|
535
|
+
#
|
536
|
+
# @param resource_group_name [String] The name of the Azure resource group that
|
537
|
+
# contains the Data Lake Store account.
|
538
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
539
|
+
# which to get the firewall rules.
|
540
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
541
|
+
# will be added to the HTTP request.
|
542
|
+
#
|
543
|
+
# @return [DataLakeStoreFirewallRuleListResult] which provide lazy access to
|
544
|
+
# pages of the response.
|
545
|
+
#
|
546
|
+
def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil)
|
547
|
+
response = list_by_account_async(resource_group_name, account_name, custom_headers).value!
|
548
|
+
unless response.nil?
|
549
|
+
page = response.body
|
550
|
+
page.next_method = Proc.new do |next_page_link|
|
551
|
+
list_by_account_next_async(next_page_link, custom_headers)
|
552
|
+
end
|
553
|
+
page
|
554
|
+
end
|
555
|
+
end
|
556
|
+
|
557
|
+
end
|
558
|
+
end
|