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