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