azure_mgmt_datalake_store 0.4.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 +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_datalake_store.gemspec +34 -0
- data/lib/azure_mgmt_datalake_store.rb +3 -0
- data/lib/generated/azure_mgmt_datalake_store_account.rb +41 -0
- data/lib/generated/azure_mgmt_datalake_store_account/account.rb +1739 -0
- data/lib/generated/azure_mgmt_datalake_store_account/data_lake_store_account_management_client.rb +68 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/azure_async_operation_result.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_account.rb +105 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_list_result.rb +107 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_properties.rb +106 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_state.rb +16 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_status.rb +23 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/data_lake_store_firewall_rule_list_result.rb +107 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/error.rb +99 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/error_details.rb +69 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/firewall_rule.rb +86 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/firewall_rule_properties.rb +54 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/inner_error.rb +56 -0
- data/lib/generated/azure_mgmt_datalake_store_account/models/operation_status.rb +17 -0
- data/lib/generated/azure_mgmt_datalake_store_account/module_definition.rb +9 -0
- data/lib/generated/azure_mgmt_datalake_store_account/version.rb +8 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem.rb +50 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/data_lake_store_file_system_management_client.rb +67 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/file_system.rb +2149 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/acl_status.rb +82 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/acl_status_result.rb +45 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_access_control_exception.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_bad_offset_exception.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_error.rb +49 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_file_already_exists_exception.rb +65 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_file_not_found_exception.rb +65 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_illegal_argument_exception.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_ioexception.rb +65 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_remote_exception.rb +89 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_runtime_exception.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_security_exception.rb +65 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/adls_unsupported_operation_exception.rb +66 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/append_mode_type.rb +15 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/content_summary.rb +78 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/content_summary_result.rb +46 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_operation_result.rb +45 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_status_properties.rb +146 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_status_result.rb +47 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_statuses.rb +54 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_statuses_result.rb +47 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/models/file_type.rb +16 -0
- data/lib/generated/azure_mgmt_datalake_store_filesystem/module_definition.rb +9 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a98e0e62ac80c197b4b7e050b4ca66efdec1799d
|
4
|
+
data.tar.gz: 57964055fb1f26a39b2d29a225952acfa6a26c56
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fc11636ff833beee80143fa7535771afc1e4f4f0a569251115b2c92dff0a50050590c6449283c2ab2439f9512f37f65930f223f4d73ffb616b418a4949e18b50
|
7
|
+
data.tar.gz: 9c3ceeda838d269d51b12923a6f3058cf3e26030aa67711d2f3f1bc693d8c893e0f978019ca4c6152b5cc99843db4f65c0a14b6c4e316331f8a00aff1e1eb271
|
data/.rspec
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
lib = File.expand_path('../lib', __FILE__)
|
6
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
|
+
|
8
|
+
require 'generated/azure_mgmt_datalake_store_account/module_definition'
|
9
|
+
require 'generated/azure_mgmt_datalake_store_account/version'
|
10
|
+
|
11
|
+
Gem::Specification.new do |spec|
|
12
|
+
spec.name = 'azure_mgmt_datalake_store'
|
13
|
+
spec.version = Azure::ARM::DataLakeStore::Account::VERSION
|
14
|
+
spec.authors = 'Microsoft Corporation'
|
15
|
+
spec.email = 'azrubyteam@microsoft.com'
|
16
|
+
spec.description = 'Microsoft Azure Resource Provider DataLake Store Client Library for Ruby'
|
17
|
+
spec.summary = 'Official Ruby client library to consume Microsoft Azure Resource Provider DataLake Store Management services.'
|
18
|
+
spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
|
19
|
+
spec.license = 'MIT'
|
20
|
+
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
spec.bindir = 'bin'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.required_ruby_version = '>= 1.9.3'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
31
|
+
spec.add_development_dependency 'dotenv', '~> 2'
|
32
|
+
|
33
|
+
spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
|
34
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require 'generated/azure_mgmt_datalake_store_account/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ARM::DataLakeStore::Account
|
23
|
+
autoload :Account, 'generated/azure_mgmt_datalake_store_account/account.rb'
|
24
|
+
autoload :DataLakeStoreAccountManagementClient, 'generated/azure_mgmt_datalake_store_account/data_lake_store_account_management_client.rb'
|
25
|
+
|
26
|
+
module Models
|
27
|
+
autoload :FirewallRuleProperties, 'generated/azure_mgmt_datalake_store_account/models/firewall_rule_properties.rb'
|
28
|
+
autoload :FirewallRule, 'generated/azure_mgmt_datalake_store_account/models/firewall_rule.rb'
|
29
|
+
autoload :DataLakeStoreFirewallRuleListResult, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_firewall_rule_list_result.rb'
|
30
|
+
autoload :DataLakeStoreAccountProperties, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_properties.rb'
|
31
|
+
autoload :DataLakeStoreAccount, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_account.rb'
|
32
|
+
autoload :DataLakeStoreAccountListResult, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_list_result.rb'
|
33
|
+
autoload :ErrorDetails, 'generated/azure_mgmt_datalake_store_account/models/error_details.rb'
|
34
|
+
autoload :InnerError, 'generated/azure_mgmt_datalake_store_account/models/inner_error.rb'
|
35
|
+
autoload :Error, 'generated/azure_mgmt_datalake_store_account/models/error.rb'
|
36
|
+
autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_datalake_store_account/models/azure_async_operation_result.rb'
|
37
|
+
autoload :DataLakeStoreAccountStatus, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_status.rb'
|
38
|
+
autoload :DataLakeStoreAccountState, 'generated/azure_mgmt_datalake_store_account/models/data_lake_store_account_state.rb'
|
39
|
+
autoload :OperationStatus, 'generated/azure_mgmt_datalake_store_account/models/operation_status.rb'
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,1739 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::DataLakeStore::Account
|
7
|
+
#
|
8
|
+
# Creates an Azure Data Lake Store account management client.
|
9
|
+
#
|
10
|
+
class Account
|
11
|
+
include Azure::ARM::DataLakeStore::Account::Models
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the Account class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return reference to the DataLakeStoreAccountManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
27
|
+
# account
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
30
|
+
# that contains the Data Lake Store account.
|
31
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
32
|
+
# which to delete the firewall rule.
|
33
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
34
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
|
+
# will be added to the HTTP request.
|
36
|
+
#
|
37
|
+
#
|
38
|
+
def delete_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
39
|
+
response = delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
40
|
+
nil
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
45
|
+
# account
|
46
|
+
#
|
47
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
48
|
+
# that contains the Data Lake Store account.
|
49
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
50
|
+
# which to delete the firewall rule.
|
51
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def delete_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
58
|
+
delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Deletes the specified firewall rule from the specified Data Lake Store
|
63
|
+
# account
|
64
|
+
#
|
65
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
66
|
+
# that contains the Data Lake Store account.
|
67
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
68
|
+
# which to delete the firewall rule.
|
69
|
+
# @param firewall_rule_name [String] The name of the firewall rule to delete.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
76
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
77
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
78
|
+
fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
|
79
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
80
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
|
+
|
82
|
+
|
83
|
+
request_headers = {}
|
84
|
+
|
85
|
+
# Set Headers
|
86
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
87
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
88
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
|
89
|
+
options = {
|
90
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
91
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
|
92
|
+
query_params: {'api-version' => @client.api_version},
|
93
|
+
headers: request_headers.merge(custom_headers || {})
|
94
|
+
}
|
95
|
+
|
96
|
+
request_url = @base_url || @client.base_url
|
97
|
+
|
98
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
99
|
+
promise = request.run_promise do |req|
|
100
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
101
|
+
end
|
102
|
+
|
103
|
+
promise = promise.then do |http_response|
|
104
|
+
status_code = http_response.status
|
105
|
+
response_content = http_response.body
|
106
|
+
unless status_code == 200 || status_code == 204
|
107
|
+
error_model = JSON.load(response_content)
|
108
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Create Result
|
112
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
113
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
114
|
+
|
115
|
+
result
|
116
|
+
end
|
117
|
+
|
118
|
+
promise.execute
|
119
|
+
end
|
120
|
+
|
121
|
+
#
|
122
|
+
# Gets the specified Data Lake Store firewall rule.
|
123
|
+
#
|
124
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
125
|
+
# that contains the Data Lake Store account.
|
126
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
127
|
+
# which to get the firewall rule.
|
128
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
|
+
# will be added to the HTTP request.
|
131
|
+
#
|
132
|
+
# @return [FirewallRule] operation results.
|
133
|
+
#
|
134
|
+
def get_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
135
|
+
response = get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
136
|
+
response.body unless response.nil?
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Gets the specified Data Lake Store firewall rule.
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
143
|
+
# that contains the Data Lake Store account.
|
144
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
145
|
+
# which to get the firewall rule.
|
146
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
148
|
+
# will be added to the HTTP request.
|
149
|
+
#
|
150
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
151
|
+
#
|
152
|
+
def get_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
153
|
+
get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
|
154
|
+
end
|
155
|
+
|
156
|
+
#
|
157
|
+
# Gets the specified Data Lake Store firewall rule.
|
158
|
+
#
|
159
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
160
|
+
# that contains the Data Lake Store account.
|
161
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
162
|
+
# which to get the firewall rule.
|
163
|
+
# @param firewall_rule_name [String] The name of the firewall rule to retrieve.
|
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 get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
|
170
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
171
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
172
|
+
fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
|
173
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
174
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
175
|
+
|
176
|
+
|
177
|
+
request_headers = {}
|
178
|
+
|
179
|
+
# Set Headers
|
180
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
181
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
182
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
|
183
|
+
options = {
|
184
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
185
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
|
186
|
+
query_params: {'api-version' => @client.api_version},
|
187
|
+
headers: request_headers.merge(custom_headers || {})
|
188
|
+
}
|
189
|
+
|
190
|
+
request_url = @base_url || @client.base_url
|
191
|
+
|
192
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
193
|
+
promise = request.run_promise do |req|
|
194
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
195
|
+
end
|
196
|
+
|
197
|
+
promise = promise.then do |http_response|
|
198
|
+
status_code = http_response.status
|
199
|
+
response_content = http_response.body
|
200
|
+
unless status_code == 200
|
201
|
+
error_model = JSON.load(response_content)
|
202
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Create Result
|
206
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
207
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
208
|
+
# Deserialize Response
|
209
|
+
if status_code == 200
|
210
|
+
begin
|
211
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
212
|
+
result_mapper = FirewallRule.mapper()
|
213
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
214
|
+
rescue Exception => e
|
215
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
result
|
220
|
+
end
|
221
|
+
|
222
|
+
promise.execute
|
223
|
+
end
|
224
|
+
|
225
|
+
#
|
226
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
227
|
+
# Store account.
|
228
|
+
#
|
229
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
230
|
+
# that contains the Data Lake Store account.
|
231
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
232
|
+
# which to get the firewall rules.
|
233
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
234
|
+
# will be added to the HTTP request.
|
235
|
+
#
|
236
|
+
# @return [DataLakeStoreFirewallRuleListResult] which provide lazy access to
|
237
|
+
# pages of the response.
|
238
|
+
#
|
239
|
+
def list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers = nil)
|
240
|
+
response = list_firewall_rules_async(resource_group_name, account_name, custom_headers).value!
|
241
|
+
unless response.nil?
|
242
|
+
page = response.body
|
243
|
+
page.next_method = Proc.new do |next_link|
|
244
|
+
list_firewall_rules_next_async(next_link, custom_headers)
|
245
|
+
end
|
246
|
+
page
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
#
|
251
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
252
|
+
# Store account.
|
253
|
+
#
|
254
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
255
|
+
# that contains the Data Lake Store account.
|
256
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
257
|
+
# which to get the firewall rules.
|
258
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
259
|
+
# will be added to the HTTP request.
|
260
|
+
#
|
261
|
+
# @return [Array<FirewallRule>] operation results.
|
262
|
+
#
|
263
|
+
def list_firewall_rules(resource_group_name, account_name, custom_headers = nil)
|
264
|
+
first_page = list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers)
|
265
|
+
first_page.get_all_items
|
266
|
+
end
|
267
|
+
|
268
|
+
#
|
269
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
270
|
+
# Store account.
|
271
|
+
#
|
272
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
273
|
+
# that contains the Data Lake Store account.
|
274
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
275
|
+
# which to get the firewall rules.
|
276
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
277
|
+
# will be added to the HTTP request.
|
278
|
+
#
|
279
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
280
|
+
#
|
281
|
+
def list_firewall_rules_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
282
|
+
list_firewall_rules_async(resource_group_name, account_name, custom_headers).value!
|
283
|
+
end
|
284
|
+
|
285
|
+
#
|
286
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
287
|
+
# Store account.
|
288
|
+
#
|
289
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
290
|
+
# that contains the Data Lake Store account.
|
291
|
+
# @param account_name [String] The name of the Data Lake Store account from
|
292
|
+
# which to get the firewall rules.
|
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 list_firewall_rules_async(resource_group_name, account_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, '@client.api_version is nil' if @client.api_version.nil?
|
302
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
303
|
+
|
304
|
+
|
305
|
+
request_headers = {}
|
306
|
+
|
307
|
+
# Set Headers
|
308
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
309
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
310
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules'
|
311
|
+
options = {
|
312
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
313
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
314
|
+
query_params: {'api-version' => @client.api_version},
|
315
|
+
headers: request_headers.merge(custom_headers || {})
|
316
|
+
}
|
317
|
+
|
318
|
+
request_url = @base_url || @client.base_url
|
319
|
+
|
320
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
321
|
+
promise = request.run_promise do |req|
|
322
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
323
|
+
end
|
324
|
+
|
325
|
+
promise = promise.then do |http_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(request, http_response, error_model)
|
331
|
+
end
|
332
|
+
|
333
|
+
# Create Result
|
334
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
335
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
336
|
+
# Deserialize Response
|
337
|
+
if status_code == 200
|
338
|
+
begin
|
339
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
340
|
+
result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
|
341
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
342
|
+
rescue Exception => e
|
343
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
result
|
348
|
+
end
|
349
|
+
|
350
|
+
promise.execute
|
351
|
+
end
|
352
|
+
|
353
|
+
#
|
354
|
+
# Creates or updates the specified firewall rule.
|
355
|
+
#
|
356
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
357
|
+
# that contains the Data Lake Store account.
|
358
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
359
|
+
# which to add the firewall rule.
|
360
|
+
# @param name [String] The name of the firewall rule to create or update.
|
361
|
+
# @param parameters [FirewallRule] Parameters supplied to create the create
|
362
|
+
# firewall rule.
|
363
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
364
|
+
# will be added to the HTTP request.
|
365
|
+
#
|
366
|
+
# @return [FirewallRule] operation results.
|
367
|
+
#
|
368
|
+
def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers = nil)
|
369
|
+
response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers).value!
|
370
|
+
response.body unless response.nil?
|
371
|
+
end
|
372
|
+
|
373
|
+
#
|
374
|
+
# Creates or updates the specified firewall rule.
|
375
|
+
#
|
376
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
377
|
+
# that contains the Data Lake Store account.
|
378
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
379
|
+
# which to add the firewall rule.
|
380
|
+
# @param name [String] The name of the firewall rule to create or update.
|
381
|
+
# @param parameters [FirewallRule] Parameters supplied to create the create
|
382
|
+
# firewall rule.
|
383
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
384
|
+
# will be added to the HTTP request.
|
385
|
+
#
|
386
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
387
|
+
#
|
388
|
+
def create_or_update_firewall_rule_with_http_info(resource_group_name, account_name, name, parameters, custom_headers = nil)
|
389
|
+
create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers).value!
|
390
|
+
end
|
391
|
+
|
392
|
+
#
|
393
|
+
# Creates or updates the specified firewall rule.
|
394
|
+
#
|
395
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
396
|
+
# that contains the Data Lake Store account.
|
397
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
398
|
+
# which to add the firewall rule.
|
399
|
+
# @param name [String] The name of the firewall rule to create or update.
|
400
|
+
# @param parameters [FirewallRule] Parameters supplied to create the create
|
401
|
+
# firewall rule.
|
402
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
403
|
+
# to the HTTP request.
|
404
|
+
#
|
405
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
406
|
+
#
|
407
|
+
def create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers = nil)
|
408
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
409
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
410
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
411
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
412
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
413
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
414
|
+
|
415
|
+
|
416
|
+
request_headers = {}
|
417
|
+
|
418
|
+
# Set Headers
|
419
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
420
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
421
|
+
|
422
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
423
|
+
|
424
|
+
# Serialize Request
|
425
|
+
request_mapper = FirewallRule.mapper()
|
426
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
427
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
428
|
+
|
429
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{name}'
|
430
|
+
options = {
|
431
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
432
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'name' => name,'subscriptionId' => @client.subscription_id},
|
433
|
+
query_params: {'api-version' => @client.api_version},
|
434
|
+
body: request_content,
|
435
|
+
headers: request_headers.merge(custom_headers || {})
|
436
|
+
}
|
437
|
+
|
438
|
+
request_url = @base_url || @client.base_url
|
439
|
+
|
440
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
441
|
+
promise = request.run_promise do |req|
|
442
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
443
|
+
end
|
444
|
+
|
445
|
+
promise = promise.then do |http_response|
|
446
|
+
status_code = http_response.status
|
447
|
+
response_content = http_response.body
|
448
|
+
unless status_code == 200
|
449
|
+
error_model = JSON.load(response_content)
|
450
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
451
|
+
end
|
452
|
+
|
453
|
+
# Create Result
|
454
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
455
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
456
|
+
# Deserialize Response
|
457
|
+
if status_code == 200
|
458
|
+
begin
|
459
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
460
|
+
result_mapper = FirewallRule.mapper()
|
461
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
462
|
+
rescue Exception => e
|
463
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
result
|
468
|
+
end
|
469
|
+
|
470
|
+
promise.execute
|
471
|
+
end
|
472
|
+
|
473
|
+
#
|
474
|
+
# Creates the specified Data Lake Store account.
|
475
|
+
#
|
476
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
477
|
+
# that contains the Data Lake Store account.
|
478
|
+
# @param name [String] The name of the Data Lake Store account to create.
|
479
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to create the
|
480
|
+
# Data Lake Store account.
|
481
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
482
|
+
# will be added to the HTTP request.
|
483
|
+
#
|
484
|
+
# @return [DataLakeStoreAccount] operation results.
|
485
|
+
#
|
486
|
+
def create(resource_group_name, name, parameters, custom_headers = nil)
|
487
|
+
response = create_async(resource_group_name, name, parameters, custom_headers).value!
|
488
|
+
response.body unless response.nil?
|
489
|
+
end
|
490
|
+
|
491
|
+
#
|
492
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
493
|
+
# that contains the Data Lake Store account.
|
494
|
+
# @param name [String] The name of the Data Lake Store account to create.
|
495
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to create the
|
496
|
+
# Data Lake Store account.
|
497
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
498
|
+
# will be added to the HTTP request.
|
499
|
+
#
|
500
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
501
|
+
# response.
|
502
|
+
#
|
503
|
+
def create_async(resource_group_name, name, parameters, custom_headers = nil)
|
504
|
+
# Send request
|
505
|
+
promise = begin_create_async(resource_group_name, name, parameters, custom_headers)
|
506
|
+
|
507
|
+
promise = promise.then do |response|
|
508
|
+
# Defining deserialization method.
|
509
|
+
deserialize_method = lambda do |parsed_response|
|
510
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
511
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
512
|
+
end
|
513
|
+
|
514
|
+
# Waiting for response.
|
515
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
516
|
+
end
|
517
|
+
|
518
|
+
promise
|
519
|
+
end
|
520
|
+
|
521
|
+
#
|
522
|
+
# Creates the specified Data Lake Store account.
|
523
|
+
#
|
524
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
525
|
+
# that contains the Data Lake Store account.
|
526
|
+
# @param name [String] The name of the Data Lake Store account to create.
|
527
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to create the
|
528
|
+
# Data Lake Store account.
|
529
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
530
|
+
# will be added to the HTTP request.
|
531
|
+
#
|
532
|
+
# @return [DataLakeStoreAccount] operation results.
|
533
|
+
#
|
534
|
+
def begin_create(resource_group_name, name, parameters, custom_headers = nil)
|
535
|
+
response = begin_create_async(resource_group_name, name, parameters, custom_headers).value!
|
536
|
+
response.body unless response.nil?
|
537
|
+
end
|
538
|
+
|
539
|
+
#
|
540
|
+
# Creates the specified Data Lake Store account.
|
541
|
+
#
|
542
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
543
|
+
# that contains the Data Lake Store account.
|
544
|
+
# @param name [String] The name of the Data Lake Store account to create.
|
545
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to create the
|
546
|
+
# Data Lake Store account.
|
547
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
548
|
+
# will be added to the HTTP request.
|
549
|
+
#
|
550
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
551
|
+
#
|
552
|
+
def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
|
553
|
+
begin_create_async(resource_group_name, name, parameters, custom_headers).value!
|
554
|
+
end
|
555
|
+
|
556
|
+
#
|
557
|
+
# Creates the specified Data Lake Store account.
|
558
|
+
#
|
559
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
560
|
+
# that contains the Data Lake Store account.
|
561
|
+
# @param name [String] The name of the Data Lake Store account to create.
|
562
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to create the
|
563
|
+
# Data Lake Store account.
|
564
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
565
|
+
# to the HTTP request.
|
566
|
+
#
|
567
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
568
|
+
#
|
569
|
+
def begin_create_async(resource_group_name, name, parameters, custom_headers = nil)
|
570
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
571
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
572
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
573
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
574
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
575
|
+
|
576
|
+
|
577
|
+
request_headers = {}
|
578
|
+
|
579
|
+
# Set Headers
|
580
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
581
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
582
|
+
|
583
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
584
|
+
|
585
|
+
# Serialize Request
|
586
|
+
request_mapper = DataLakeStoreAccount.mapper()
|
587
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
588
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
589
|
+
|
590
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
|
591
|
+
options = {
|
592
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
593
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
|
594
|
+
query_params: {'api-version' => @client.api_version},
|
595
|
+
body: request_content,
|
596
|
+
headers: request_headers.merge(custom_headers || {})
|
597
|
+
}
|
598
|
+
|
599
|
+
request_url = @base_url || @client.base_url
|
600
|
+
|
601
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
602
|
+
promise = request.run_promise do |req|
|
603
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
604
|
+
end
|
605
|
+
|
606
|
+
promise = promise.then do |http_response|
|
607
|
+
status_code = http_response.status
|
608
|
+
response_content = http_response.body
|
609
|
+
unless status_code == 201 || status_code == 200
|
610
|
+
error_model = JSON.load(response_content)
|
611
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
612
|
+
end
|
613
|
+
|
614
|
+
# Create Result
|
615
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
616
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
617
|
+
# Deserialize Response
|
618
|
+
if status_code == 201
|
619
|
+
begin
|
620
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
621
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
622
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
623
|
+
rescue Exception => e
|
624
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
625
|
+
end
|
626
|
+
end
|
627
|
+
# Deserialize Response
|
628
|
+
if status_code == 200
|
629
|
+
begin
|
630
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
631
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
632
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
633
|
+
rescue Exception => e
|
634
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
result
|
639
|
+
end
|
640
|
+
|
641
|
+
promise.execute
|
642
|
+
end
|
643
|
+
|
644
|
+
#
|
645
|
+
# Updates the specified Data Lake Store account information.
|
646
|
+
#
|
647
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
648
|
+
# that contains the Data Lake Store account.
|
649
|
+
# @param name [String] The name of the Data Lake Store account to update.
|
650
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to update the
|
651
|
+
# Data Lake Store account.
|
652
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
653
|
+
# will be added to the HTTP request.
|
654
|
+
#
|
655
|
+
# @return [DataLakeStoreAccount] operation results.
|
656
|
+
#
|
657
|
+
def update(resource_group_name, name, parameters, custom_headers = nil)
|
658
|
+
response = update_async(resource_group_name, name, parameters, custom_headers).value!
|
659
|
+
response.body unless response.nil?
|
660
|
+
end
|
661
|
+
|
662
|
+
#
|
663
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
664
|
+
# that contains the Data Lake Store account.
|
665
|
+
# @param name [String] The name of the Data Lake Store account to update.
|
666
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to update the
|
667
|
+
# Data Lake Store account.
|
668
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
669
|
+
# will be added to the HTTP request.
|
670
|
+
#
|
671
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
672
|
+
# response.
|
673
|
+
#
|
674
|
+
def update_async(resource_group_name, name, parameters, custom_headers = nil)
|
675
|
+
# Send request
|
676
|
+
promise = begin_update_async(resource_group_name, name, parameters, custom_headers)
|
677
|
+
|
678
|
+
promise = promise.then do |response|
|
679
|
+
# Defining deserialization method.
|
680
|
+
deserialize_method = lambda do |parsed_response|
|
681
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
682
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
683
|
+
end
|
684
|
+
|
685
|
+
# Waiting for response.
|
686
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
687
|
+
end
|
688
|
+
|
689
|
+
promise
|
690
|
+
end
|
691
|
+
|
692
|
+
#
|
693
|
+
# Updates the specified Data Lake Store account information.
|
694
|
+
#
|
695
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
696
|
+
# that contains the Data Lake Store account.
|
697
|
+
# @param name [String] The name of the Data Lake Store account to update.
|
698
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to update the
|
699
|
+
# Data Lake Store account.
|
700
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
701
|
+
# will be added to the HTTP request.
|
702
|
+
#
|
703
|
+
# @return [DataLakeStoreAccount] operation results.
|
704
|
+
#
|
705
|
+
def begin_update(resource_group_name, name, parameters, custom_headers = nil)
|
706
|
+
response = begin_update_async(resource_group_name, name, parameters, custom_headers).value!
|
707
|
+
response.body unless response.nil?
|
708
|
+
end
|
709
|
+
|
710
|
+
#
|
711
|
+
# Updates the specified Data Lake Store account information.
|
712
|
+
#
|
713
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
714
|
+
# that contains the Data Lake Store account.
|
715
|
+
# @param name [String] The name of the Data Lake Store account to update.
|
716
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to update the
|
717
|
+
# Data Lake Store account.
|
718
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
719
|
+
# will be added to the HTTP request.
|
720
|
+
#
|
721
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
722
|
+
#
|
723
|
+
def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
|
724
|
+
begin_update_async(resource_group_name, name, parameters, custom_headers).value!
|
725
|
+
end
|
726
|
+
|
727
|
+
#
|
728
|
+
# Updates the specified Data Lake Store account information.
|
729
|
+
#
|
730
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
731
|
+
# that contains the Data Lake Store account.
|
732
|
+
# @param name [String] The name of the Data Lake Store account to update.
|
733
|
+
# @param parameters [DataLakeStoreAccount] Parameters supplied to update the
|
734
|
+
# Data Lake Store account.
|
735
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
736
|
+
# to the HTTP request.
|
737
|
+
#
|
738
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
739
|
+
#
|
740
|
+
def begin_update_async(resource_group_name, name, parameters, custom_headers = nil)
|
741
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
742
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
743
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
744
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
745
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
746
|
+
|
747
|
+
|
748
|
+
request_headers = {}
|
749
|
+
|
750
|
+
# Set Headers
|
751
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
752
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
753
|
+
|
754
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
755
|
+
|
756
|
+
# Serialize Request
|
757
|
+
request_mapper = DataLakeStoreAccount.mapper()
|
758
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
759
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
760
|
+
|
761
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
|
762
|
+
options = {
|
763
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
764
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
|
765
|
+
query_params: {'api-version' => @client.api_version},
|
766
|
+
body: request_content,
|
767
|
+
headers: request_headers.merge(custom_headers || {})
|
768
|
+
}
|
769
|
+
|
770
|
+
request_url = @base_url || @client.base_url
|
771
|
+
|
772
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
773
|
+
promise = request.run_promise do |req|
|
774
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
775
|
+
end
|
776
|
+
|
777
|
+
promise = promise.then do |http_response|
|
778
|
+
status_code = http_response.status
|
779
|
+
response_content = http_response.body
|
780
|
+
unless status_code == 200 || status_code == 201
|
781
|
+
error_model = JSON.load(response_content)
|
782
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
783
|
+
end
|
784
|
+
|
785
|
+
# Create Result
|
786
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
787
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
788
|
+
# Deserialize Response
|
789
|
+
if status_code == 200
|
790
|
+
begin
|
791
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
792
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
793
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
794
|
+
rescue Exception => e
|
795
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
796
|
+
end
|
797
|
+
end
|
798
|
+
# Deserialize Response
|
799
|
+
if status_code == 201
|
800
|
+
begin
|
801
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
802
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
803
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
804
|
+
rescue Exception => e
|
805
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
result
|
810
|
+
end
|
811
|
+
|
812
|
+
promise.execute
|
813
|
+
end
|
814
|
+
|
815
|
+
#
|
816
|
+
# Deletes the specified Data Lake Store account.
|
817
|
+
#
|
818
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
819
|
+
# that contains the Data Lake Store account.
|
820
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
821
|
+
# delete.
|
822
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
823
|
+
# will be added to the HTTP request.
|
824
|
+
#
|
825
|
+
def delete(resource_group_name, account_name, custom_headers = nil)
|
826
|
+
response = delete_async(resource_group_name, account_name, custom_headers).value!
|
827
|
+
nil
|
828
|
+
end
|
829
|
+
|
830
|
+
#
|
831
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
832
|
+
# that contains the Data Lake Store account.
|
833
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
834
|
+
# delete.
|
835
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
836
|
+
# will be added to the HTTP request.
|
837
|
+
#
|
838
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
839
|
+
# response.
|
840
|
+
#
|
841
|
+
def delete_async(resource_group_name, account_name, custom_headers = nil)
|
842
|
+
# Send request
|
843
|
+
promise = begin_delete_async(resource_group_name, account_name, custom_headers)
|
844
|
+
|
845
|
+
promise = promise.then do |response|
|
846
|
+
# Defining deserialization method.
|
847
|
+
deserialize_method = lambda do |parsed_response|
|
848
|
+
end
|
849
|
+
|
850
|
+
# Waiting for response.
|
851
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
852
|
+
end
|
853
|
+
|
854
|
+
promise
|
855
|
+
end
|
856
|
+
|
857
|
+
#
|
858
|
+
# Deletes the specified Data Lake Store account.
|
859
|
+
#
|
860
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
861
|
+
# that contains the Data Lake Store account.
|
862
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
863
|
+
# delete.
|
864
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
865
|
+
# will be added to the HTTP request.
|
866
|
+
#
|
867
|
+
#
|
868
|
+
def begin_delete(resource_group_name, account_name, custom_headers = nil)
|
869
|
+
response = begin_delete_async(resource_group_name, account_name, custom_headers).value!
|
870
|
+
nil
|
871
|
+
end
|
872
|
+
|
873
|
+
#
|
874
|
+
# Deletes the specified Data Lake Store account.
|
875
|
+
#
|
876
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
877
|
+
# that contains the Data Lake Store account.
|
878
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
879
|
+
# delete.
|
880
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
881
|
+
# will be added to the HTTP request.
|
882
|
+
#
|
883
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
884
|
+
#
|
885
|
+
def begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
886
|
+
begin_delete_async(resource_group_name, account_name, custom_headers).value!
|
887
|
+
end
|
888
|
+
|
889
|
+
#
|
890
|
+
# Deletes the specified Data Lake Store account.
|
891
|
+
#
|
892
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
893
|
+
# that contains the Data Lake Store account.
|
894
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
895
|
+
# delete.
|
896
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
897
|
+
# to the HTTP request.
|
898
|
+
#
|
899
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
900
|
+
#
|
901
|
+
def begin_delete_async(resource_group_name, account_name, custom_headers = nil)
|
902
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
903
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
904
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
905
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
906
|
+
|
907
|
+
|
908
|
+
request_headers = {}
|
909
|
+
|
910
|
+
# Set Headers
|
911
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
912
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
913
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'
|
914
|
+
options = {
|
915
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
916
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
917
|
+
query_params: {'api-version' => @client.api_version},
|
918
|
+
headers: request_headers.merge(custom_headers || {})
|
919
|
+
}
|
920
|
+
|
921
|
+
request_url = @base_url || @client.base_url
|
922
|
+
|
923
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
924
|
+
promise = request.run_promise do |req|
|
925
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
926
|
+
end
|
927
|
+
|
928
|
+
promise = promise.then do |http_response|
|
929
|
+
status_code = http_response.status
|
930
|
+
response_content = http_response.body
|
931
|
+
unless status_code == 200 || status_code == 404 || status_code == 204 || status_code == 202
|
932
|
+
error_model = JSON.load(response_content)
|
933
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
934
|
+
end
|
935
|
+
|
936
|
+
# Create Result
|
937
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
938
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
939
|
+
|
940
|
+
result
|
941
|
+
end
|
942
|
+
|
943
|
+
promise.execute
|
944
|
+
end
|
945
|
+
|
946
|
+
#
|
947
|
+
# Gets the specified Data Lake Store account.
|
948
|
+
#
|
949
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
950
|
+
# that contains the Data Lake Store account.
|
951
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
952
|
+
# retrieve.
|
953
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
954
|
+
# will be added to the HTTP request.
|
955
|
+
#
|
956
|
+
# @return [DataLakeStoreAccount] operation results.
|
957
|
+
#
|
958
|
+
def get(resource_group_name, account_name, custom_headers = nil)
|
959
|
+
response = get_async(resource_group_name, account_name, custom_headers).value!
|
960
|
+
response.body unless response.nil?
|
961
|
+
end
|
962
|
+
|
963
|
+
#
|
964
|
+
# Gets the specified Data Lake Store account.
|
965
|
+
#
|
966
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
967
|
+
# that contains the Data Lake Store account.
|
968
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
969
|
+
# retrieve.
|
970
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
971
|
+
# will be added to the HTTP request.
|
972
|
+
#
|
973
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
974
|
+
#
|
975
|
+
def get_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
976
|
+
get_async(resource_group_name, account_name, custom_headers).value!
|
977
|
+
end
|
978
|
+
|
979
|
+
#
|
980
|
+
# Gets the specified Data Lake Store account.
|
981
|
+
#
|
982
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
983
|
+
# that contains the Data Lake Store account.
|
984
|
+
# @param account_name [String] The name of the Data Lake Store account to
|
985
|
+
# retrieve.
|
986
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
987
|
+
# to the HTTP request.
|
988
|
+
#
|
989
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
990
|
+
#
|
991
|
+
def get_async(resource_group_name, account_name, custom_headers = nil)
|
992
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
993
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
994
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
995
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
996
|
+
|
997
|
+
|
998
|
+
request_headers = {}
|
999
|
+
|
1000
|
+
# Set Headers
|
1001
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1002
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1003
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'
|
1004
|
+
options = {
|
1005
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1006
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
1007
|
+
query_params: {'api-version' => @client.api_version},
|
1008
|
+
headers: request_headers.merge(custom_headers || {})
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
request_url = @base_url || @client.base_url
|
1012
|
+
|
1013
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1014
|
+
promise = request.run_promise do |req|
|
1015
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
promise = promise.then do |http_response|
|
1019
|
+
status_code = http_response.status
|
1020
|
+
response_content = http_response.body
|
1021
|
+
unless status_code == 200
|
1022
|
+
error_model = JSON.load(response_content)
|
1023
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# Create Result
|
1027
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1028
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1029
|
+
# Deserialize Response
|
1030
|
+
if status_code == 200
|
1031
|
+
begin
|
1032
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1033
|
+
result_mapper = DataLakeStoreAccount.mapper()
|
1034
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1035
|
+
rescue Exception => e
|
1036
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1037
|
+
end
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
result
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
promise.execute
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
#
|
1047
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1048
|
+
# response includes a link to the next page of results, if any.
|
1049
|
+
#
|
1050
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
1051
|
+
# that contains the Data Lake Store account(s).
|
1052
|
+
# @param filter [String] OData filter. Optional.
|
1053
|
+
# @param top [Integer] The number of items to return. Optional.
|
1054
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1055
|
+
# elements. Optional.
|
1056
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1057
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1058
|
+
# Product data in line with each Category entry. Optional.
|
1059
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1060
|
+
# entry to just those requested, e.g.
|
1061
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1062
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1063
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1064
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1065
|
+
# desc. Optional.
|
1066
|
+
# @param count [Boolean] A Boolean value of true or false to request a count
|
1067
|
+
# of the matching resources included with the resources in the response, e.g.
|
1068
|
+
# Categories?$count=true. Optional.
|
1069
|
+
# @param search [String] A free form search. A free-text search expression to
|
1070
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1071
|
+
# Categories?$search=blue OR green. Optional.
|
1072
|
+
# @param format [String] The desired return format. Return the response in
|
1073
|
+
# particular formatxii without access to request headers for standard
|
1074
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1075
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1076
|
+
# will be added to the HTTP request.
|
1077
|
+
#
|
1078
|
+
# @return [DataLakeStoreAccountListResult] which provide lazy access to pages
|
1079
|
+
# of the response.
|
1080
|
+
#
|
1081
|
+
def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1082
|
+
response = list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
|
1083
|
+
unless response.nil?
|
1084
|
+
page = response.body
|
1085
|
+
page.next_method = Proc.new do |next_link|
|
1086
|
+
list_by_resource_group_next_async(next_link, custom_headers)
|
1087
|
+
end
|
1088
|
+
page
|
1089
|
+
end
|
1090
|
+
end
|
1091
|
+
|
1092
|
+
#
|
1093
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1094
|
+
# response includes a link to the next page of results, if any.
|
1095
|
+
#
|
1096
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
1097
|
+
# that contains the Data Lake Store account(s).
|
1098
|
+
# @param filter [String] OData filter. Optional.
|
1099
|
+
# @param top [Integer] The number of items to return. Optional.
|
1100
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1101
|
+
# elements. Optional.
|
1102
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1103
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1104
|
+
# Product data in line with each Category entry. Optional.
|
1105
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1106
|
+
# entry to just those requested, e.g.
|
1107
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1108
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1109
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1110
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1111
|
+
# desc. Optional.
|
1112
|
+
# @param count [Boolean] A Boolean value of true or false to request a count
|
1113
|
+
# of the matching resources included with the resources in the response, e.g.
|
1114
|
+
# Categories?$count=true. Optional.
|
1115
|
+
# @param search [String] A free form search. A free-text search expression to
|
1116
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1117
|
+
# Categories?$search=blue OR green. Optional.
|
1118
|
+
# @param format [String] The desired return format. Return the response in
|
1119
|
+
# particular formatxii without access to request headers for standard
|
1120
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1121
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1122
|
+
# will be added to the HTTP request.
|
1123
|
+
#
|
1124
|
+
# @return [Array<DataLakeStoreAccount>] operation results.
|
1125
|
+
#
|
1126
|
+
def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1127
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
|
1128
|
+
first_page.get_all_items
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
#
|
1132
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1133
|
+
# response includes a link to the next page of results, if any.
|
1134
|
+
#
|
1135
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
1136
|
+
# that contains the Data Lake Store account(s).
|
1137
|
+
# @param filter [String] OData filter. Optional.
|
1138
|
+
# @param top [Integer] The number of items to return. Optional.
|
1139
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1140
|
+
# elements. Optional.
|
1141
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1142
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1143
|
+
# Product data in line with each Category entry. Optional.
|
1144
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1145
|
+
# entry to just those requested, e.g.
|
1146
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1147
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1148
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1149
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1150
|
+
# desc. Optional.
|
1151
|
+
# @param count [Boolean] A Boolean value of true or false to request a count
|
1152
|
+
# of the matching resources included with the resources in the response, e.g.
|
1153
|
+
# Categories?$count=true. Optional.
|
1154
|
+
# @param search [String] A free form search. A free-text search expression to
|
1155
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1156
|
+
# Categories?$search=blue OR green. Optional.
|
1157
|
+
# @param format [String] The desired return format. Return the response in
|
1158
|
+
# particular formatxii without access to request headers for standard
|
1159
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1160
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1161
|
+
# will be added to the HTTP request.
|
1162
|
+
#
|
1163
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1164
|
+
#
|
1165
|
+
def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1166
|
+
list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
#
|
1170
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1171
|
+
# response includes a link to the next page of results, if any.
|
1172
|
+
#
|
1173
|
+
# @param resource_group_name [String] The name of the Azure resource group
|
1174
|
+
# that contains the Data Lake Store account(s).
|
1175
|
+
# @param filter [String] OData filter. Optional.
|
1176
|
+
# @param top [Integer] The number of items to return. Optional.
|
1177
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1178
|
+
# elements. Optional.
|
1179
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1180
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1181
|
+
# Product data in line with each Category entry. Optional.
|
1182
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1183
|
+
# entry to just those requested, e.g.
|
1184
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1185
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1186
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1187
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1188
|
+
# desc. Optional.
|
1189
|
+
# @param count [Boolean] A Boolean value of true or false to request a count
|
1190
|
+
# of the matching resources included with the resources in the response, e.g.
|
1191
|
+
# Categories?$count=true. Optional.
|
1192
|
+
# @param search [String] A free form search. A free-text search expression to
|
1193
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1194
|
+
# Categories?$search=blue OR green. Optional.
|
1195
|
+
# @param format [String] The desired return format. Return the response in
|
1196
|
+
# particular formatxii without access to request headers for standard
|
1197
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1198
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1199
|
+
# to the HTTP request.
|
1200
|
+
#
|
1201
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1202
|
+
#
|
1203
|
+
def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1204
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1205
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1206
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1207
|
+
|
1208
|
+
|
1209
|
+
request_headers = {}
|
1210
|
+
|
1211
|
+
# Set Headers
|
1212
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1213
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1214
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts'
|
1215
|
+
options = {
|
1216
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1217
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
1218
|
+
query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
|
1219
|
+
headers: request_headers.merge(custom_headers || {})
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
request_url = @base_url || @client.base_url
|
1223
|
+
|
1224
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1225
|
+
promise = request.run_promise do |req|
|
1226
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
promise = promise.then do |http_response|
|
1230
|
+
status_code = http_response.status
|
1231
|
+
response_content = http_response.body
|
1232
|
+
unless status_code == 200
|
1233
|
+
error_model = JSON.load(response_content)
|
1234
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
# Create Result
|
1238
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1239
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1240
|
+
# Deserialize Response
|
1241
|
+
if status_code == 200
|
1242
|
+
begin
|
1243
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1244
|
+
result_mapper = DataLakeStoreAccountListResult.mapper()
|
1245
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1246
|
+
rescue Exception => e
|
1247
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1248
|
+
end
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
result
|
1252
|
+
end
|
1253
|
+
|
1254
|
+
promise.execute
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
#
|
1258
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1259
|
+
# includes a link to the next page of results, if any.
|
1260
|
+
#
|
1261
|
+
# @param filter [String] OData filter. Optional.
|
1262
|
+
# @param top [Integer] The number of items to return. Optional.
|
1263
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1264
|
+
# elements. Optional.
|
1265
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1266
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1267
|
+
# Product data in line with each Category entry. Optional.
|
1268
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1269
|
+
# entry to just those requested, e.g.
|
1270
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1271
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1272
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1273
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1274
|
+
# desc. Optional.
|
1275
|
+
# @param count [Boolean] The Boolean value of true or false to request a count
|
1276
|
+
# of the matching resources included with the resources in the response, e.g.
|
1277
|
+
# Categories?$count=true. Optional.
|
1278
|
+
# @param search [String] A free form search. A free-text search expression to
|
1279
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1280
|
+
# Categories?$search=blue OR green. Optional.
|
1281
|
+
# @param format [String] The desired return format. Return the response in
|
1282
|
+
# particular formatxii without access to request headers for standard
|
1283
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1284
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1285
|
+
# will be added to the HTTP request.
|
1286
|
+
#
|
1287
|
+
# @return [DataLakeStoreAccountListResult] which provide lazy access to pages
|
1288
|
+
# of the response.
|
1289
|
+
#
|
1290
|
+
def list_as_lazy(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1291
|
+
response = list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
|
1292
|
+
unless response.nil?
|
1293
|
+
page = response.body
|
1294
|
+
page.next_method = Proc.new do |next_link|
|
1295
|
+
list_next_async(next_link, custom_headers)
|
1296
|
+
end
|
1297
|
+
page
|
1298
|
+
end
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
#
|
1302
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1303
|
+
# includes a link to the next page of results, if any.
|
1304
|
+
#
|
1305
|
+
# @param filter [String] OData filter. Optional.
|
1306
|
+
# @param top [Integer] The number of items to return. Optional.
|
1307
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1308
|
+
# elements. Optional.
|
1309
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1310
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1311
|
+
# Product data in line with each Category entry. Optional.
|
1312
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1313
|
+
# entry to just those requested, e.g.
|
1314
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1315
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1316
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1317
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1318
|
+
# desc. Optional.
|
1319
|
+
# @param count [Boolean] The Boolean value of true or false to request a count
|
1320
|
+
# of the matching resources included with the resources in the response, e.g.
|
1321
|
+
# Categories?$count=true. Optional.
|
1322
|
+
# @param search [String] A free form search. A free-text search expression to
|
1323
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1324
|
+
# Categories?$search=blue OR green. Optional.
|
1325
|
+
# @param format [String] The desired return format. Return the response in
|
1326
|
+
# particular formatxii without access to request headers for standard
|
1327
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1328
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1329
|
+
# will be added to the HTTP request.
|
1330
|
+
#
|
1331
|
+
# @return [Array<DataLakeStoreAccount>] operation results.
|
1332
|
+
#
|
1333
|
+
def list(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1334
|
+
first_page = list_as_lazy(filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
|
1335
|
+
first_page.get_all_items
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
#
|
1339
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1340
|
+
# includes a link to the next page of results, if any.
|
1341
|
+
#
|
1342
|
+
# @param filter [String] OData filter. Optional.
|
1343
|
+
# @param top [Integer] The number of items to return. Optional.
|
1344
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1345
|
+
# elements. Optional.
|
1346
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1347
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1348
|
+
# Product data in line with each Category entry. Optional.
|
1349
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1350
|
+
# entry to just those requested, e.g.
|
1351
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1352
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1353
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1354
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1355
|
+
# desc. Optional.
|
1356
|
+
# @param count [Boolean] The Boolean value of true or false to request a count
|
1357
|
+
# of the matching resources included with the resources in the response, e.g.
|
1358
|
+
# Categories?$count=true. Optional.
|
1359
|
+
# @param search [String] A free form search. A free-text search expression to
|
1360
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1361
|
+
# Categories?$search=blue OR green. Optional.
|
1362
|
+
# @param format [String] The desired return format. Return the response in
|
1363
|
+
# particular formatxii without access to request headers for standard
|
1364
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1365
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1366
|
+
# will be added to the HTTP request.
|
1367
|
+
#
|
1368
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1369
|
+
#
|
1370
|
+
def list_with_http_info(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1371
|
+
list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
#
|
1375
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1376
|
+
# includes a link to the next page of results, if any.
|
1377
|
+
#
|
1378
|
+
# @param filter [String] OData filter. Optional.
|
1379
|
+
# @param top [Integer] The number of items to return. Optional.
|
1380
|
+
# @param skip [Integer] The number of items to skip over before returning
|
1381
|
+
# elements. Optional.
|
1382
|
+
# @param expand [String] OData expansion. Expand related resources in line
|
1383
|
+
# with the retrieved resources, e.g. Categories/$expand=Products would expand
|
1384
|
+
# Product data in line with each Category entry. Optional.
|
1385
|
+
# @param select [String] OData Select statement. Limits the properties on each
|
1386
|
+
# entry to just those requested, e.g.
|
1387
|
+
# Categories?$select=CategoryName,Description. Optional.
|
1388
|
+
# @param orderby [String] OrderBy clause. One or more comma-separated
|
1389
|
+
# expressions with an optional "asc" (the default) or "desc" depending on the
|
1390
|
+
# order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
|
1391
|
+
# desc. Optional.
|
1392
|
+
# @param count [Boolean] The Boolean value of true or false to request a count
|
1393
|
+
# of the matching resources included with the resources in the response, e.g.
|
1394
|
+
# Categories?$count=true. Optional.
|
1395
|
+
# @param search [String] A free form search. A free-text search expression to
|
1396
|
+
# match for whether a particular entry should be included in the feed, e.g.
|
1397
|
+
# Categories?$search=blue OR green. Optional.
|
1398
|
+
# @param format [String] The desired return format. Return the response in
|
1399
|
+
# particular formatxii without access to request headers for standard
|
1400
|
+
# content-type negotiation (e.g Orders?$format=json). Optional.
|
1401
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1402
|
+
# to the HTTP request.
|
1403
|
+
#
|
1404
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1405
|
+
#
|
1406
|
+
def list_async(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
|
1407
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1408
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1409
|
+
|
1410
|
+
|
1411
|
+
request_headers = {}
|
1412
|
+
|
1413
|
+
# Set Headers
|
1414
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1415
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1416
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts'
|
1417
|
+
options = {
|
1418
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1419
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
1420
|
+
query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
|
1421
|
+
headers: request_headers.merge(custom_headers || {})
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
request_url = @base_url || @client.base_url
|
1425
|
+
|
1426
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1427
|
+
promise = request.run_promise do |req|
|
1428
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1429
|
+
end
|
1430
|
+
|
1431
|
+
promise = promise.then do |http_response|
|
1432
|
+
status_code = http_response.status
|
1433
|
+
response_content = http_response.body
|
1434
|
+
unless status_code == 200
|
1435
|
+
error_model = JSON.load(response_content)
|
1436
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
# Create Result
|
1440
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1441
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1442
|
+
# Deserialize Response
|
1443
|
+
if status_code == 200
|
1444
|
+
begin
|
1445
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1446
|
+
result_mapper = DataLakeStoreAccountListResult.mapper()
|
1447
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1448
|
+
rescue Exception => e
|
1449
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1450
|
+
end
|
1451
|
+
end
|
1452
|
+
|
1453
|
+
result
|
1454
|
+
end
|
1455
|
+
|
1456
|
+
promise.execute
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
#
|
1460
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
1461
|
+
# Store account.
|
1462
|
+
#
|
1463
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1464
|
+
# call to List operation.
|
1465
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1466
|
+
# will be added to the HTTP request.
|
1467
|
+
#
|
1468
|
+
# @return [DataLakeStoreFirewallRuleListResult] operation results.
|
1469
|
+
#
|
1470
|
+
def list_firewall_rules_next(next_page_link, custom_headers = nil)
|
1471
|
+
response = list_firewall_rules_next_async(next_page_link, custom_headers).value!
|
1472
|
+
response.body unless response.nil?
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
#
|
1476
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
1477
|
+
# Store account.
|
1478
|
+
#
|
1479
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1480
|
+
# call to List operation.
|
1481
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1482
|
+
# will be added to the HTTP request.
|
1483
|
+
#
|
1484
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1485
|
+
#
|
1486
|
+
def list_firewall_rules_next_with_http_info(next_page_link, custom_headers = nil)
|
1487
|
+
list_firewall_rules_next_async(next_page_link, custom_headers).value!
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
#
|
1491
|
+
# Lists the Data Lake Store firewall rules within the specified Data Lake
|
1492
|
+
# Store account.
|
1493
|
+
#
|
1494
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1495
|
+
# call to List operation.
|
1496
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1497
|
+
# to the HTTP request.
|
1498
|
+
#
|
1499
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1500
|
+
#
|
1501
|
+
def list_firewall_rules_next_async(next_page_link, custom_headers = nil)
|
1502
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1503
|
+
|
1504
|
+
|
1505
|
+
request_headers = {}
|
1506
|
+
|
1507
|
+
# Set Headers
|
1508
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1509
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1510
|
+
path_template = '{nextLink}'
|
1511
|
+
options = {
|
1512
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1513
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1514
|
+
headers: request_headers.merge(custom_headers || {})
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
request_url = @base_url || @client.base_url
|
1518
|
+
|
1519
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1520
|
+
promise = request.run_promise do |req|
|
1521
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
promise = promise.then do |http_response|
|
1525
|
+
status_code = http_response.status
|
1526
|
+
response_content = http_response.body
|
1527
|
+
unless status_code == 200
|
1528
|
+
error_model = JSON.load(response_content)
|
1529
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
# Create Result
|
1533
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1534
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1535
|
+
# Deserialize Response
|
1536
|
+
if status_code == 200
|
1537
|
+
begin
|
1538
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1539
|
+
result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
|
1540
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1541
|
+
rescue Exception => e
|
1542
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1543
|
+
end
|
1544
|
+
end
|
1545
|
+
|
1546
|
+
result
|
1547
|
+
end
|
1548
|
+
|
1549
|
+
promise.execute
|
1550
|
+
end
|
1551
|
+
|
1552
|
+
#
|
1553
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1554
|
+
# response includes a link to the next page of results, if any.
|
1555
|
+
#
|
1556
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1557
|
+
# call to List operation.
|
1558
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1559
|
+
# will be added to the HTTP request.
|
1560
|
+
#
|
1561
|
+
# @return [DataLakeStoreAccountListResult] operation results.
|
1562
|
+
#
|
1563
|
+
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1564
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1565
|
+
response.body unless response.nil?
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
#
|
1569
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1570
|
+
# response includes a link to the next page of results, if any.
|
1571
|
+
#
|
1572
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1573
|
+
# call to List operation.
|
1574
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1575
|
+
# will be added to the HTTP request.
|
1576
|
+
#
|
1577
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1578
|
+
#
|
1579
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
1580
|
+
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
#
|
1584
|
+
# Lists the Data Lake Store accounts within a specific resource group. The
|
1585
|
+
# response includes a link to the next page of results, if any.
|
1586
|
+
#
|
1587
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1588
|
+
# call to List operation.
|
1589
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1590
|
+
# to the HTTP request.
|
1591
|
+
#
|
1592
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1593
|
+
#
|
1594
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
|
1595
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1596
|
+
|
1597
|
+
|
1598
|
+
request_headers = {}
|
1599
|
+
|
1600
|
+
# Set Headers
|
1601
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1602
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1603
|
+
path_template = '{nextLink}'
|
1604
|
+
options = {
|
1605
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1606
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1607
|
+
headers: request_headers.merge(custom_headers || {})
|
1608
|
+
}
|
1609
|
+
|
1610
|
+
request_url = @base_url || @client.base_url
|
1611
|
+
|
1612
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1613
|
+
promise = request.run_promise do |req|
|
1614
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1615
|
+
end
|
1616
|
+
|
1617
|
+
promise = promise.then do |http_response|
|
1618
|
+
status_code = http_response.status
|
1619
|
+
response_content = http_response.body
|
1620
|
+
unless status_code == 200
|
1621
|
+
error_model = JSON.load(response_content)
|
1622
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
# Create Result
|
1626
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1627
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1628
|
+
# Deserialize Response
|
1629
|
+
if status_code == 200
|
1630
|
+
begin
|
1631
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1632
|
+
result_mapper = DataLakeStoreAccountListResult.mapper()
|
1633
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1634
|
+
rescue Exception => e
|
1635
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1636
|
+
end
|
1637
|
+
end
|
1638
|
+
|
1639
|
+
result
|
1640
|
+
end
|
1641
|
+
|
1642
|
+
promise.execute
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
#
|
1646
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1647
|
+
# includes a link to the next page of results, if any.
|
1648
|
+
#
|
1649
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1650
|
+
# call to List operation.
|
1651
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1652
|
+
# will be added to the HTTP request.
|
1653
|
+
#
|
1654
|
+
# @return [DataLakeStoreAccountListResult] operation results.
|
1655
|
+
#
|
1656
|
+
def list_next(next_page_link, custom_headers = nil)
|
1657
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1658
|
+
response.body unless response.nil?
|
1659
|
+
end
|
1660
|
+
|
1661
|
+
#
|
1662
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1663
|
+
# includes a link to the next page of results, if any.
|
1664
|
+
#
|
1665
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1666
|
+
# call to List operation.
|
1667
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1668
|
+
# will be added to the HTTP request.
|
1669
|
+
#
|
1670
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1671
|
+
#
|
1672
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1673
|
+
list_next_async(next_page_link, custom_headers).value!
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
#
|
1677
|
+
# Lists the Data Lake Store accounts within the subscription. The response
|
1678
|
+
# includes a link to the next page of results, if any.
|
1679
|
+
#
|
1680
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1681
|
+
# call to List operation.
|
1682
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1683
|
+
# to the HTTP request.
|
1684
|
+
#
|
1685
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1686
|
+
#
|
1687
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1688
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1689
|
+
|
1690
|
+
|
1691
|
+
request_headers = {}
|
1692
|
+
|
1693
|
+
# Set Headers
|
1694
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1695
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1696
|
+
path_template = '{nextLink}'
|
1697
|
+
options = {
|
1698
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1699
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1700
|
+
headers: request_headers.merge(custom_headers || {})
|
1701
|
+
}
|
1702
|
+
|
1703
|
+
request_url = @base_url || @client.base_url
|
1704
|
+
|
1705
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1706
|
+
promise = request.run_promise do |req|
|
1707
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
promise = promise.then do |http_response|
|
1711
|
+
status_code = http_response.status
|
1712
|
+
response_content = http_response.body
|
1713
|
+
unless status_code == 200
|
1714
|
+
error_model = JSON.load(response_content)
|
1715
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
1716
|
+
end
|
1717
|
+
|
1718
|
+
# Create Result
|
1719
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1720
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1721
|
+
# Deserialize Response
|
1722
|
+
if status_code == 200
|
1723
|
+
begin
|
1724
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1725
|
+
result_mapper = DataLakeStoreAccountListResult.mapper()
|
1726
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1727
|
+
rescue Exception => e
|
1728
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1729
|
+
end
|
1730
|
+
end
|
1731
|
+
|
1732
|
+
result
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
promise.execute
|
1736
|
+
end
|
1737
|
+
|
1738
|
+
end
|
1739
|
+
end
|