azure_mgmt_datalake_store 0.16.0 → 0.17.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/data_lake_store_account_management_client.rb +7 -6
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store.rb +18 -11
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb +11 -6
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/firewall_rules.rb +3 -3
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/create_data_lake_store_account_parameters.rb +21 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/create_or_update_virtual_network_rule_parameters.rb +47 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/create_virtual_network_rule_with_account_parameters.rb +59 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb +22 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/update_data_lake_store_account_parameters.rb +21 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/update_virtual_network_rule_parameters.rb +46 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/update_virtual_network_rule_with_account_parameters.rb +59 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/virtual_network_rule.rb +74 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/virtual_network_rule_list_result.rb +100 -0
- data/lib/2016-11-01/generated/azure_mgmt_datalake_store/virtual_network_rules.rb +655 -0
- data/lib/profiles/latest/modules/datalakestore_profile_module.rb +61 -35
- data/lib/version.rb +1 -1
- metadata +11 -4
@@ -0,0 +1,74 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::DataLakeStore::Mgmt::V2016_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Data Lake Store virtual network rule information.
|
10
|
+
#
|
11
|
+
class VirtualNetworkRule < SubResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The resource identifier for the subnet.
|
16
|
+
attr_accessor :subnet_id
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for VirtualNetworkRule class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'VirtualNetworkRule',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'VirtualNetworkRule',
|
31
|
+
model_properties: {
|
32
|
+
id: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
read_only: true,
|
36
|
+
serialized_name: 'id',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
},
|
41
|
+
name: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
read_only: true,
|
45
|
+
serialized_name: 'name',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
type: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
read_only: true,
|
54
|
+
serialized_name: 'type',
|
55
|
+
type: {
|
56
|
+
name: 'String'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
subnet_id: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
read_only: true,
|
63
|
+
serialized_name: 'properties.subnetId',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/lib/2016-11-01/generated/azure_mgmt_datalake_store/models/virtual_network_rule_list_result.rb
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::DataLakeStore::Mgmt::V2016_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Data Lake Store virtual network rule list information.
|
10
|
+
#
|
11
|
+
class VirtualNetworkRuleListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<VirtualNetworkRule>] The results of the list operation.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] The link (url) to the next page of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<VirtualNetworkRule>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [VirtualNetworkRuleListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for VirtualNetworkRuleListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
serialized_name: 'VirtualNetworkRuleListResult',
|
63
|
+
type: {
|
64
|
+
name: 'Composite',
|
65
|
+
class_name: 'VirtualNetworkRuleListResult',
|
66
|
+
model_properties: {
|
67
|
+
value: {
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
read_only: true,
|
71
|
+
serialized_name: 'value',
|
72
|
+
type: {
|
73
|
+
name: 'Sequence',
|
74
|
+
element: {
|
75
|
+
client_side_validation: true,
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'VirtualNetworkRuleElementType',
|
78
|
+
type: {
|
79
|
+
name: 'Composite',
|
80
|
+
class_name: 'VirtualNetworkRule'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
next_link: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
read_only: true,
|
89
|
+
serialized_name: 'nextLink',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,655 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::DataLakeStore::Mgmt::V2016_11_01
|
7
|
+
#
|
8
|
+
# Creates an Azure Data Lake Store account management client.
|
9
|
+
#
|
10
|
+
class VirtualNetworkRules
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the VirtualNetworkRules class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [DataLakeStoreAccountManagementClient] reference to the DataLakeStoreAccountManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
26
|
+
# Lake Store account.
|
27
|
+
#
|
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.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [Array<VirtualNetworkRule>] operation results.
|
34
|
+
#
|
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
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
42
|
+
# Lake Store account.
|
43
|
+
#
|
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.
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_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!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
57
|
+
# Lake Store account.
|
58
|
+
#
|
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.
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_by_account_async(resource_group_name, account_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
70
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
71
|
+
|
72
|
+
|
73
|
+
request_headers = {}
|
74
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
75
|
+
|
76
|
+
# Set Headers
|
77
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
78
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
79
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules'
|
80
|
+
|
81
|
+
request_url = @base_url || @client.base_url
|
82
|
+
|
83
|
+
options = {
|
84
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
85
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
86
|
+
query_params: {'api-version' => @client.api_version},
|
87
|
+
headers: request_headers.merge(custom_headers || {}),
|
88
|
+
base_url: request_url
|
89
|
+
}
|
90
|
+
promise = @client.make_request_async(:get, path_template, options)
|
91
|
+
|
92
|
+
promise = promise.then do |result|
|
93
|
+
http_response = result.response
|
94
|
+
status_code = http_response.status
|
95
|
+
response_content = http_response.body
|
96
|
+
unless status_code == 200
|
97
|
+
error_model = JSON.load(response_content)
|
98
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
99
|
+
end
|
100
|
+
|
101
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
102
|
+
# Deserialize Response
|
103
|
+
if status_code == 200
|
104
|
+
begin
|
105
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
106
|
+
result_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::VirtualNetworkRuleListResult.mapper()
|
107
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
108
|
+
rescue Exception => e
|
109
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
result
|
114
|
+
end
|
115
|
+
|
116
|
+
promise.execute
|
117
|
+
end
|
118
|
+
|
119
|
+
#
|
120
|
+
# Creates or updates the specified virtual network rule. During update, the
|
121
|
+
# virtual network rule with the specified name will be replaced with this new
|
122
|
+
# virtual network rule.
|
123
|
+
#
|
124
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
125
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
126
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
127
|
+
# rule to create or update.
|
128
|
+
# @param parameters [CreateOrUpdateVirtualNetworkRuleParameters] Parameters
|
129
|
+
# supplied to create or update the virtual network rule.
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [VirtualNetworkRule] operation results.
|
134
|
+
#
|
135
|
+
def create_or_update(resource_group_name, account_name, virtual_network_rule_name, parameters, custom_headers:nil)
|
136
|
+
response = create_or_update_async(resource_group_name, account_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
|
137
|
+
response.body unless response.nil?
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Creates or updates the specified virtual network rule. During update, the
|
142
|
+
# virtual network rule with the specified name will be replaced with this new
|
143
|
+
# virtual network rule.
|
144
|
+
#
|
145
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
146
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
147
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
148
|
+
# rule to create or update.
|
149
|
+
# @param parameters [CreateOrUpdateVirtualNetworkRuleParameters] Parameters
|
150
|
+
# supplied to create or update the virtual network rule.
|
151
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
152
|
+
# will be added to the HTTP request.
|
153
|
+
#
|
154
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
155
|
+
#
|
156
|
+
def create_or_update_with_http_info(resource_group_name, account_name, virtual_network_rule_name, parameters, custom_headers:nil)
|
157
|
+
create_or_update_async(resource_group_name, account_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
|
158
|
+
end
|
159
|
+
|
160
|
+
#
|
161
|
+
# Creates or updates the specified virtual network rule. During update, the
|
162
|
+
# virtual network rule with the specified name will be replaced with this new
|
163
|
+
# virtual network rule.
|
164
|
+
#
|
165
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
166
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
167
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
168
|
+
# rule to create or update.
|
169
|
+
# @param parameters [CreateOrUpdateVirtualNetworkRuleParameters] Parameters
|
170
|
+
# supplied to create or update the virtual network rule.
|
171
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
172
|
+
# to the HTTP request.
|
173
|
+
#
|
174
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
175
|
+
#
|
176
|
+
def create_or_update_async(resource_group_name, account_name, virtual_network_rule_name, parameters, custom_headers:nil)
|
177
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
178
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
179
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
180
|
+
fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
|
181
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
182
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
183
|
+
|
184
|
+
|
185
|
+
request_headers = {}
|
186
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
187
|
+
|
188
|
+
# Set Headers
|
189
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
190
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
191
|
+
|
192
|
+
# Serialize Request
|
193
|
+
request_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::CreateOrUpdateVirtualNetworkRuleParameters.mapper()
|
194
|
+
request_content = @client.serialize(request_mapper, parameters)
|
195
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
196
|
+
|
197
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'
|
198
|
+
|
199
|
+
request_url = @base_url || @client.base_url
|
200
|
+
|
201
|
+
options = {
|
202
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
203
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'virtualNetworkRuleName' => virtual_network_rule_name},
|
204
|
+
query_params: {'api-version' => @client.api_version},
|
205
|
+
body: request_content,
|
206
|
+
headers: request_headers.merge(custom_headers || {}),
|
207
|
+
base_url: request_url
|
208
|
+
}
|
209
|
+
promise = @client.make_request_async(:put, path_template, options)
|
210
|
+
|
211
|
+
promise = promise.then do |result|
|
212
|
+
http_response = result.response
|
213
|
+
status_code = http_response.status
|
214
|
+
response_content = http_response.body
|
215
|
+
unless status_code == 200
|
216
|
+
error_model = JSON.load(response_content)
|
217
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
218
|
+
end
|
219
|
+
|
220
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
221
|
+
# Deserialize Response
|
222
|
+
if status_code == 200
|
223
|
+
begin
|
224
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
225
|
+
result_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::VirtualNetworkRule.mapper()
|
226
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
227
|
+
rescue Exception => e
|
228
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
result
|
233
|
+
end
|
234
|
+
|
235
|
+
promise.execute
|
236
|
+
end
|
237
|
+
|
238
|
+
#
|
239
|
+
# Gets the specified Data Lake Store virtual network rule.
|
240
|
+
#
|
241
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
242
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
243
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
244
|
+
# rule to retrieve.
|
245
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
246
|
+
# will be added to the HTTP request.
|
247
|
+
#
|
248
|
+
# @return [VirtualNetworkRule] operation results.
|
249
|
+
#
|
250
|
+
def get(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
251
|
+
response = get_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:custom_headers).value!
|
252
|
+
response.body unless response.nil?
|
253
|
+
end
|
254
|
+
|
255
|
+
#
|
256
|
+
# Gets the specified Data Lake Store virtual network rule.
|
257
|
+
#
|
258
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
259
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
260
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
261
|
+
# rule to retrieve.
|
262
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
263
|
+
# will be added to the HTTP request.
|
264
|
+
#
|
265
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
266
|
+
#
|
267
|
+
def get_with_http_info(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
268
|
+
get_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:custom_headers).value!
|
269
|
+
end
|
270
|
+
|
271
|
+
#
|
272
|
+
# Gets the specified Data Lake Store virtual network rule.
|
273
|
+
#
|
274
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
275
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
276
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
277
|
+
# rule to retrieve.
|
278
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
279
|
+
# to the HTTP request.
|
280
|
+
#
|
281
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
282
|
+
#
|
283
|
+
def get_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
284
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
285
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
286
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
287
|
+
fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
|
288
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
289
|
+
|
290
|
+
|
291
|
+
request_headers = {}
|
292
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
293
|
+
|
294
|
+
# Set Headers
|
295
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
296
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
297
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'
|
298
|
+
|
299
|
+
request_url = @base_url || @client.base_url
|
300
|
+
|
301
|
+
options = {
|
302
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
303
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'virtualNetworkRuleName' => virtual_network_rule_name},
|
304
|
+
query_params: {'api-version' => @client.api_version},
|
305
|
+
headers: request_headers.merge(custom_headers || {}),
|
306
|
+
base_url: request_url
|
307
|
+
}
|
308
|
+
promise = @client.make_request_async(:get, path_template, options)
|
309
|
+
|
310
|
+
promise = promise.then do |result|
|
311
|
+
http_response = result.response
|
312
|
+
status_code = http_response.status
|
313
|
+
response_content = http_response.body
|
314
|
+
unless status_code == 200
|
315
|
+
error_model = JSON.load(response_content)
|
316
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
317
|
+
end
|
318
|
+
|
319
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
320
|
+
# Deserialize Response
|
321
|
+
if status_code == 200
|
322
|
+
begin
|
323
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
324
|
+
result_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::VirtualNetworkRule.mapper()
|
325
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
326
|
+
rescue Exception => e
|
327
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
result
|
332
|
+
end
|
333
|
+
|
334
|
+
promise.execute
|
335
|
+
end
|
336
|
+
|
337
|
+
#
|
338
|
+
# Updates the specified virtual network rule.
|
339
|
+
#
|
340
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
341
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
342
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
343
|
+
# rule to update.
|
344
|
+
# @param parameters [UpdateVirtualNetworkRuleParameters] Parameters supplied to
|
345
|
+
# update the virtual network rule.
|
346
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
347
|
+
# will be added to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [VirtualNetworkRule] operation results.
|
350
|
+
#
|
351
|
+
def update(resource_group_name, account_name, virtual_network_rule_name, parameters:nil, custom_headers:nil)
|
352
|
+
response = update_async(resource_group_name, account_name, virtual_network_rule_name, parameters:parameters, custom_headers:custom_headers).value!
|
353
|
+
response.body unless response.nil?
|
354
|
+
end
|
355
|
+
|
356
|
+
#
|
357
|
+
# Updates the specified virtual network rule.
|
358
|
+
#
|
359
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
360
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
361
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
362
|
+
# rule to update.
|
363
|
+
# @param parameters [UpdateVirtualNetworkRuleParameters] Parameters supplied to
|
364
|
+
# update the virtual network rule.
|
365
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
366
|
+
# will be added to the HTTP request.
|
367
|
+
#
|
368
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
369
|
+
#
|
370
|
+
def update_with_http_info(resource_group_name, account_name, virtual_network_rule_name, parameters:nil, custom_headers:nil)
|
371
|
+
update_async(resource_group_name, account_name, virtual_network_rule_name, parameters:parameters, custom_headers:custom_headers).value!
|
372
|
+
end
|
373
|
+
|
374
|
+
#
|
375
|
+
# Updates the specified virtual network rule.
|
376
|
+
#
|
377
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
378
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
379
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
380
|
+
# rule to update.
|
381
|
+
# @param parameters [UpdateVirtualNetworkRuleParameters] Parameters supplied to
|
382
|
+
# update the virtual network rule.
|
383
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
384
|
+
# to the HTTP request.
|
385
|
+
#
|
386
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
387
|
+
#
|
388
|
+
def update_async(resource_group_name, account_name, virtual_network_rule_name, parameters:nil, custom_headers:nil)
|
389
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
390
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
391
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
392
|
+
fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
|
393
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
394
|
+
|
395
|
+
|
396
|
+
request_headers = {}
|
397
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
398
|
+
|
399
|
+
# Set Headers
|
400
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
401
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
402
|
+
|
403
|
+
# Serialize Request
|
404
|
+
request_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::UpdateVirtualNetworkRuleParameters.mapper()
|
405
|
+
request_content = @client.serialize(request_mapper, parameters)
|
406
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
407
|
+
|
408
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'
|
409
|
+
|
410
|
+
request_url = @base_url || @client.base_url
|
411
|
+
|
412
|
+
options = {
|
413
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
414
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'virtualNetworkRuleName' => virtual_network_rule_name},
|
415
|
+
query_params: {'api-version' => @client.api_version},
|
416
|
+
body: request_content,
|
417
|
+
headers: request_headers.merge(custom_headers || {}),
|
418
|
+
base_url: request_url
|
419
|
+
}
|
420
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
421
|
+
|
422
|
+
promise = promise.then do |result|
|
423
|
+
http_response = result.response
|
424
|
+
status_code = http_response.status
|
425
|
+
response_content = http_response.body
|
426
|
+
unless status_code == 200
|
427
|
+
error_model = JSON.load(response_content)
|
428
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
429
|
+
end
|
430
|
+
|
431
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
432
|
+
# Deserialize Response
|
433
|
+
if status_code == 200
|
434
|
+
begin
|
435
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
436
|
+
result_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::VirtualNetworkRule.mapper()
|
437
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
438
|
+
rescue Exception => e
|
439
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
result
|
444
|
+
end
|
445
|
+
|
446
|
+
promise.execute
|
447
|
+
end
|
448
|
+
|
449
|
+
#
|
450
|
+
# Deletes the specified virtual network rule from the specified Data Lake Store
|
451
|
+
# account.
|
452
|
+
#
|
453
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
454
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
455
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
456
|
+
# rule to delete.
|
457
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
458
|
+
# will be added to the HTTP request.
|
459
|
+
#
|
460
|
+
#
|
461
|
+
def delete(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
462
|
+
response = delete_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:custom_headers).value!
|
463
|
+
nil
|
464
|
+
end
|
465
|
+
|
466
|
+
#
|
467
|
+
# Deletes the specified virtual network rule from the specified Data Lake Store
|
468
|
+
# account.
|
469
|
+
#
|
470
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
471
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
472
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
473
|
+
# rule to delete.
|
474
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
475
|
+
# will be added to the HTTP request.
|
476
|
+
#
|
477
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
478
|
+
#
|
479
|
+
def delete_with_http_info(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
480
|
+
delete_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:custom_headers).value!
|
481
|
+
end
|
482
|
+
|
483
|
+
#
|
484
|
+
# Deletes the specified virtual network rule from the specified Data Lake Store
|
485
|
+
# account.
|
486
|
+
#
|
487
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
488
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
489
|
+
# @param virtual_network_rule_name [String] The name of the virtual network
|
490
|
+
# rule to delete.
|
491
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
492
|
+
# to the HTTP request.
|
493
|
+
#
|
494
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
495
|
+
#
|
496
|
+
def delete_async(resource_group_name, account_name, virtual_network_rule_name, custom_headers:nil)
|
497
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
498
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
499
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
500
|
+
fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
|
501
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
502
|
+
|
503
|
+
|
504
|
+
request_headers = {}
|
505
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
506
|
+
|
507
|
+
# Set Headers
|
508
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
509
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
510
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}'
|
511
|
+
|
512
|
+
request_url = @base_url || @client.base_url
|
513
|
+
|
514
|
+
options = {
|
515
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
516
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'virtualNetworkRuleName' => virtual_network_rule_name},
|
517
|
+
query_params: {'api-version' => @client.api_version},
|
518
|
+
headers: request_headers.merge(custom_headers || {}),
|
519
|
+
base_url: request_url
|
520
|
+
}
|
521
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
522
|
+
|
523
|
+
promise = promise.then do |result|
|
524
|
+
http_response = result.response
|
525
|
+
status_code = http_response.status
|
526
|
+
response_content = http_response.body
|
527
|
+
unless status_code == 200 || status_code == 204
|
528
|
+
error_model = JSON.load(response_content)
|
529
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
530
|
+
end
|
531
|
+
|
532
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
533
|
+
|
534
|
+
result
|
535
|
+
end
|
536
|
+
|
537
|
+
promise.execute
|
538
|
+
end
|
539
|
+
|
540
|
+
#
|
541
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
542
|
+
# Lake Store account.
|
543
|
+
#
|
544
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
545
|
+
# to List operation.
|
546
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
547
|
+
# will be added to the HTTP request.
|
548
|
+
#
|
549
|
+
# @return [VirtualNetworkRuleListResult] operation results.
|
550
|
+
#
|
551
|
+
def list_by_account_next(next_page_link, custom_headers:nil)
|
552
|
+
response = list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
553
|
+
response.body unless response.nil?
|
554
|
+
end
|
555
|
+
|
556
|
+
#
|
557
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
558
|
+
# Lake Store account.
|
559
|
+
#
|
560
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
561
|
+
# to List operation.
|
562
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
563
|
+
# will be added to the HTTP request.
|
564
|
+
#
|
565
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
566
|
+
#
|
567
|
+
def list_by_account_next_with_http_info(next_page_link, custom_headers:nil)
|
568
|
+
list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
569
|
+
end
|
570
|
+
|
571
|
+
#
|
572
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
573
|
+
# Lake Store account.
|
574
|
+
#
|
575
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
576
|
+
# to List operation.
|
577
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
578
|
+
# to the HTTP request.
|
579
|
+
#
|
580
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
581
|
+
#
|
582
|
+
def list_by_account_next_async(next_page_link, custom_headers:nil)
|
583
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
584
|
+
|
585
|
+
|
586
|
+
request_headers = {}
|
587
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
588
|
+
|
589
|
+
# Set Headers
|
590
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
591
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
592
|
+
path_template = '{nextLink}'
|
593
|
+
|
594
|
+
request_url = @base_url || @client.base_url
|
595
|
+
|
596
|
+
options = {
|
597
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
598
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
599
|
+
headers: request_headers.merge(custom_headers || {}),
|
600
|
+
base_url: request_url
|
601
|
+
}
|
602
|
+
promise = @client.make_request_async(:get, path_template, options)
|
603
|
+
|
604
|
+
promise = promise.then do |result|
|
605
|
+
http_response = result.response
|
606
|
+
status_code = http_response.status
|
607
|
+
response_content = http_response.body
|
608
|
+
unless status_code == 200
|
609
|
+
error_model = JSON.load(response_content)
|
610
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
611
|
+
end
|
612
|
+
|
613
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
614
|
+
# Deserialize Response
|
615
|
+
if status_code == 200
|
616
|
+
begin
|
617
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
618
|
+
result_mapper = Azure::DataLakeStore::Mgmt::V2016_11_01::Models::VirtualNetworkRuleListResult.mapper()
|
619
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
620
|
+
rescue Exception => e
|
621
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
622
|
+
end
|
623
|
+
end
|
624
|
+
|
625
|
+
result
|
626
|
+
end
|
627
|
+
|
628
|
+
promise.execute
|
629
|
+
end
|
630
|
+
|
631
|
+
#
|
632
|
+
# Lists the Data Lake Store virtual network rules within the specified Data
|
633
|
+
# Lake Store account.
|
634
|
+
#
|
635
|
+
# @param resource_group_name [String] The name of the Azure resource group.
|
636
|
+
# @param account_name [String] The name of the Data Lake Store account.
|
637
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
638
|
+
# will be added to the HTTP request.
|
639
|
+
#
|
640
|
+
# @return [VirtualNetworkRuleListResult] which provide lazy access to pages of
|
641
|
+
# the response.
|
642
|
+
#
|
643
|
+
def list_by_account_as_lazy(resource_group_name, account_name, custom_headers:nil)
|
644
|
+
response = list_by_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
645
|
+
unless response.nil?
|
646
|
+
page = response.body
|
647
|
+
page.next_method = Proc.new do |next_page_link|
|
648
|
+
list_by_account_next_async(next_page_link, custom_headers:custom_headers)
|
649
|
+
end
|
650
|
+
page
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
end
|
655
|
+
end
|