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