azure_mgmt_datalake_analytics 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics.rb +51 -0
  3. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb +3131 -0
  4. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +131 -0
  5. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +46 -0
  6. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +46 -0
  7. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/azure_async_operation_result.rb +66 -0
  8. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/blob_container.rb +79 -0
  9. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/blob_container_properties.rb +45 -0
  10. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +107 -0
  11. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +110 -0
  12. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +97 -0
  13. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +109 -0
  14. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties.rb +167 -0
  15. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb +16 -0
  16. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb +23 -0
  17. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb +56 -0
  18. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info_properties.rb +44 -0
  19. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/error.rb +99 -0
  20. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/error_details.rb +69 -0
  21. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/inner_error.rb +56 -0
  22. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_blob_containers_result.rb +97 -0
  23. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +97 -0
  24. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/operation_status.rb +17 -0
  25. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb +46 -0
  26. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb +57 -0
  27. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/storage_account_properties.rb +55 -0
  28. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/module_definition.rb +9 -0
  29. data/lib/{generated/azure_mgmt_datalake_analytics/module_definition.rb → 2015-10-01-preview/generated/azure_mgmt_datalake_analytics/version.rb} +3 -3
  30. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics.rb +64 -0
  31. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/account.rb +14 -14
  32. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/compute_policies.rb +8 -8
  33. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +3 -3
  34. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb +5 -5
  35. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/firewall_rules.rb +8 -8
  36. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/aadobject_type.rb +1 -1
  37. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +1 -1
  38. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +1 -1
  39. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/compute_policy.rb +1 -1
  40. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb +1 -1
  41. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb +1 -1
  42. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb +1 -1
  43. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +1 -1
  44. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb +1 -1
  45. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +1 -1
  46. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +1 -1
  47. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +1 -1
  48. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb +1 -1
  49. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb +1 -1
  50. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb +1 -1
  51. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb +1 -1
  52. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb +1 -1
  53. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb +1 -1
  54. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb +1 -1
  55. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/firewall_rule.rb +1 -1
  56. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/firewall_state.rb +1 -1
  57. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +1 -1
  58. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb +1 -1
  59. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb +1 -1
  60. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/resource.rb +1 -1
  61. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/sas_token_info.rb +1 -1
  62. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/storage_account_info.rb +1 -1
  63. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/storage_container.rb +1 -1
  64. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/sub_resource.rb +1 -1
  65. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/tier_type.rb +1 -1
  66. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb +1 -1
  67. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb +1 -1
  68. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/module_definition.rb +9 -0
  69. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/storage_accounts.rb +11 -11
  70. data/lib/{generated → 2016-11-01/generated}/azure_mgmt_datalake_analytics/version.rb +2 -2
  71. data/lib/azure_mgmt_datalake_analytics.rb +6 -1
  72. data/lib/module_definition.rb +8 -0
  73. data/lib/profiles/common/configurable.rb +73 -0
  74. data/lib/profiles/common/default.rb +68 -0
  75. data/lib/profiles/latest/datalakeanalytics_latest_profile_client.rb +33 -0
  76. data/lib/profiles/latest/datalakeanalytics_module_definition.rb +9 -0
  77. data/lib/profiles/latest/modules/datalakeanalytics_profile_module.rb +178 -0
  78. data/lib/version.rb +7 -0
  79. metadata +78 -43
  80. data/lib/generated/azure_mgmt_datalake_analytics.rb +0 -64
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 923f939b17410a6df0648f6f79299dad6519d876
4
- data.tar.gz: 53b1638174eabf26e2eca0dafb57adbf9351d996
3
+ metadata.gz: ab4fb32a942bd0da7abd569d5297cefbd7f36038
4
+ data.tar.gz: 51f2f9b84bb028b467110c8057fbc8a242527eb8
5
5
  SHA512:
6
- metadata.gz: 0ba0cab2c7cd8bbf61ed282a67803630bedddc77385a60c790afb558b872b31d57b2596537dbb867d5f12d18d3c53c20d0816683926af81ccc81772b770c2ba7
7
- data.tar.gz: 45dea5105abaea61593bca3c7afb8d0922c78a23f4129bedcd6196a04c43cb32b7e43b12bf97ea8a431b11aac8cfc5348e57867a10baabe810dbff3f9b5a1478
6
+ metadata.gz: e6e33910ca33df6fc2f7b97aad2c03eb4ae910b3ba2ea73801d65e990f4362e411631541e02ca8013a414af7f894a88c82f6f2a5d8275d36076c017c26796efa
7
+ data.tar.gz: 57c1adbb3b66872eae17a7cc0add29ba66e3e43be0a01611a5b89040b8506818aa95d26c9629370ad3d0e56e2f8a72b1d1e57aed09fa624f92c9e9469dbc58cb
@@ -0,0 +1,51 @@
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_analytics/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview
23
+ autoload :Account, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb'
24
+ autoload :DataLakeAnalyticsAccountManagementClient, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb'
25
+
26
+ module Models
27
+ autoload :DataLakeAnalyticsAccountListDataLakeStoreResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb'
28
+ autoload :StorageAccountProperties, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/storage_account_properties.rb'
29
+ autoload :DataLakeAnalyticsAccountProperties, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties.rb'
30
+ autoload :BlobContainerProperties, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/blob_container_properties.rb'
31
+ autoload :AddDataLakeStoreParameters, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb'
32
+ autoload :ListBlobContainersResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_blob_containers_result.rb'
33
+ autoload :AddStorageAccountParameters, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb'
34
+ autoload :ListSasTokensResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb'
35
+ autoload :DataLakeAnalyticsAccount, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb'
36
+ autoload :DataLakeStoreAccountInfo, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb'
37
+ autoload :DataLakeAnalyticsAccountListResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb'
38
+ autoload :StorageAccountInfo, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb'
39
+ autoload :ErrorDetails, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/error_details.rb'
40
+ autoload :SasTokenInfo, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb'
41
+ autoload :InnerError, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/inner_error.rb'
42
+ autoload :DataLakeAnalyticsAccountListStorageAccountsResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb'
43
+ autoload :Error, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/error.rb'
44
+ autoload :DataLakeStoreAccountInfoProperties, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info_properties.rb'
45
+ autoload :AzureAsyncOperationResult, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/azure_async_operation_result.rb'
46
+ autoload :BlobContainer, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/blob_container.rb'
47
+ autoload :DataLakeAnalyticsAccountStatus, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb'
48
+ autoload :DataLakeAnalyticsAccountState, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb'
49
+ autoload :OperationStatus, '2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/operation_status.rb'
50
+ end
51
+ end
@@ -0,0 +1,3131 @@
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::DataLakeAnalytics::Mgmt::V2015_10_01_preview
7
+ #
8
+ # Creates an Azure Data Lake Analytics account management 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 [DataLakeAnalyticsAccountManagementClient] reference to the DataLakeAnalyticsAccountManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets the specified Azure Storage account linked to the given Data Lake
26
+ # Analytics account.
27
+ #
28
+ # @param resource_group_name [String] The name of the Azure resource group that
29
+ # contains the Data Lake Analytics account.
30
+ # @param account_name [String] The name of the Data Lake Analytics account from
31
+ # which to retrieve Azure storage account details.
32
+ # @param storage_account_name [String] The name of the Azure Storage account
33
+ # for which to retrieve the details.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [StorageAccountInfo] operation results.
38
+ #
39
+ def get_storage_account(resource_group_name, account_name, storage_account_name, custom_headers = nil)
40
+ response = get_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Gets the specified Azure Storage account linked to the given Data Lake
46
+ # Analytics account.
47
+ #
48
+ # @param resource_group_name [String] The name of the Azure resource group that
49
+ # contains the Data Lake Analytics account.
50
+ # @param account_name [String] The name of the Data Lake Analytics account from
51
+ # which to retrieve Azure storage account details.
52
+ # @param storage_account_name [String] The name of the Azure Storage account
53
+ # for which to retrieve the details.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def get_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
60
+ get_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Gets the specified Azure Storage account linked to the given Data Lake
65
+ # Analytics account.
66
+ #
67
+ # @param resource_group_name [String] The name of the Azure resource group that
68
+ # contains the Data Lake Analytics account.
69
+ # @param account_name [String] The name of the Data Lake Analytics account from
70
+ # which to retrieve Azure storage account details.
71
+ # @param storage_account_name [String] The name of the Azure Storage account
72
+ # for which to retrieve the details.
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def get_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
79
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
80
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
81
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
82
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
83
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
84
+
85
+
86
+ request_headers = {}
87
+
88
+ # Set Headers
89
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
90
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
91
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
92
+
93
+ request_url = @base_url || @client.base_url
94
+
95
+ options = {
96
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
97
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
98
+ query_params: {'api-version' => @client.api_version},
99
+ headers: request_headers.merge(custom_headers || {}),
100
+ base_url: request_url
101
+ }
102
+ promise = @client.make_request_async(:get, path_template, options)
103
+
104
+ promise = promise.then do |result|
105
+ http_response = result.response
106
+ status_code = http_response.status
107
+ response_content = http_response.body
108
+ unless status_code == 200
109
+ error_model = JSON.load(response_content)
110
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
111
+ end
112
+
113
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::StorageAccountInfo.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
133
+ # account.
134
+ #
135
+ # @param resource_group_name [String] The name of the Azure resource group that
136
+ # contains the Data Lake Analytics account.
137
+ # @param account_name [String] The name of the Data Lake Analytics account from
138
+ # which to remove the Azure Storage account.
139
+ # @param storage_account_name [String] The name of the Azure Storage account to
140
+ # remove
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ #
145
+ def delete_storage_account(resource_group_name, account_name, storage_account_name, custom_headers = nil)
146
+ response = delete_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
147
+ nil
148
+ end
149
+
150
+ #
151
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
152
+ # account.
153
+ #
154
+ # @param resource_group_name [String] The name of the Azure resource group that
155
+ # contains the Data Lake Analytics account.
156
+ # @param account_name [String] The name of the Data Lake Analytics account from
157
+ # which to remove the Azure Storage account.
158
+ # @param storage_account_name [String] The name of the Azure Storage account to
159
+ # remove
160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
161
+ # will be added to the HTTP request.
162
+ #
163
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
164
+ #
165
+ def delete_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
166
+ delete_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
167
+ end
168
+
169
+ #
170
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
171
+ # account.
172
+ #
173
+ # @param resource_group_name [String] The name of the Azure resource group that
174
+ # contains the Data Lake Analytics account.
175
+ # @param account_name [String] The name of the Data Lake Analytics account from
176
+ # which to remove the Azure Storage account.
177
+ # @param storage_account_name [String] The name of the Azure Storage account to
178
+ # remove
179
+ # @param [Hash{String => String}] A hash of custom headers that will be added
180
+ # to the HTTP request.
181
+ #
182
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
183
+ #
184
+ def delete_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
185
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
186
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
187
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
188
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
189
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
190
+
191
+
192
+ request_headers = {}
193
+
194
+ # Set Headers
195
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
196
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
197
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
198
+
199
+ request_url = @base_url || @client.base_url
200
+
201
+ options = {
202
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
203
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
204
+ query_params: {'api-version' => @client.api_version},
205
+ headers: request_headers.merge(custom_headers || {}),
206
+ base_url: request_url
207
+ }
208
+ promise = @client.make_request_async(:delete, path_template, options)
209
+
210
+ promise = promise.then do |result|
211
+ http_response = result.response
212
+ status_code = http_response.status
213
+ response_content = http_response.body
214
+ unless status_code == 200
215
+ error_model = JSON.load(response_content)
216
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
217
+ end
218
+
219
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
+
221
+ result
222
+ end
223
+
224
+ promise.execute
225
+ end
226
+
227
+ #
228
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
229
+ # details, such as the access key and/or suffix.
230
+ #
231
+ # @param resource_group_name [String] The name of the Azure resource group that
232
+ # contains the Data Lake Analytics account.
233
+ # @param account_name [String] The name of the Data Lake Analytics account to
234
+ # modify storage accounts in
235
+ # @param storage_account_name [String] The Azure Storage account to modify
236
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
237
+ # access key and suffix to update the storage account with.
238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
239
+ # will be added to the HTTP request.
240
+ #
241
+ #
242
+ def update_storage_account(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
243
+ response = update_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
244
+ nil
245
+ end
246
+
247
+ #
248
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
249
+ # details, such as the access key and/or suffix.
250
+ #
251
+ # @param resource_group_name [String] The name of the Azure resource group that
252
+ # contains the Data Lake Analytics account.
253
+ # @param account_name [String] The name of the Data Lake Analytics account to
254
+ # modify storage accounts in
255
+ # @param storage_account_name [String] The Azure Storage account to modify
256
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
257
+ # access key and suffix to update the storage account with.
258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
+ # will be added to the HTTP request.
260
+ #
261
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
262
+ #
263
+ def update_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
264
+ update_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
265
+ end
266
+
267
+ #
268
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
269
+ # details, such as the access key and/or suffix.
270
+ #
271
+ # @param resource_group_name [String] The name of the Azure resource group that
272
+ # contains the Data Lake Analytics account.
273
+ # @param account_name [String] The name of the Data Lake Analytics account to
274
+ # modify storage accounts in
275
+ # @param storage_account_name [String] The Azure Storage account to modify
276
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
277
+ # access key and suffix to update the storage account with.
278
+ # @param [Hash{String => String}] A hash of custom headers that will be added
279
+ # to the HTTP request.
280
+ #
281
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
282
+ #
283
+ def update_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
284
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
285
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
286
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
287
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
288
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
289
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
290
+
291
+
292
+ request_headers = {}
293
+
294
+ # Set Headers
295
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
296
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
297
+
298
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
299
+
300
+ # Serialize Request
301
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::AddStorageAccountParameters.mapper()
302
+ request_content = @client.serialize(request_mapper, parameters)
303
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
304
+
305
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
306
+
307
+ request_url = @base_url || @client.base_url
308
+
309
+ options = {
310
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
311
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
312
+ query_params: {'api-version' => @client.api_version},
313
+ body: request_content,
314
+ headers: request_headers.merge(custom_headers || {}),
315
+ base_url: request_url
316
+ }
317
+ promise = @client.make_request_async(:patch, path_template, options)
318
+
319
+ promise = promise.then do |result|
320
+ http_response = result.response
321
+ status_code = http_response.status
322
+ response_content = http_response.body
323
+ unless status_code == 200
324
+ error_model = JSON.load(response_content)
325
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
326
+ end
327
+
328
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
329
+
330
+ result
331
+ end
332
+
333
+ promise.execute
334
+ end
335
+
336
+ #
337
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
338
+ # account.
339
+ #
340
+ # @param resource_group_name [String] The name of the Azure resource group that
341
+ # contains the Data Lake Analytics account.
342
+ # @param account_name [String] The name of the Data Lake Analytics account to
343
+ # which to add the Azure Storage account.
344
+ # @param storage_account_name [String] The name of the Azure Storage account to
345
+ # add
346
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
347
+ # access key and optional suffix for the Azure Storage Account.
348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
349
+ # will be added to the HTTP request.
350
+ #
351
+ #
352
+ def add_storage_account(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
353
+ response = add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
354
+ nil
355
+ end
356
+
357
+ #
358
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
359
+ # account.
360
+ #
361
+ # @param resource_group_name [String] The name of the Azure resource group that
362
+ # contains the Data Lake Analytics account.
363
+ # @param account_name [String] The name of the Data Lake Analytics account to
364
+ # which to add the Azure Storage account.
365
+ # @param storage_account_name [String] The name of the Azure Storage account to
366
+ # add
367
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
368
+ # access key and optional suffix for the Azure Storage Account.
369
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
370
+ # will be added to the HTTP request.
371
+ #
372
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
373
+ #
374
+ def add_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
375
+ add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
376
+ end
377
+
378
+ #
379
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
380
+ # account.
381
+ #
382
+ # @param resource_group_name [String] The name of the Azure resource group that
383
+ # contains the Data Lake Analytics account.
384
+ # @param account_name [String] The name of the Data Lake Analytics account to
385
+ # which to add the Azure Storage account.
386
+ # @param storage_account_name [String] The name of the Azure Storage account to
387
+ # add
388
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
389
+ # access key and optional suffix for the Azure Storage Account.
390
+ # @param [Hash{String => String}] A hash of custom headers that will be added
391
+ # to the HTTP request.
392
+ #
393
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
394
+ #
395
+ def add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
396
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
397
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
398
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
399
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
400
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
401
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
402
+
403
+
404
+ request_headers = {}
405
+
406
+ # Set Headers
407
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
408
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
409
+
410
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
411
+
412
+ # Serialize Request
413
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::AddStorageAccountParameters.mapper()
414
+ request_content = @client.serialize(request_mapper, parameters)
415
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
416
+
417
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
418
+
419
+ request_url = @base_url || @client.base_url
420
+
421
+ options = {
422
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
423
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
424
+ query_params: {'api-version' => @client.api_version},
425
+ body: request_content,
426
+ headers: request_headers.merge(custom_headers || {}),
427
+ base_url: request_url
428
+ }
429
+ promise = @client.make_request_async(:put, path_template, options)
430
+
431
+ promise = promise.then do |result|
432
+ http_response = result.response
433
+ status_code = http_response.status
434
+ response_content = http_response.body
435
+ unless status_code == 200
436
+ error_model = JSON.load(response_content)
437
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
438
+ end
439
+
440
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
441
+
442
+ result
443
+ end
444
+
445
+ promise.execute
446
+ end
447
+
448
+ #
449
+ # Gets the specified Azure Storage container associated with the given Data
450
+ # Lake Analytics and Azure Storage accounts.
451
+ #
452
+ # @param resource_group_name [String] The name of the Azure resource group that
453
+ # contains the Data Lake Analytics account.
454
+ # @param account_name [String] The name of the Data Lake Analytics account for
455
+ # which to retrieve blob container.
456
+ # @param storage_account_name [String] The name of the Azure storage account
457
+ # from which to retrieve the blob container.
458
+ # @param container_name [String] The name of the Azure storage container to
459
+ # retrieve
460
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
461
+ # will be added to the HTTP request.
462
+ #
463
+ # @return [BlobContainer] operation results.
464
+ #
465
+ def get_storage_container(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
466
+ response = get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
467
+ response.body unless response.nil?
468
+ end
469
+
470
+ #
471
+ # Gets the specified Azure Storage container associated with the given Data
472
+ # Lake Analytics and Azure Storage accounts.
473
+ #
474
+ # @param resource_group_name [String] The name of the Azure resource group that
475
+ # contains the Data Lake Analytics account.
476
+ # @param account_name [String] The name of the Data Lake Analytics account for
477
+ # which to retrieve blob container.
478
+ # @param storage_account_name [String] The name of the Azure storage account
479
+ # from which to retrieve the blob container.
480
+ # @param container_name [String] The name of the Azure storage container to
481
+ # retrieve
482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
483
+ # will be added to the HTTP request.
484
+ #
485
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
486
+ #
487
+ def get_storage_container_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
488
+ get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
489
+ end
490
+
491
+ #
492
+ # Gets the specified Azure Storage container associated with the given Data
493
+ # Lake Analytics and Azure Storage accounts.
494
+ #
495
+ # @param resource_group_name [String] The name of the Azure resource group that
496
+ # contains the Data Lake Analytics account.
497
+ # @param account_name [String] The name of the Data Lake Analytics account for
498
+ # which to retrieve blob container.
499
+ # @param storage_account_name [String] The name of the Azure storage account
500
+ # from which to retrieve the blob container.
501
+ # @param container_name [String] The name of the Azure storage container to
502
+ # retrieve
503
+ # @param [Hash{String => String}] A hash of custom headers that will be added
504
+ # to the HTTP request.
505
+ #
506
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
507
+ #
508
+ def get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
509
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
510
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
511
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
512
+ fail ArgumentError, 'container_name is nil' if container_name.nil?
513
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
514
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
515
+
516
+
517
+ request_headers = {}
518
+
519
+ # Set Headers
520
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
521
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
522
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}'
523
+
524
+ request_url = @base_url || @client.base_url
525
+
526
+ options = {
527
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
528
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
529
+ query_params: {'api-version' => @client.api_version},
530
+ headers: request_headers.merge(custom_headers || {}),
531
+ base_url: request_url
532
+ }
533
+ promise = @client.make_request_async(:get, path_template, options)
534
+
535
+ promise = promise.then do |result|
536
+ http_response = result.response
537
+ status_code = http_response.status
538
+ response_content = http_response.body
539
+ unless status_code == 200
540
+ error_model = JSON.load(response_content)
541
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
542
+ end
543
+
544
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
545
+ # Deserialize Response
546
+ if status_code == 200
547
+ begin
548
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
549
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::BlobContainer.mapper()
550
+ result.body = @client.deserialize(result_mapper, parsed_response)
551
+ rescue Exception => e
552
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
553
+ end
554
+ end
555
+
556
+ result
557
+ end
558
+
559
+ promise.execute
560
+ end
561
+
562
+ #
563
+ # Lists the Azure Storage containers, if any, associated with the specified
564
+ # Data Lake Analytics and Azure Storage account combination. The response
565
+ # includes a link to the next page of results, if any.
566
+ #
567
+ # @param resource_group_name [String] The name of the Azure resource group that
568
+ # contains the Data Lake Analytics account.
569
+ # @param account_name [String] The name of the Data Lake Analytics account for
570
+ # which to list Azure Storage blob containers.
571
+ # @param storage_account_name [String] The name of the Azure storage account
572
+ # from which to list blob containers.
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [Array<BlobContainer>] operation results.
577
+ #
578
+ def list_storage_containers(resource_group_name, account_name, storage_account_name, custom_headers = nil)
579
+ first_page = list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers)
580
+ first_page.get_all_items
581
+ end
582
+
583
+ #
584
+ # Lists the Azure Storage containers, if any, associated with the specified
585
+ # Data Lake Analytics and Azure Storage account combination. The response
586
+ # includes a link to the next page of results, if any.
587
+ #
588
+ # @param resource_group_name [String] The name of the Azure resource group that
589
+ # contains the Data Lake Analytics account.
590
+ # @param account_name [String] The name of the Data Lake Analytics account for
591
+ # which to list Azure Storage blob containers.
592
+ # @param storage_account_name [String] The name of the Azure storage account
593
+ # from which to list blob containers.
594
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
595
+ # will be added to the HTTP request.
596
+ #
597
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
598
+ #
599
+ def list_storage_containers_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
600
+ list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
601
+ end
602
+
603
+ #
604
+ # Lists the Azure Storage containers, if any, associated with the specified
605
+ # Data Lake Analytics and Azure Storage account combination. The response
606
+ # includes a link to the next page of results, if any.
607
+ #
608
+ # @param resource_group_name [String] The name of the Azure resource group that
609
+ # contains the Data Lake Analytics account.
610
+ # @param account_name [String] The name of the Data Lake Analytics account for
611
+ # which to list Azure Storage blob containers.
612
+ # @param storage_account_name [String] The name of the Azure storage account
613
+ # from which to list blob containers.
614
+ # @param [Hash{String => String}] A hash of custom headers that will be added
615
+ # to the HTTP request.
616
+ #
617
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
618
+ #
619
+ def list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
620
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
621
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
622
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
623
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
624
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
625
+
626
+
627
+ request_headers = {}
628
+
629
+ # Set Headers
630
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
631
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
632
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers'
633
+
634
+ request_url = @base_url || @client.base_url
635
+
636
+ options = {
637
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
638
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
639
+ query_params: {'api-version' => @client.api_version},
640
+ headers: request_headers.merge(custom_headers || {}),
641
+ base_url: request_url
642
+ }
643
+ promise = @client.make_request_async(:get, path_template, options)
644
+
645
+ promise = promise.then do |result|
646
+ http_response = result.response
647
+ status_code = http_response.status
648
+ response_content = http_response.body
649
+ unless status_code == 200
650
+ error_model = JSON.load(response_content)
651
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
652
+ end
653
+
654
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
655
+ # Deserialize Response
656
+ if status_code == 200
657
+ begin
658
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
659
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::ListBlobContainersResult.mapper()
660
+ result.body = @client.deserialize(result_mapper, parsed_response)
661
+ rescue Exception => e
662
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
663
+ end
664
+ end
665
+
666
+ result
667
+ end
668
+
669
+ promise.execute
670
+ end
671
+
672
+ #
673
+ # Gets the SAS token associated with the specified Data Lake Analytics and
674
+ # Azure Storage account and container combination.
675
+ #
676
+ # @param resource_group_name [String] The name of the Azure resource group that
677
+ # contains the Data Lake Analytics account.
678
+ # @param account_name [String] The name of the Data Lake Analytics account from
679
+ # which an Azure Storage account's SAS token is being requested.
680
+ # @param storage_account_name [String] The name of the Azure storage account
681
+ # for which the SAS token is being requested.
682
+ # @param container_name [String] The name of the Azure storage container for
683
+ # which the SAS token is being requested.
684
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
685
+ # will be added to the HTTP request.
686
+ #
687
+ # @return [Array<SasTokenInfo>] operation results.
688
+ #
689
+ def list_sas_tokens(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
690
+ first_page = list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers)
691
+ first_page.get_all_items
692
+ end
693
+
694
+ #
695
+ # Gets the SAS token associated with the specified Data Lake Analytics and
696
+ # Azure Storage account and container combination.
697
+ #
698
+ # @param resource_group_name [String] The name of the Azure resource group that
699
+ # contains the Data Lake Analytics account.
700
+ # @param account_name [String] The name of the Data Lake Analytics account from
701
+ # which an Azure Storage account's SAS token is being requested.
702
+ # @param storage_account_name [String] The name of the Azure storage account
703
+ # for which the SAS token is being requested.
704
+ # @param container_name [String] The name of the Azure storage container for
705
+ # which the SAS token is being requested.
706
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
707
+ # will be added to the HTTP request.
708
+ #
709
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
710
+ #
711
+ def list_sas_tokens_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
712
+ list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
713
+ end
714
+
715
+ #
716
+ # Gets the SAS token associated with the specified Data Lake Analytics and
717
+ # Azure Storage account and container combination.
718
+ #
719
+ # @param resource_group_name [String] The name of the Azure resource group that
720
+ # contains the Data Lake Analytics account.
721
+ # @param account_name [String] The name of the Data Lake Analytics account from
722
+ # which an Azure Storage account's SAS token is being requested.
723
+ # @param storage_account_name [String] The name of the Azure storage account
724
+ # for which the SAS token is being requested.
725
+ # @param container_name [String] The name of the Azure storage container for
726
+ # which the SAS token is being requested.
727
+ # @param [Hash{String => String}] A hash of custom headers that will be added
728
+ # to the HTTP request.
729
+ #
730
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
731
+ #
732
+ def list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
733
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
734
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
735
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
736
+ fail ArgumentError, 'container_name is nil' if container_name.nil?
737
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
738
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
739
+
740
+
741
+ request_headers = {}
742
+
743
+ # Set Headers
744
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
745
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
746
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens'
747
+
748
+ request_url = @base_url || @client.base_url
749
+
750
+ options = {
751
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
752
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
753
+ query_params: {'api-version' => @client.api_version},
754
+ headers: request_headers.merge(custom_headers || {}),
755
+ base_url: request_url
756
+ }
757
+ promise = @client.make_request_async(:post, path_template, options)
758
+
759
+ promise = promise.then do |result|
760
+ http_response = result.response
761
+ status_code = http_response.status
762
+ response_content = http_response.body
763
+ unless status_code == 200
764
+ error_model = JSON.load(response_content)
765
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
766
+ end
767
+
768
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
769
+ # Deserialize Response
770
+ if status_code == 200
771
+ begin
772
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
773
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::ListSasTokensResult.mapper()
774
+ result.body = @client.deserialize(result_mapper, parsed_response)
775
+ rescue Exception => e
776
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
777
+ end
778
+ end
779
+
780
+ result
781
+ end
782
+
783
+ promise.execute
784
+ end
785
+
786
+ #
787
+ # Gets the specified Data Lake Store account details in the specified Data Lake
788
+ # Analytics account.
789
+ #
790
+ # @param resource_group_name [String] The name of the Azure resource group that
791
+ # contains the Data Lake Analytics account.
792
+ # @param account_name [String] The name of the Data Lake Analytics account from
793
+ # which to retrieve the Data Lake Store account details.
794
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
795
+ # account to retrieve
796
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
797
+ # will be added to the HTTP request.
798
+ #
799
+ # @return [DataLakeStoreAccountInfo] operation results.
800
+ #
801
+ def get_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
802
+ response = get_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value!
803
+ response.body unless response.nil?
804
+ end
805
+
806
+ #
807
+ # Gets the specified Data Lake Store account details in the specified Data Lake
808
+ # Analytics account.
809
+ #
810
+ # @param resource_group_name [String] The name of the Azure resource group that
811
+ # contains the Data Lake Analytics account.
812
+ # @param account_name [String] The name of the Data Lake Analytics account from
813
+ # which to retrieve the Data Lake Store account details.
814
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
815
+ # account to retrieve
816
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
817
+ # will be added to the HTTP request.
818
+ #
819
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
820
+ #
821
+ def get_data_lake_store_account_with_http_info(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
822
+ get_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value!
823
+ end
824
+
825
+ #
826
+ # Gets the specified Data Lake Store account details in the specified Data Lake
827
+ # Analytics account.
828
+ #
829
+ # @param resource_group_name [String] The name of the Azure resource group that
830
+ # contains the Data Lake Analytics account.
831
+ # @param account_name [String] The name of the Data Lake Analytics account from
832
+ # which to retrieve the Data Lake Store account details.
833
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
834
+ # account to retrieve
835
+ # @param [Hash{String => String}] A hash of custom headers that will be added
836
+ # to the HTTP request.
837
+ #
838
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
839
+ #
840
+ def get_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
841
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
842
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
843
+ fail ArgumentError, 'data_lake_store_account_name is nil' if data_lake_store_account_name.nil?
844
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
845
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
846
+
847
+
848
+ request_headers = {}
849
+
850
+ # Set Headers
851
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
852
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
853
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
854
+
855
+ request_url = @base_url || @client.base_url
856
+
857
+ options = {
858
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
859
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
860
+ query_params: {'api-version' => @client.api_version},
861
+ headers: request_headers.merge(custom_headers || {}),
862
+ base_url: request_url
863
+ }
864
+ promise = @client.make_request_async(:get, path_template, options)
865
+
866
+ promise = promise.then do |result|
867
+ http_response = result.response
868
+ status_code = http_response.status
869
+ response_content = http_response.body
870
+ unless status_code == 200
871
+ error_model = JSON.load(response_content)
872
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
873
+ end
874
+
875
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
876
+ # Deserialize Response
877
+ if status_code == 200
878
+ begin
879
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
880
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeStoreAccountInfo.mapper()
881
+ result.body = @client.deserialize(result_mapper, parsed_response)
882
+ rescue Exception => e
883
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
884
+ end
885
+ end
886
+
887
+ result
888
+ end
889
+
890
+ promise.execute
891
+ end
892
+
893
+ #
894
+ # Updates the Data Lake Analytics account specified to remove the specified
895
+ # Data Lake Store account.
896
+ #
897
+ # @param resource_group_name [String] The name of the Azure resource group that
898
+ # contains the Data Lake Analytics account.
899
+ # @param account_name [String] The name of the Data Lake Analytics account from
900
+ # which to remove the Data Lake Store account.
901
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
902
+ # account to remove
903
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
904
+ # will be added to the HTTP request.
905
+ #
906
+ #
907
+ def delete_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
908
+ response = delete_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value!
909
+ nil
910
+ end
911
+
912
+ #
913
+ # Updates the Data Lake Analytics account specified to remove the specified
914
+ # Data Lake Store account.
915
+ #
916
+ # @param resource_group_name [String] The name of the Azure resource group that
917
+ # contains the Data Lake Analytics account.
918
+ # @param account_name [String] The name of the Data Lake Analytics account from
919
+ # which to remove the Data Lake Store account.
920
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
921
+ # account to remove
922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
923
+ # will be added to the HTTP request.
924
+ #
925
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
926
+ #
927
+ def delete_data_lake_store_account_with_http_info(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
928
+ delete_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers).value!
929
+ end
930
+
931
+ #
932
+ # Updates the Data Lake Analytics account specified to remove the specified
933
+ # Data Lake Store account.
934
+ #
935
+ # @param resource_group_name [String] The name of the Azure resource group that
936
+ # contains the Data Lake Analytics account.
937
+ # @param account_name [String] The name of the Data Lake Analytics account from
938
+ # which to remove the Data Lake Store account.
939
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
940
+ # account to remove
941
+ # @param [Hash{String => String}] A hash of custom headers that will be added
942
+ # to the HTTP request.
943
+ #
944
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
945
+ #
946
+ def delete_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, custom_headers = nil)
947
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
948
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
949
+ fail ArgumentError, 'data_lake_store_account_name is nil' if data_lake_store_account_name.nil?
950
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
951
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
952
+
953
+
954
+ request_headers = {}
955
+
956
+ # Set Headers
957
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
958
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
959
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
960
+
961
+ request_url = @base_url || @client.base_url
962
+
963
+ options = {
964
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
965
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
966
+ query_params: {'api-version' => @client.api_version},
967
+ headers: request_headers.merge(custom_headers || {}),
968
+ base_url: request_url
969
+ }
970
+ promise = @client.make_request_async(:delete, path_template, options)
971
+
972
+ promise = promise.then do |result|
973
+ http_response = result.response
974
+ status_code = http_response.status
975
+ response_content = http_response.body
976
+ unless status_code == 200
977
+ error_model = JSON.load(response_content)
978
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
979
+ end
980
+
981
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
982
+
983
+ result
984
+ end
985
+
986
+ promise.execute
987
+ end
988
+
989
+ #
990
+ # Updates the specified Data Lake Analytics account to include the additional
991
+ # Data Lake Store account.
992
+ #
993
+ # @param resource_group_name [String] The name of the Azure resource group that
994
+ # contains the Data Lake Analytics account.
995
+ # @param account_name [String] The name of the Data Lake Analytics account to
996
+ # which to add the Data Lake Store account.
997
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
998
+ # account to add.
999
+ # @param parameters [AddDataLakeStoreParameters] The details of the Data Lake
1000
+ # Store account.
1001
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1002
+ # will be added to the HTTP request.
1003
+ #
1004
+ #
1005
+ def add_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers = nil)
1006
+ response = add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers).value!
1007
+ nil
1008
+ end
1009
+
1010
+ #
1011
+ # Updates the specified Data Lake Analytics account to include the additional
1012
+ # Data Lake Store account.
1013
+ #
1014
+ # @param resource_group_name [String] The name of the Azure resource group that
1015
+ # contains the Data Lake Analytics account.
1016
+ # @param account_name [String] The name of the Data Lake Analytics account to
1017
+ # which to add the Data Lake Store account.
1018
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
1019
+ # account to add.
1020
+ # @param parameters [AddDataLakeStoreParameters] The details of the Data Lake
1021
+ # Store account.
1022
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1023
+ # will be added to the HTTP request.
1024
+ #
1025
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1026
+ #
1027
+ def add_data_lake_store_account_with_http_info(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers = nil)
1028
+ add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers).value!
1029
+ end
1030
+
1031
+ #
1032
+ # Updates the specified Data Lake Analytics account to include the additional
1033
+ # Data Lake Store account.
1034
+ #
1035
+ # @param resource_group_name [String] The name of the Azure resource group that
1036
+ # contains the Data Lake Analytics account.
1037
+ # @param account_name [String] The name of the Data Lake Analytics account to
1038
+ # which to add the Data Lake Store account.
1039
+ # @param data_lake_store_account_name [String] The name of the Data Lake Store
1040
+ # account to add.
1041
+ # @param parameters [AddDataLakeStoreParameters] The details of the Data Lake
1042
+ # Store account.
1043
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1044
+ # to the HTTP request.
1045
+ #
1046
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1047
+ #
1048
+ def add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers = nil)
1049
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1050
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1051
+ fail ArgumentError, 'data_lake_store_account_name is nil' if data_lake_store_account_name.nil?
1052
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1053
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1054
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1055
+
1056
+
1057
+ request_headers = {}
1058
+
1059
+ # Set Headers
1060
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1061
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1062
+
1063
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1064
+
1065
+ # Serialize Request
1066
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::AddDataLakeStoreParameters.mapper()
1067
+ request_content = @client.serialize(request_mapper, parameters)
1068
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1069
+
1070
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
1071
+
1072
+ request_url = @base_url || @client.base_url
1073
+
1074
+ options = {
1075
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1076
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
1077
+ query_params: {'api-version' => @client.api_version},
1078
+ body: request_content,
1079
+ headers: request_headers.merge(custom_headers || {}),
1080
+ base_url: request_url
1081
+ }
1082
+ promise = @client.make_request_async(:put, path_template, options)
1083
+
1084
+ promise = promise.then do |result|
1085
+ http_response = result.response
1086
+ status_code = http_response.status
1087
+ response_content = http_response.body
1088
+ unless status_code == 200
1089
+ error_model = JSON.load(response_content)
1090
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1091
+ end
1092
+
1093
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1094
+
1095
+ result
1096
+ end
1097
+
1098
+ promise.execute
1099
+ end
1100
+
1101
+ #
1102
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1103
+ # specified Data Lake Analytics account. The response includes a link to the
1104
+ # next page, if any.
1105
+ #
1106
+ # @param resource_group_name [String] The name of the Azure resource group that
1107
+ # contains the Data Lake Analytics account.
1108
+ # @param account_name [String] The name of the Data Lake Analytics account for
1109
+ # which to list Azure Storage accounts.
1110
+ # @param filter [String] The OData filter. Optional.
1111
+ # @param top [Integer] The number of items to return. Optional.
1112
+ # @param skip [Integer] The number of items to skip over before returning
1113
+ # elements. Optional.
1114
+ # @param expand [String] OData expansion. Expand related resources in line with
1115
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1116
+ # Product data in line with each Category entry. Optional.
1117
+ # @param select [String] OData Select statement. Limits the properties on each
1118
+ # entry to just those requested, e.g.
1119
+ # Categories?$select=CategoryName,Description. Optional.
1120
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1121
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1122
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1123
+ # desc. Optional.
1124
+ # @param count [Boolean] The Boolean value of true or false to request a count
1125
+ # of the matching resources included with the resources in the response, e.g.
1126
+ # Categories?$count=true. Optional.
1127
+ # @param search [String] A free form search. A free-text search expression to
1128
+ # match for whether a particular entry should be included in the feed, e.g.
1129
+ # Categories?$search=blue OR green. Optional.
1130
+ # @param format [String] The desired return format. Return the response in
1131
+ # particular formatxii without access to request headers for standard
1132
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1134
+ # will be added to the HTTP request.
1135
+ #
1136
+ # @return [Array<StorageAccountInfo>] operation results.
1137
+ #
1138
+ def list_storage_accounts(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1139
+ first_page = list_storage_accounts_as_lazy(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
1140
+ first_page.get_all_items
1141
+ end
1142
+
1143
+ #
1144
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1145
+ # specified Data Lake Analytics account. The response includes a link to the
1146
+ # next page, if any.
1147
+ #
1148
+ # @param resource_group_name [String] The name of the Azure resource group that
1149
+ # contains the Data Lake Analytics account.
1150
+ # @param account_name [String] The name of the Data Lake Analytics account for
1151
+ # which to list Azure Storage accounts.
1152
+ # @param filter [String] The OData filter. Optional.
1153
+ # @param top [Integer] The number of items to return. Optional.
1154
+ # @param skip [Integer] The number of items to skip over before returning
1155
+ # elements. Optional.
1156
+ # @param expand [String] OData expansion. Expand related resources in line with
1157
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1158
+ # Product data in line with each Category entry. Optional.
1159
+ # @param select [String] OData Select statement. Limits the properties on each
1160
+ # entry to just those requested, e.g.
1161
+ # Categories?$select=CategoryName,Description. Optional.
1162
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1163
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1164
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1165
+ # desc. Optional.
1166
+ # @param count [Boolean] The Boolean value of true or false to request a count
1167
+ # of the matching resources included with the resources in the response, e.g.
1168
+ # Categories?$count=true. Optional.
1169
+ # @param search [String] A free form search. A free-text search expression to
1170
+ # match for whether a particular entry should be included in the feed, e.g.
1171
+ # Categories?$search=blue OR green. Optional.
1172
+ # @param format [String] The desired return format. Return the response in
1173
+ # particular formatxii without access to request headers for standard
1174
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1175
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1176
+ # will be added to the HTTP request.
1177
+ #
1178
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1179
+ #
1180
+ def list_storage_accounts_with_http_info(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1181
+ list_storage_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1182
+ end
1183
+
1184
+ #
1185
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1186
+ # specified Data Lake Analytics account. The response includes a link to the
1187
+ # next page, if any.
1188
+ #
1189
+ # @param resource_group_name [String] The name of the Azure resource group that
1190
+ # contains the Data Lake Analytics account.
1191
+ # @param account_name [String] The name of the Data Lake Analytics account for
1192
+ # which to list Azure Storage accounts.
1193
+ # @param filter [String] The OData filter. Optional.
1194
+ # @param top [Integer] The number of items to return. Optional.
1195
+ # @param skip [Integer] The number of items to skip over before returning
1196
+ # elements. Optional.
1197
+ # @param expand [String] OData expansion. Expand related resources in line with
1198
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1199
+ # Product data in line with each Category entry. Optional.
1200
+ # @param select [String] OData Select statement. Limits the properties on each
1201
+ # entry to just those requested, e.g.
1202
+ # Categories?$select=CategoryName,Description. Optional.
1203
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1204
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1205
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1206
+ # desc. Optional.
1207
+ # @param count [Boolean] The Boolean value of true or false to request a count
1208
+ # of the matching resources included with the resources in the response, e.g.
1209
+ # Categories?$count=true. Optional.
1210
+ # @param search [String] A free form search. A free-text search expression to
1211
+ # match for whether a particular entry should be included in the feed, e.g.
1212
+ # Categories?$search=blue OR green. Optional.
1213
+ # @param format [String] The desired return format. Return the response in
1214
+ # particular formatxii without access to request headers for standard
1215
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1216
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1217
+ # to the HTTP request.
1218
+ #
1219
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1220
+ #
1221
+ def list_storage_accounts_async(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1222
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1223
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1224
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1225
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1226
+
1227
+
1228
+ request_headers = {}
1229
+
1230
+ # Set Headers
1231
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1232
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1233
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/'
1234
+
1235
+ request_url = @base_url || @client.base_url
1236
+
1237
+ options = {
1238
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1239
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1240
+ 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},
1241
+ headers: request_headers.merge(custom_headers || {}),
1242
+ base_url: request_url
1243
+ }
1244
+ promise = @client.make_request_async(:get, path_template, options)
1245
+
1246
+ promise = promise.then do |result|
1247
+ http_response = result.response
1248
+ status_code = http_response.status
1249
+ response_content = http_response.body
1250
+ unless status_code == 200
1251
+ error_model = JSON.load(response_content)
1252
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1253
+ end
1254
+
1255
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1256
+ # Deserialize Response
1257
+ if status_code == 200
1258
+ begin
1259
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1260
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListStorageAccountsResult.mapper()
1261
+ result.body = @client.deserialize(result_mapper, parsed_response)
1262
+ rescue Exception => e
1263
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1264
+ end
1265
+ end
1266
+
1267
+ result
1268
+ end
1269
+
1270
+ promise.execute
1271
+ end
1272
+
1273
+ #
1274
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
1275
+ # Lake Analytics account. The response includes a link to the next page, if
1276
+ # any.
1277
+ #
1278
+ # @param resource_group_name [String] The name of the Azure resource group that
1279
+ # contains the Data Lake Analytics account.
1280
+ # @param account_name [String] The name of the Data Lake Analytics account for
1281
+ # which to list Data Lake Store accounts.
1282
+ # @param filter [String] OData filter. Optional.
1283
+ # @param top [Integer] The number of items to return. Optional.
1284
+ # @param skip [Integer] The number of items to skip over before returning
1285
+ # elements. Optional.
1286
+ # @param expand [String] OData expansion. Expand related resources in line with
1287
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1288
+ # Product data in line with each Category entry. Optional.
1289
+ # @param select [String] OData Select statement. Limits the properties on each
1290
+ # entry to just those requested, e.g.
1291
+ # Categories?$select=CategoryName,Description. Optional.
1292
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1293
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1294
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1295
+ # desc. Optional.
1296
+ # @param count [Boolean] The Boolean value of true or false to request a count
1297
+ # of the matching resources included with the resources in the response, e.g.
1298
+ # Categories?$count=true. Optional.
1299
+ # @param search [String] A free form search. A free-text search expression to
1300
+ # match for whether a particular entry should be included in the feed, e.g.
1301
+ # Categories?$search=blue OR green. Optional.
1302
+ # @param format [String] The desired return format. Return the response in
1303
+ # particular formatxii without access to request headers for standard
1304
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1306
+ # will be added to the HTTP request.
1307
+ #
1308
+ # @return [Array<DataLakeStoreAccountInfo>] operation results.
1309
+ #
1310
+ def list_data_lake_store_accounts(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1311
+ first_page = list_data_lake_store_accounts_as_lazy(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
1312
+ first_page.get_all_items
1313
+ end
1314
+
1315
+ #
1316
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
1317
+ # Lake Analytics account. The response includes a link to the next page, if
1318
+ # any.
1319
+ #
1320
+ # @param resource_group_name [String] The name of the Azure resource group that
1321
+ # contains the Data Lake Analytics account.
1322
+ # @param account_name [String] The name of the Data Lake Analytics account for
1323
+ # which to list Data Lake Store accounts.
1324
+ # @param filter [String] OData filter. Optional.
1325
+ # @param top [Integer] The number of items to return. Optional.
1326
+ # @param skip [Integer] The number of items to skip over before returning
1327
+ # elements. Optional.
1328
+ # @param expand [String] OData expansion. Expand related resources in line with
1329
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1330
+ # Product data in line with each Category entry. Optional.
1331
+ # @param select [String] OData Select statement. Limits the properties on each
1332
+ # entry to just those requested, e.g.
1333
+ # Categories?$select=CategoryName,Description. Optional.
1334
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1335
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1336
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1337
+ # desc. Optional.
1338
+ # @param count [Boolean] The Boolean value of true or false to request a count
1339
+ # of the matching resources included with the resources in the response, e.g.
1340
+ # Categories?$count=true. Optional.
1341
+ # @param search [String] A free form search. A free-text search expression to
1342
+ # match for whether a particular entry should be included in the feed, e.g.
1343
+ # Categories?$search=blue OR green. Optional.
1344
+ # @param format [String] The desired return format. Return the response in
1345
+ # particular formatxii without access to request headers for standard
1346
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1347
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1348
+ # will be added to the HTTP request.
1349
+ #
1350
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1351
+ #
1352
+ def list_data_lake_store_accounts_with_http_info(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1353
+ list_data_lake_store_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1354
+ end
1355
+
1356
+ #
1357
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
1358
+ # Lake Analytics account. The response includes a link to the next page, if
1359
+ # any.
1360
+ #
1361
+ # @param resource_group_name [String] The name of the Azure resource group that
1362
+ # contains the Data Lake Analytics account.
1363
+ # @param account_name [String] The name of the Data Lake Analytics account for
1364
+ # which to list Data Lake Store accounts.
1365
+ # @param filter [String] OData filter. Optional.
1366
+ # @param top [Integer] The number of items to return. Optional.
1367
+ # @param skip [Integer] The number of items to skip over before returning
1368
+ # elements. Optional.
1369
+ # @param expand [String] OData expansion. Expand related resources in line with
1370
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1371
+ # Product data in line with each Category entry. Optional.
1372
+ # @param select [String] OData Select statement. Limits the properties on each
1373
+ # entry to just those requested, e.g.
1374
+ # Categories?$select=CategoryName,Description. Optional.
1375
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1376
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1377
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1378
+ # desc. Optional.
1379
+ # @param count [Boolean] The Boolean value of true or false to request a count
1380
+ # of the matching resources included with the resources in the response, e.g.
1381
+ # Categories?$count=true. Optional.
1382
+ # @param search [String] A free form search. A free-text search expression to
1383
+ # match for whether a particular entry should be included in the feed, e.g.
1384
+ # Categories?$search=blue OR green. Optional.
1385
+ # @param format [String] The desired return format. Return the response in
1386
+ # particular formatxii without access to request headers for standard
1387
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1388
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1389
+ # to the HTTP request.
1390
+ #
1391
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1392
+ #
1393
+ def list_data_lake_store_accounts_async(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1394
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1395
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1396
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1397
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1398
+
1399
+
1400
+ request_headers = {}
1401
+
1402
+ # Set Headers
1403
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1404
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1405
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/'
1406
+
1407
+ request_url = @base_url || @client.base_url
1408
+
1409
+ options = {
1410
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1411
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1412
+ 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},
1413
+ headers: request_headers.merge(custom_headers || {}),
1414
+ base_url: request_url
1415
+ }
1416
+ promise = @client.make_request_async(:get, path_template, options)
1417
+
1418
+ promise = promise.then do |result|
1419
+ http_response = result.response
1420
+ status_code = http_response.status
1421
+ response_content = http_response.body
1422
+ unless status_code == 200
1423
+ error_model = JSON.load(response_content)
1424
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1425
+ end
1426
+
1427
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1428
+ # Deserialize Response
1429
+ if status_code == 200
1430
+ begin
1431
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1432
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListDataLakeStoreResult.mapper()
1433
+ result.body = @client.deserialize(result_mapper, parsed_response)
1434
+ rescue Exception => e
1435
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1436
+ end
1437
+ end
1438
+
1439
+ result
1440
+ end
1441
+
1442
+ promise.execute
1443
+ end
1444
+
1445
+ #
1446
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
1447
+ # specific resource group. This includes a link to the next page, if any.
1448
+ #
1449
+ # @param resource_group_name [String] The name of the Azure resource group that
1450
+ # contains the Data Lake Analytics account.
1451
+ # @param filter [String] OData filter. Optional.
1452
+ # @param top [Integer] The number of items to return. Optional.
1453
+ # @param skip [Integer] The number of items to skip over before returning
1454
+ # elements. Optional.
1455
+ # @param expand [String] OData expansion. Expand related resources in line with
1456
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1457
+ # Product data in line with each Category entry. Optional.
1458
+ # @param select [String] OData Select statement. Limits the properties on each
1459
+ # entry to just those requested, e.g.
1460
+ # Categories?$select=CategoryName,Description. Optional.
1461
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1462
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1463
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1464
+ # desc. Optional.
1465
+ # @param count [Boolean] The Boolean value of true or false to request a count
1466
+ # of the matching resources included with the resources in the response, e.g.
1467
+ # Categories?$count=true. Optional.
1468
+ # @param search [String] A free form search. A free-text search expression to
1469
+ # match for whether a particular entry should be included in the feed, e.g.
1470
+ # Categories?$search=blue OR green. Optional.
1471
+ # @param format [String] The return format. Return the response in particular
1472
+ # formatxii without access to request headers for standard content-type
1473
+ # negotiation (e.g Orders?$format=json). Optional.
1474
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1475
+ # will be added to the HTTP request.
1476
+ #
1477
+ # @return [Array<DataLakeAnalyticsAccount>] operation results.
1478
+ #
1479
+ 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)
1480
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
1481
+ first_page.get_all_items
1482
+ end
1483
+
1484
+ #
1485
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
1486
+ # specific resource group. This includes a link to the next page, if any.
1487
+ #
1488
+ # @param resource_group_name [String] The name of the Azure resource group that
1489
+ # contains the Data Lake Analytics account.
1490
+ # @param filter [String] OData filter. Optional.
1491
+ # @param top [Integer] The number of items to return. Optional.
1492
+ # @param skip [Integer] The number of items to skip over before returning
1493
+ # elements. Optional.
1494
+ # @param expand [String] OData expansion. Expand related resources in line with
1495
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1496
+ # Product data in line with each Category entry. Optional.
1497
+ # @param select [String] OData Select statement. Limits the properties on each
1498
+ # entry to just those requested, e.g.
1499
+ # Categories?$select=CategoryName,Description. Optional.
1500
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1501
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1502
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1503
+ # desc. Optional.
1504
+ # @param count [Boolean] The Boolean value of true or false to request a count
1505
+ # of the matching resources included with the resources in the response, e.g.
1506
+ # Categories?$count=true. Optional.
1507
+ # @param search [String] A free form search. A free-text search expression to
1508
+ # match for whether a particular entry should be included in the feed, e.g.
1509
+ # Categories?$search=blue OR green. Optional.
1510
+ # @param format [String] The return format. Return the response in particular
1511
+ # formatxii without access to request headers for standard content-type
1512
+ # negotiation (e.g Orders?$format=json). Optional.
1513
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1514
+ # will be added to the HTTP request.
1515
+ #
1516
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1517
+ #
1518
+ 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)
1519
+ list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1520
+ end
1521
+
1522
+ #
1523
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
1524
+ # specific resource group. This includes a link to the next page, if any.
1525
+ #
1526
+ # @param resource_group_name [String] The name of the Azure resource group that
1527
+ # contains the Data Lake Analytics account.
1528
+ # @param filter [String] OData filter. Optional.
1529
+ # @param top [Integer] The number of items to return. Optional.
1530
+ # @param skip [Integer] The number of items to skip over before returning
1531
+ # elements. Optional.
1532
+ # @param expand [String] OData expansion. Expand related resources in line with
1533
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1534
+ # Product data in line with each Category entry. Optional.
1535
+ # @param select [String] OData Select statement. Limits the properties on each
1536
+ # entry to just those requested, e.g.
1537
+ # Categories?$select=CategoryName,Description. Optional.
1538
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1539
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1540
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1541
+ # desc. Optional.
1542
+ # @param count [Boolean] The Boolean value of true or false to request a count
1543
+ # of the matching resources included with the resources in the response, e.g.
1544
+ # Categories?$count=true. Optional.
1545
+ # @param search [String] A free form search. A free-text search expression to
1546
+ # match for whether a particular entry should be included in the feed, e.g.
1547
+ # Categories?$search=blue OR green. Optional.
1548
+ # @param format [String] The return format. Return the response in particular
1549
+ # formatxii without access to request headers for standard content-type
1550
+ # negotiation (e.g Orders?$format=json). Optional.
1551
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1552
+ # to the HTTP request.
1553
+ #
1554
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1555
+ #
1556
+ 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)
1557
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1558
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1559
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1560
+
1561
+
1562
+ request_headers = {}
1563
+
1564
+ # Set Headers
1565
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1566
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1567
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts'
1568
+
1569
+ request_url = @base_url || @client.base_url
1570
+
1571
+ options = {
1572
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1573
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1574
+ 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},
1575
+ headers: request_headers.merge(custom_headers || {}),
1576
+ base_url: request_url
1577
+ }
1578
+ promise = @client.make_request_async(:get, path_template, options)
1579
+
1580
+ promise = promise.then do |result|
1581
+ http_response = result.response
1582
+ status_code = http_response.status
1583
+ response_content = http_response.body
1584
+ unless status_code == 200
1585
+ error_model = JSON.load(response_content)
1586
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1587
+ end
1588
+
1589
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1590
+ # Deserialize Response
1591
+ if status_code == 200
1592
+ begin
1593
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1594
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListResult.mapper()
1595
+ result.body = @client.deserialize(result_mapper, parsed_response)
1596
+ rescue Exception => e
1597
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1598
+ end
1599
+ end
1600
+
1601
+ result
1602
+ end
1603
+
1604
+ promise.execute
1605
+ end
1606
+
1607
+ #
1608
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
1609
+ # current subscription. This includes a link to the next page, if any.
1610
+ #
1611
+ # @param filter [String] OData filter. Optional.
1612
+ # @param top [Integer] The number of items to return. Optional.
1613
+ # @param skip [Integer] The number of items to skip over before returning
1614
+ # elements. Optional.
1615
+ # @param expand [String] OData expansion. Expand related resources in line with
1616
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1617
+ # Product data in line with each Category entry. Optional.
1618
+ # @param select [String] OData Select statement. Limits the properties on each
1619
+ # entry to just those requested, e.g.
1620
+ # Categories?$select=CategoryName,Description. Optional.
1621
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1622
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1623
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1624
+ # desc. Optional.
1625
+ # @param count [Boolean] The Boolean value of true or false to request a count
1626
+ # of the matching resources included with the resources in the response, e.g.
1627
+ # Categories?$count=true. Optional.
1628
+ # @param search [String] A free form search. A free-text search expression to
1629
+ # match for whether a particular entry should be included in the feed, e.g.
1630
+ # Categories?$search=blue OR green. Optional.
1631
+ # @param format [String] The desired return format. Return the response in
1632
+ # particular formatxii without access to request headers for standard
1633
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1635
+ # will be added to the HTTP request.
1636
+ #
1637
+ # @return [Array<DataLakeAnalyticsAccount>] operation results.
1638
+ #
1639
+ def list(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1640
+ first_page = list_as_lazy(filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
1641
+ first_page.get_all_items
1642
+ end
1643
+
1644
+ #
1645
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
1646
+ # current subscription. This includes a link to the next page, if any.
1647
+ #
1648
+ # @param filter [String] OData filter. Optional.
1649
+ # @param top [Integer] The number of items to return. Optional.
1650
+ # @param skip [Integer] The number of items to skip over before returning
1651
+ # elements. Optional.
1652
+ # @param expand [String] OData expansion. Expand related resources in line with
1653
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1654
+ # Product data in line with each Category entry. Optional.
1655
+ # @param select [String] OData Select statement. Limits the properties on each
1656
+ # entry to just those requested, e.g.
1657
+ # Categories?$select=CategoryName,Description. Optional.
1658
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1659
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1660
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1661
+ # desc. Optional.
1662
+ # @param count [Boolean] The Boolean value of true or false to request a count
1663
+ # of the matching resources included with the resources in the response, e.g.
1664
+ # Categories?$count=true. Optional.
1665
+ # @param search [String] A free form search. A free-text search expression to
1666
+ # match for whether a particular entry should be included in the feed, e.g.
1667
+ # Categories?$search=blue OR green. Optional.
1668
+ # @param format [String] The desired return format. Return the response in
1669
+ # particular formatxii without access to request headers for standard
1670
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1671
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1672
+ # will be added to the HTTP request.
1673
+ #
1674
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1675
+ #
1676
+ 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)
1677
+ list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1678
+ end
1679
+
1680
+ #
1681
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
1682
+ # current subscription. This includes a link to the next page, if any.
1683
+ #
1684
+ # @param filter [String] OData filter. Optional.
1685
+ # @param top [Integer] The number of items to return. Optional.
1686
+ # @param skip [Integer] The number of items to skip over before returning
1687
+ # elements. Optional.
1688
+ # @param expand [String] OData expansion. Expand related resources in line with
1689
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
1690
+ # Product data in line with each Category entry. Optional.
1691
+ # @param select [String] OData Select statement. Limits the properties on each
1692
+ # entry to just those requested, e.g.
1693
+ # Categories?$select=CategoryName,Description. Optional.
1694
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1695
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1696
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1697
+ # desc. Optional.
1698
+ # @param count [Boolean] The Boolean value of true or false to request a count
1699
+ # of the matching resources included with the resources in the response, e.g.
1700
+ # Categories?$count=true. Optional.
1701
+ # @param search [String] A free form search. A free-text search expression to
1702
+ # match for whether a particular entry should be included in the feed, e.g.
1703
+ # Categories?$search=blue OR green. Optional.
1704
+ # @param format [String] The desired return format. Return the response in
1705
+ # particular formatxii without access to request headers for standard
1706
+ # content-type negotiation (e.g Orders?$format=json). Optional.
1707
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1708
+ # to the HTTP request.
1709
+ #
1710
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1711
+ #
1712
+ def list_async(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1713
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1714
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1715
+
1716
+
1717
+ request_headers = {}
1718
+
1719
+ # Set Headers
1720
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1721
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1722
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts'
1723
+
1724
+ request_url = @base_url || @client.base_url
1725
+
1726
+ options = {
1727
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1728
+ path_params: {'subscriptionId' => @client.subscription_id},
1729
+ 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},
1730
+ headers: request_headers.merge(custom_headers || {}),
1731
+ base_url: request_url
1732
+ }
1733
+ promise = @client.make_request_async(:get, path_template, options)
1734
+
1735
+ promise = promise.then do |result|
1736
+ http_response = result.response
1737
+ status_code = http_response.status
1738
+ response_content = http_response.body
1739
+ unless status_code == 200
1740
+ error_model = JSON.load(response_content)
1741
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1742
+ end
1743
+
1744
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1745
+ # Deserialize Response
1746
+ if status_code == 200
1747
+ begin
1748
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1749
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListResult.mapper()
1750
+ result.body = @client.deserialize(result_mapper, parsed_response)
1751
+ rescue Exception => e
1752
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1753
+ end
1754
+ end
1755
+
1756
+ result
1757
+ end
1758
+
1759
+ promise.execute
1760
+ end
1761
+
1762
+ #
1763
+ # Gets details of the specified Data Lake Analytics account.
1764
+ #
1765
+ # @param resource_group_name [String] The name of the Azure resource group that
1766
+ # contains the Data Lake Analytics account.
1767
+ # @param account_name [String] The name of the Data Lake Analytics account to
1768
+ # retrieve.
1769
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1770
+ # will be added to the HTTP request.
1771
+ #
1772
+ # @return [DataLakeAnalyticsAccount] operation results.
1773
+ #
1774
+ def get(resource_group_name, account_name, custom_headers = nil)
1775
+ response = get_async(resource_group_name, account_name, custom_headers).value!
1776
+ response.body unless response.nil?
1777
+ end
1778
+
1779
+ #
1780
+ # Gets details of the specified Data Lake Analytics account.
1781
+ #
1782
+ # @param resource_group_name [String] The name of the Azure resource group that
1783
+ # contains the Data Lake Analytics account.
1784
+ # @param account_name [String] The name of the Data Lake Analytics account to
1785
+ # retrieve.
1786
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1787
+ # will be added to the HTTP request.
1788
+ #
1789
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1790
+ #
1791
+ def get_with_http_info(resource_group_name, account_name, custom_headers = nil)
1792
+ get_async(resource_group_name, account_name, custom_headers).value!
1793
+ end
1794
+
1795
+ #
1796
+ # Gets details of the specified Data Lake Analytics account.
1797
+ #
1798
+ # @param resource_group_name [String] The name of the Azure resource group that
1799
+ # contains the Data Lake Analytics account.
1800
+ # @param account_name [String] The name of the Data Lake Analytics account to
1801
+ # retrieve.
1802
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1803
+ # to the HTTP request.
1804
+ #
1805
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1806
+ #
1807
+ def get_async(resource_group_name, account_name, custom_headers = nil)
1808
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1809
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1810
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1811
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1812
+
1813
+
1814
+ request_headers = {}
1815
+
1816
+ # Set Headers
1817
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1818
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1819
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'
1820
+
1821
+ request_url = @base_url || @client.base_url
1822
+
1823
+ options = {
1824
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1825
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1826
+ query_params: {'api-version' => @client.api_version},
1827
+ headers: request_headers.merge(custom_headers || {}),
1828
+ base_url: request_url
1829
+ }
1830
+ promise = @client.make_request_async(:get, path_template, options)
1831
+
1832
+ promise = promise.then do |result|
1833
+ http_response = result.response
1834
+ status_code = http_response.status
1835
+ response_content = http_response.body
1836
+ unless status_code == 200
1837
+ error_model = JSON.load(response_content)
1838
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1839
+ end
1840
+
1841
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1842
+ # Deserialize Response
1843
+ if status_code == 200
1844
+ begin
1845
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1846
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
1847
+ result.body = @client.deserialize(result_mapper, parsed_response)
1848
+ rescue Exception => e
1849
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1850
+ end
1851
+ end
1852
+
1853
+ result
1854
+ end
1855
+
1856
+ promise.execute
1857
+ end
1858
+
1859
+ #
1860
+ # Begins the delete delete process for the Data Lake Analytics account object
1861
+ # specified by the account name.
1862
+ #
1863
+ # @param resource_group_name [String] The name of the Azure resource group that
1864
+ # contains the Data Lake Analytics account.
1865
+ # @param account_name [String] The name of the Data Lake Analytics account to
1866
+ # delete
1867
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1868
+ # will be added to the HTTP request.
1869
+ #
1870
+ def delete(resource_group_name, account_name, custom_headers = nil)
1871
+ response = delete_async(resource_group_name, account_name, custom_headers).value!
1872
+ nil
1873
+ end
1874
+
1875
+ #
1876
+ # @param resource_group_name [String] The name of the Azure resource group that
1877
+ # contains the Data Lake Analytics account.
1878
+ # @param account_name [String] The name of the Data Lake Analytics account to
1879
+ # delete
1880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1881
+ # will be added to the HTTP request.
1882
+ #
1883
+ # @return [Concurrent::Promise] promise which provides async access to http
1884
+ # response.
1885
+ #
1886
+ def delete_async(resource_group_name, account_name, custom_headers = nil)
1887
+ # Send request
1888
+ promise = begin_delete_async(resource_group_name, account_name, custom_headers)
1889
+
1890
+ promise = promise.then do |response|
1891
+ # Defining deserialization method.
1892
+ deserialize_method = lambda do |parsed_response|
1893
+ end
1894
+
1895
+ # Waiting for response.
1896
+ @client.get_long_running_operation_result(response, deserialize_method)
1897
+ end
1898
+
1899
+ promise
1900
+ end
1901
+
1902
+ #
1903
+ # Creates the specified Data Lake Analytics account. This supplies the user
1904
+ # with computation services for Data Lake Analytics workloads
1905
+ #
1906
+ # @param resource_group_name [String] The name of the Azure resource group that
1907
+ # contains the Data Lake Analytics account.the account will be associated with.
1908
+ # @param name [String] The name of the Data Lake Analytics account to create.
1909
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
1910
+ # create Data Lake Analytics account operation.
1911
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1912
+ # will be added to the HTTP request.
1913
+ #
1914
+ # @return [DataLakeAnalyticsAccount] operation results.
1915
+ #
1916
+ def create(resource_group_name, name, parameters, custom_headers = nil)
1917
+ response = create_async(resource_group_name, name, parameters, custom_headers).value!
1918
+ response.body unless response.nil?
1919
+ end
1920
+
1921
+ #
1922
+ # @param resource_group_name [String] The name of the Azure resource group that
1923
+ # contains the Data Lake Analytics account.the account will be associated with.
1924
+ # @param name [String] The name of the Data Lake Analytics account to create.
1925
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
1926
+ # create Data Lake Analytics account operation.
1927
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1928
+ # will be added to the HTTP request.
1929
+ #
1930
+ # @return [Concurrent::Promise] promise which provides async access to http
1931
+ # response.
1932
+ #
1933
+ def create_async(resource_group_name, name, parameters, custom_headers = nil)
1934
+ # Send request
1935
+ promise = begin_create_async(resource_group_name, name, parameters, custom_headers)
1936
+
1937
+ promise = promise.then do |response|
1938
+ # Defining deserialization method.
1939
+ deserialize_method = lambda do |parsed_response|
1940
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
1941
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1942
+ end
1943
+
1944
+ # Waiting for response.
1945
+ @client.get_long_running_operation_result(response, deserialize_method)
1946
+ end
1947
+
1948
+ promise
1949
+ end
1950
+
1951
+ #
1952
+ # Updates the Data Lake Analytics account object specified by the accountName
1953
+ # with the contents of the account object.
1954
+ #
1955
+ # @param resource_group_name [String] The name of the Azure resource group that
1956
+ # contains the Data Lake Analytics account.
1957
+ # @param name [String] The name of the Data Lake Analytics account to update.
1958
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
1959
+ # update Data Lake Analytics account operation.
1960
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1961
+ # will be added to the HTTP request.
1962
+ #
1963
+ # @return [DataLakeAnalyticsAccount] operation results.
1964
+ #
1965
+ def update(resource_group_name, name, parameters, custom_headers = nil)
1966
+ response = update_async(resource_group_name, name, parameters, custom_headers).value!
1967
+ response.body unless response.nil?
1968
+ end
1969
+
1970
+ #
1971
+ # @param resource_group_name [String] The name of the Azure resource group that
1972
+ # contains the Data Lake Analytics account.
1973
+ # @param name [String] The name of the Data Lake Analytics account to update.
1974
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
1975
+ # update Data Lake Analytics account operation.
1976
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1977
+ # will be added to the HTTP request.
1978
+ #
1979
+ # @return [Concurrent::Promise] promise which provides async access to http
1980
+ # response.
1981
+ #
1982
+ def update_async(resource_group_name, name, parameters, custom_headers = nil)
1983
+ # Send request
1984
+ promise = begin_update_async(resource_group_name, name, parameters, custom_headers)
1985
+
1986
+ promise = promise.then do |response|
1987
+ # Defining deserialization method.
1988
+ deserialize_method = lambda do |parsed_response|
1989
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
1990
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1991
+ end
1992
+
1993
+ # Waiting for response.
1994
+ @client.get_long_running_operation_result(response, deserialize_method)
1995
+ end
1996
+
1997
+ promise
1998
+ end
1999
+
2000
+ #
2001
+ # Begins the delete delete process for the Data Lake Analytics account object
2002
+ # specified by the account name.
2003
+ #
2004
+ # @param resource_group_name [String] The name of the Azure resource group that
2005
+ # contains the Data Lake Analytics account.
2006
+ # @param account_name [String] The name of the Data Lake Analytics account to
2007
+ # delete
2008
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2009
+ # will be added to the HTTP request.
2010
+ #
2011
+ #
2012
+ def begin_delete(resource_group_name, account_name, custom_headers = nil)
2013
+ response = begin_delete_async(resource_group_name, account_name, custom_headers).value!
2014
+ nil
2015
+ end
2016
+
2017
+ #
2018
+ # Begins the delete delete process for the Data Lake Analytics account object
2019
+ # specified by the account name.
2020
+ #
2021
+ # @param resource_group_name [String] The name of the Azure resource group that
2022
+ # contains the Data Lake Analytics account.
2023
+ # @param account_name [String] The name of the Data Lake Analytics account to
2024
+ # delete
2025
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2026
+ # will be added to the HTTP request.
2027
+ #
2028
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2029
+ #
2030
+ def begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
2031
+ begin_delete_async(resource_group_name, account_name, custom_headers).value!
2032
+ end
2033
+
2034
+ #
2035
+ # Begins the delete delete process for the Data Lake Analytics account object
2036
+ # specified by the account name.
2037
+ #
2038
+ # @param resource_group_name [String] The name of the Azure resource group that
2039
+ # contains the Data Lake Analytics account.
2040
+ # @param account_name [String] The name of the Data Lake Analytics account to
2041
+ # delete
2042
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2043
+ # to the HTTP request.
2044
+ #
2045
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2046
+ #
2047
+ def begin_delete_async(resource_group_name, account_name, custom_headers = nil)
2048
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2049
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
2050
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2051
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2052
+
2053
+
2054
+ request_headers = {}
2055
+
2056
+ # Set Headers
2057
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2058
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2059
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'
2060
+
2061
+ request_url = @base_url || @client.base_url
2062
+
2063
+ options = {
2064
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2065
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
2066
+ query_params: {'api-version' => @client.api_version},
2067
+ headers: request_headers.merge(custom_headers || {}),
2068
+ base_url: request_url
2069
+ }
2070
+ promise = @client.make_request_async(:delete, path_template, options)
2071
+
2072
+ promise = promise.then do |result|
2073
+ http_response = result.response
2074
+ status_code = http_response.status
2075
+ response_content = http_response.body
2076
+ unless status_code == 200 || status_code == 202 || status_code == 404 || status_code == 204
2077
+ error_model = JSON.load(response_content)
2078
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2079
+ end
2080
+
2081
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2082
+
2083
+ result
2084
+ end
2085
+
2086
+ promise.execute
2087
+ end
2088
+
2089
+ #
2090
+ # Creates the specified Data Lake Analytics account. This supplies the user
2091
+ # with computation services for Data Lake Analytics workloads
2092
+ #
2093
+ # @param resource_group_name [String] The name of the Azure resource group that
2094
+ # contains the Data Lake Analytics account.the account will be associated with.
2095
+ # @param name [String] The name of the Data Lake Analytics account to create.
2096
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2097
+ # create Data Lake Analytics account operation.
2098
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2099
+ # will be added to the HTTP request.
2100
+ #
2101
+ # @return [DataLakeAnalyticsAccount] operation results.
2102
+ #
2103
+ def begin_create(resource_group_name, name, parameters, custom_headers = nil)
2104
+ response = begin_create_async(resource_group_name, name, parameters, custom_headers).value!
2105
+ response.body unless response.nil?
2106
+ end
2107
+
2108
+ #
2109
+ # Creates the specified Data Lake Analytics account. This supplies the user
2110
+ # with computation services for Data Lake Analytics workloads
2111
+ #
2112
+ # @param resource_group_name [String] The name of the Azure resource group that
2113
+ # contains the Data Lake Analytics account.the account will be associated with.
2114
+ # @param name [String] The name of the Data Lake Analytics account to create.
2115
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2116
+ # create Data Lake Analytics account operation.
2117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2118
+ # will be added to the HTTP request.
2119
+ #
2120
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2121
+ #
2122
+ def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
2123
+ begin_create_async(resource_group_name, name, parameters, custom_headers).value!
2124
+ end
2125
+
2126
+ #
2127
+ # Creates the specified Data Lake Analytics account. This supplies the user
2128
+ # with computation services for Data Lake Analytics workloads
2129
+ #
2130
+ # @param resource_group_name [String] The name of the Azure resource group that
2131
+ # contains the Data Lake Analytics account.the account will be associated with.
2132
+ # @param name [String] The name of the Data Lake Analytics account to create.
2133
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2134
+ # create Data Lake Analytics account operation.
2135
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2136
+ # to the HTTP request.
2137
+ #
2138
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2139
+ #
2140
+ def begin_create_async(resource_group_name, name, parameters, custom_headers = nil)
2141
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2142
+ fail ArgumentError, 'name is nil' if name.nil?
2143
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2144
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2145
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2146
+
2147
+
2148
+ request_headers = {}
2149
+
2150
+ # Set Headers
2151
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2152
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2153
+
2154
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2155
+
2156
+ # Serialize Request
2157
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2158
+ request_content = @client.serialize(request_mapper, parameters)
2159
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2160
+
2161
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}'
2162
+
2163
+ request_url = @base_url || @client.base_url
2164
+
2165
+ options = {
2166
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2167
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2168
+ query_params: {'api-version' => @client.api_version},
2169
+ body: request_content,
2170
+ headers: request_headers.merge(custom_headers || {}),
2171
+ base_url: request_url
2172
+ }
2173
+ promise = @client.make_request_async(:put, path_template, options)
2174
+
2175
+ promise = promise.then do |result|
2176
+ http_response = result.response
2177
+ status_code = http_response.status
2178
+ response_content = http_response.body
2179
+ unless status_code == 201 || status_code == 200
2180
+ error_model = JSON.load(response_content)
2181
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2182
+ end
2183
+
2184
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2185
+ # Deserialize Response
2186
+ if status_code == 201
2187
+ begin
2188
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2189
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2190
+ result.body = @client.deserialize(result_mapper, parsed_response)
2191
+ rescue Exception => e
2192
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2193
+ end
2194
+ end
2195
+ # Deserialize Response
2196
+ if status_code == 200
2197
+ begin
2198
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2199
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2200
+ result.body = @client.deserialize(result_mapper, parsed_response)
2201
+ rescue Exception => e
2202
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2203
+ end
2204
+ end
2205
+
2206
+ result
2207
+ end
2208
+
2209
+ promise.execute
2210
+ end
2211
+
2212
+ #
2213
+ # Updates the Data Lake Analytics account object specified by the accountName
2214
+ # with the contents of the account object.
2215
+ #
2216
+ # @param resource_group_name [String] The name of the Azure resource group that
2217
+ # contains the Data Lake Analytics account.
2218
+ # @param name [String] The name of the Data Lake Analytics account to update.
2219
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2220
+ # update Data Lake Analytics account operation.
2221
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2222
+ # will be added to the HTTP request.
2223
+ #
2224
+ # @return [DataLakeAnalyticsAccount] operation results.
2225
+ #
2226
+ def begin_update(resource_group_name, name, parameters, custom_headers = nil)
2227
+ response = begin_update_async(resource_group_name, name, parameters, custom_headers).value!
2228
+ response.body unless response.nil?
2229
+ end
2230
+
2231
+ #
2232
+ # Updates the Data Lake Analytics account object specified by the accountName
2233
+ # with the contents of the account object.
2234
+ #
2235
+ # @param resource_group_name [String] The name of the Azure resource group that
2236
+ # contains the Data Lake Analytics account.
2237
+ # @param name [String] The name of the Data Lake Analytics account to update.
2238
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2239
+ # update Data Lake Analytics account operation.
2240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2241
+ # will be added to the HTTP request.
2242
+ #
2243
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2244
+ #
2245
+ def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
2246
+ begin_update_async(resource_group_name, name, parameters, custom_headers).value!
2247
+ end
2248
+
2249
+ #
2250
+ # Updates the Data Lake Analytics account object specified by the accountName
2251
+ # with the contents of the account object.
2252
+ #
2253
+ # @param resource_group_name [String] The name of the Azure resource group that
2254
+ # contains the Data Lake Analytics account.
2255
+ # @param name [String] The name of the Data Lake Analytics account to update.
2256
+ # @param parameters [DataLakeAnalyticsAccount] Parameters supplied to the
2257
+ # update Data Lake Analytics account operation.
2258
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2259
+ # to the HTTP request.
2260
+ #
2261
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2262
+ #
2263
+ def begin_update_async(resource_group_name, name, parameters, custom_headers = nil)
2264
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2265
+ fail ArgumentError, 'name is nil' if name.nil?
2266
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2267
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2268
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2269
+
2270
+
2271
+ request_headers = {}
2272
+
2273
+ # Set Headers
2274
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2275
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2276
+
2277
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2278
+
2279
+ # Serialize Request
2280
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2281
+ request_content = @client.serialize(request_mapper, parameters)
2282
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2283
+
2284
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}'
2285
+
2286
+ request_url = @base_url || @client.base_url
2287
+
2288
+ options = {
2289
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2290
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2291
+ query_params: {'api-version' => @client.api_version},
2292
+ body: request_content,
2293
+ headers: request_headers.merge(custom_headers || {}),
2294
+ base_url: request_url
2295
+ }
2296
+ promise = @client.make_request_async(:patch, path_template, options)
2297
+
2298
+ promise = promise.then do |result|
2299
+ http_response = result.response
2300
+ status_code = http_response.status
2301
+ response_content = http_response.body
2302
+ unless status_code == 200 || status_code == 201
2303
+ error_model = JSON.load(response_content)
2304
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2305
+ end
2306
+
2307
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2308
+ # Deserialize Response
2309
+ if status_code == 200
2310
+ begin
2311
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2312
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2313
+ result.body = @client.deserialize(result_mapper, parsed_response)
2314
+ rescue Exception => e
2315
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2316
+ end
2317
+ end
2318
+ # Deserialize Response
2319
+ if status_code == 201
2320
+ begin
2321
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2322
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccount.mapper()
2323
+ result.body = @client.deserialize(result_mapper, parsed_response)
2324
+ rescue Exception => e
2325
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2326
+ end
2327
+ end
2328
+
2329
+ result
2330
+ end
2331
+
2332
+ promise.execute
2333
+ end
2334
+
2335
+ #
2336
+ # Lists the Azure Storage containers, if any, associated with the specified
2337
+ # Data Lake Analytics and Azure Storage account combination. The response
2338
+ # includes a link to the next page of results, if any.
2339
+ #
2340
+ # @param next_page_link [String] The NextLink from the previous successful call
2341
+ # to List operation.
2342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2343
+ # will be added to the HTTP request.
2344
+ #
2345
+ # @return [ListBlobContainersResult] operation results.
2346
+ #
2347
+ def list_storage_containers_next(next_page_link, custom_headers = nil)
2348
+ response = list_storage_containers_next_async(next_page_link, custom_headers).value!
2349
+ response.body unless response.nil?
2350
+ end
2351
+
2352
+ #
2353
+ # Lists the Azure Storage containers, if any, associated with the specified
2354
+ # Data Lake Analytics and Azure Storage account combination. The response
2355
+ # includes a link to the next page of results, if any.
2356
+ #
2357
+ # @param next_page_link [String] The NextLink from the previous successful call
2358
+ # to List operation.
2359
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2360
+ # will be added to the HTTP request.
2361
+ #
2362
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2363
+ #
2364
+ def list_storage_containers_next_with_http_info(next_page_link, custom_headers = nil)
2365
+ list_storage_containers_next_async(next_page_link, custom_headers).value!
2366
+ end
2367
+
2368
+ #
2369
+ # Lists the Azure Storage containers, if any, associated with the specified
2370
+ # Data Lake Analytics and Azure Storage account combination. The response
2371
+ # includes a link to the next page of results, if any.
2372
+ #
2373
+ # @param next_page_link [String] The NextLink from the previous successful call
2374
+ # to List operation.
2375
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2376
+ # to the HTTP request.
2377
+ #
2378
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2379
+ #
2380
+ def list_storage_containers_next_async(next_page_link, custom_headers = nil)
2381
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2382
+
2383
+
2384
+ request_headers = {}
2385
+
2386
+ # Set Headers
2387
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2388
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2389
+ path_template = '{nextLink}'
2390
+
2391
+ request_url = @base_url || @client.base_url
2392
+
2393
+ options = {
2394
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2395
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2396
+ headers: request_headers.merge(custom_headers || {}),
2397
+ base_url: request_url
2398
+ }
2399
+ promise = @client.make_request_async(:get, path_template, options)
2400
+
2401
+ promise = promise.then do |result|
2402
+ http_response = result.response
2403
+ status_code = http_response.status
2404
+ response_content = http_response.body
2405
+ unless status_code == 200
2406
+ error_model = JSON.load(response_content)
2407
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2408
+ end
2409
+
2410
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2411
+ # Deserialize Response
2412
+ if status_code == 200
2413
+ begin
2414
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2415
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::ListBlobContainersResult.mapper()
2416
+ result.body = @client.deserialize(result_mapper, parsed_response)
2417
+ rescue Exception => e
2418
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2419
+ end
2420
+ end
2421
+
2422
+ result
2423
+ end
2424
+
2425
+ promise.execute
2426
+ end
2427
+
2428
+ #
2429
+ # Gets the SAS token associated with the specified Data Lake Analytics and
2430
+ # Azure Storage account and container combination.
2431
+ #
2432
+ # @param next_page_link [String] The NextLink from the previous successful call
2433
+ # to List operation.
2434
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2435
+ # will be added to the HTTP request.
2436
+ #
2437
+ # @return [ListSasTokensResult] operation results.
2438
+ #
2439
+ def list_sas_tokens_next(next_page_link, custom_headers = nil)
2440
+ response = list_sas_tokens_next_async(next_page_link, custom_headers).value!
2441
+ response.body unless response.nil?
2442
+ end
2443
+
2444
+ #
2445
+ # Gets the SAS token associated with the specified Data Lake Analytics and
2446
+ # Azure Storage account and container combination.
2447
+ #
2448
+ # @param next_page_link [String] The NextLink from the previous successful call
2449
+ # to List operation.
2450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2451
+ # will be added to the HTTP request.
2452
+ #
2453
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2454
+ #
2455
+ def list_sas_tokens_next_with_http_info(next_page_link, custom_headers = nil)
2456
+ list_sas_tokens_next_async(next_page_link, custom_headers).value!
2457
+ end
2458
+
2459
+ #
2460
+ # Gets the SAS token associated with the specified Data Lake Analytics and
2461
+ # Azure Storage account and container combination.
2462
+ #
2463
+ # @param next_page_link [String] The NextLink from the previous successful call
2464
+ # to List operation.
2465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2466
+ # to the HTTP request.
2467
+ #
2468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2469
+ #
2470
+ def list_sas_tokens_next_async(next_page_link, custom_headers = nil)
2471
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2472
+
2473
+
2474
+ request_headers = {}
2475
+
2476
+ # Set Headers
2477
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2478
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2479
+ path_template = '{nextLink}'
2480
+
2481
+ request_url = @base_url || @client.base_url
2482
+
2483
+ options = {
2484
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2485
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2486
+ headers: request_headers.merge(custom_headers || {}),
2487
+ base_url: request_url
2488
+ }
2489
+ promise = @client.make_request_async(:post, path_template, options)
2490
+
2491
+ promise = promise.then do |result|
2492
+ http_response = result.response
2493
+ status_code = http_response.status
2494
+ response_content = http_response.body
2495
+ unless status_code == 200
2496
+ error_model = JSON.load(response_content)
2497
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2498
+ end
2499
+
2500
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2501
+ # Deserialize Response
2502
+ if status_code == 200
2503
+ begin
2504
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2505
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::ListSasTokensResult.mapper()
2506
+ result.body = @client.deserialize(result_mapper, parsed_response)
2507
+ rescue Exception => e
2508
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2509
+ end
2510
+ end
2511
+
2512
+ result
2513
+ end
2514
+
2515
+ promise.execute
2516
+ end
2517
+
2518
+ #
2519
+ # Gets the first page of Azure Storage accounts, if any, linked to the
2520
+ # specified Data Lake Analytics account. The response includes a link to the
2521
+ # next page, if any.
2522
+ #
2523
+ # @param next_page_link [String] The NextLink from the previous successful call
2524
+ # to List operation.
2525
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2526
+ # will be added to the HTTP request.
2527
+ #
2528
+ # @return [DataLakeAnalyticsAccountListStorageAccountsResult] operation
2529
+ # results.
2530
+ #
2531
+ def list_storage_accounts_next(next_page_link, custom_headers = nil)
2532
+ response = list_storage_accounts_next_async(next_page_link, custom_headers).value!
2533
+ response.body unless response.nil?
2534
+ end
2535
+
2536
+ #
2537
+ # Gets the first page of Azure Storage accounts, if any, linked to the
2538
+ # specified Data Lake Analytics account. The response includes a link to the
2539
+ # next page, if any.
2540
+ #
2541
+ # @param next_page_link [String] The NextLink from the previous successful call
2542
+ # to List operation.
2543
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2544
+ # will be added to the HTTP request.
2545
+ #
2546
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2547
+ #
2548
+ def list_storage_accounts_next_with_http_info(next_page_link, custom_headers = nil)
2549
+ list_storage_accounts_next_async(next_page_link, custom_headers).value!
2550
+ end
2551
+
2552
+ #
2553
+ # Gets the first page of Azure Storage accounts, if any, linked to the
2554
+ # specified Data Lake Analytics account. The response includes a link to the
2555
+ # next page, if any.
2556
+ #
2557
+ # @param next_page_link [String] The NextLink from the previous successful call
2558
+ # to List operation.
2559
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2560
+ # to the HTTP request.
2561
+ #
2562
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2563
+ #
2564
+ def list_storage_accounts_next_async(next_page_link, custom_headers = nil)
2565
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2566
+
2567
+
2568
+ request_headers = {}
2569
+
2570
+ # Set Headers
2571
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2572
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2573
+ path_template = '{nextLink}'
2574
+
2575
+ request_url = @base_url || @client.base_url
2576
+
2577
+ options = {
2578
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2579
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2580
+ headers: request_headers.merge(custom_headers || {}),
2581
+ base_url: request_url
2582
+ }
2583
+ promise = @client.make_request_async(:get, path_template, options)
2584
+
2585
+ promise = promise.then do |result|
2586
+ http_response = result.response
2587
+ status_code = http_response.status
2588
+ response_content = http_response.body
2589
+ unless status_code == 200
2590
+ error_model = JSON.load(response_content)
2591
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2592
+ end
2593
+
2594
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2595
+ # Deserialize Response
2596
+ if status_code == 200
2597
+ begin
2598
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2599
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListStorageAccountsResult.mapper()
2600
+ result.body = @client.deserialize(result_mapper, parsed_response)
2601
+ rescue Exception => e
2602
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2603
+ end
2604
+ end
2605
+
2606
+ result
2607
+ end
2608
+
2609
+ promise.execute
2610
+ end
2611
+
2612
+ #
2613
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
2614
+ # Lake Analytics account. The response includes a link to the next page, if
2615
+ # any.
2616
+ #
2617
+ # @param next_page_link [String] The NextLink from the previous successful call
2618
+ # to List operation.
2619
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2620
+ # will be added to the HTTP request.
2621
+ #
2622
+ # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] operation results.
2623
+ #
2624
+ def list_data_lake_store_accounts_next(next_page_link, custom_headers = nil)
2625
+ response = list_data_lake_store_accounts_next_async(next_page_link, custom_headers).value!
2626
+ response.body unless response.nil?
2627
+ end
2628
+
2629
+ #
2630
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
2631
+ # Lake Analytics account. The response includes a link to the next page, if
2632
+ # any.
2633
+ #
2634
+ # @param next_page_link [String] The NextLink from the previous successful call
2635
+ # to List operation.
2636
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2637
+ # will be added to the HTTP request.
2638
+ #
2639
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2640
+ #
2641
+ def list_data_lake_store_accounts_next_with_http_info(next_page_link, custom_headers = nil)
2642
+ list_data_lake_store_accounts_next_async(next_page_link, custom_headers).value!
2643
+ end
2644
+
2645
+ #
2646
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
2647
+ # Lake Analytics account. The response includes a link to the next page, if
2648
+ # any.
2649
+ #
2650
+ # @param next_page_link [String] The NextLink from the previous successful call
2651
+ # to List operation.
2652
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2653
+ # to the HTTP request.
2654
+ #
2655
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2656
+ #
2657
+ def list_data_lake_store_accounts_next_async(next_page_link, custom_headers = nil)
2658
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2659
+
2660
+
2661
+ request_headers = {}
2662
+
2663
+ # Set Headers
2664
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2665
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2666
+ path_template = '{nextLink}'
2667
+
2668
+ request_url = @base_url || @client.base_url
2669
+
2670
+ options = {
2671
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2672
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2673
+ headers: request_headers.merge(custom_headers || {}),
2674
+ base_url: request_url
2675
+ }
2676
+ promise = @client.make_request_async(:get, path_template, options)
2677
+
2678
+ promise = promise.then do |result|
2679
+ http_response = result.response
2680
+ status_code = http_response.status
2681
+ response_content = http_response.body
2682
+ unless status_code == 200
2683
+ error_model = JSON.load(response_content)
2684
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2685
+ end
2686
+
2687
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2688
+ # Deserialize Response
2689
+ if status_code == 200
2690
+ begin
2691
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2692
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListDataLakeStoreResult.mapper()
2693
+ result.body = @client.deserialize(result_mapper, parsed_response)
2694
+ rescue Exception => e
2695
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2696
+ end
2697
+ end
2698
+
2699
+ result
2700
+ end
2701
+
2702
+ promise.execute
2703
+ end
2704
+
2705
+ #
2706
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
2707
+ # specific resource group. This includes a link to the next page, if any.
2708
+ #
2709
+ # @param next_page_link [String] The NextLink from the previous successful call
2710
+ # to List operation.
2711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2712
+ # will be added to the HTTP request.
2713
+ #
2714
+ # @return [DataLakeAnalyticsAccountListResult] operation results.
2715
+ #
2716
+ def list_by_resource_group_next(next_page_link, custom_headers = nil)
2717
+ response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
2718
+ response.body unless response.nil?
2719
+ end
2720
+
2721
+ #
2722
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
2723
+ # specific resource group. This includes a link to the next page, if any.
2724
+ #
2725
+ # @param next_page_link [String] The NextLink from the previous successful call
2726
+ # to List operation.
2727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2728
+ # will be added to the HTTP request.
2729
+ #
2730
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2731
+ #
2732
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
2733
+ list_by_resource_group_next_async(next_page_link, custom_headers).value!
2734
+ end
2735
+
2736
+ #
2737
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
2738
+ # specific resource group. This includes a link to the next page, if any.
2739
+ #
2740
+ # @param next_page_link [String] The NextLink from the previous successful call
2741
+ # to List operation.
2742
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2743
+ # to the HTTP request.
2744
+ #
2745
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2746
+ #
2747
+ def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
2748
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2749
+
2750
+
2751
+ request_headers = {}
2752
+
2753
+ # Set Headers
2754
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2755
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2756
+ path_template = '{nextLink}'
2757
+
2758
+ request_url = @base_url || @client.base_url
2759
+
2760
+ options = {
2761
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2762
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2763
+ headers: request_headers.merge(custom_headers || {}),
2764
+ base_url: request_url
2765
+ }
2766
+ promise = @client.make_request_async(:get, path_template, options)
2767
+
2768
+ promise = promise.then do |result|
2769
+ http_response = result.response
2770
+ status_code = http_response.status
2771
+ response_content = http_response.body
2772
+ unless status_code == 200
2773
+ error_model = JSON.load(response_content)
2774
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2775
+ end
2776
+
2777
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2778
+ # Deserialize Response
2779
+ if status_code == 200
2780
+ begin
2781
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2782
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListResult.mapper()
2783
+ result.body = @client.deserialize(result_mapper, parsed_response)
2784
+ rescue Exception => e
2785
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2786
+ end
2787
+ end
2788
+
2789
+ result
2790
+ end
2791
+
2792
+ promise.execute
2793
+ end
2794
+
2795
+ #
2796
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
2797
+ # current subscription. This includes a link to the next page, if any.
2798
+ #
2799
+ # @param next_page_link [String] The NextLink from the previous successful call
2800
+ # to List operation.
2801
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2802
+ # will be added to the HTTP request.
2803
+ #
2804
+ # @return [DataLakeAnalyticsAccountListResult] operation results.
2805
+ #
2806
+ def list_next(next_page_link, custom_headers = nil)
2807
+ response = list_next_async(next_page_link, custom_headers).value!
2808
+ response.body unless response.nil?
2809
+ end
2810
+
2811
+ #
2812
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
2813
+ # current subscription. This includes a link to the next page, if any.
2814
+ #
2815
+ # @param next_page_link [String] The NextLink from the previous successful call
2816
+ # to List operation.
2817
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2818
+ # will be added to the HTTP request.
2819
+ #
2820
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2821
+ #
2822
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
2823
+ list_next_async(next_page_link, custom_headers).value!
2824
+ end
2825
+
2826
+ #
2827
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
2828
+ # current subscription. This includes a link to the next page, if any.
2829
+ #
2830
+ # @param next_page_link [String] The NextLink from the previous successful call
2831
+ # to List operation.
2832
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2833
+ # to the HTTP request.
2834
+ #
2835
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2836
+ #
2837
+ def list_next_async(next_page_link, custom_headers = nil)
2838
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2839
+
2840
+
2841
+ request_headers = {}
2842
+
2843
+ # Set Headers
2844
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2845
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2846
+ path_template = '{nextLink}'
2847
+
2848
+ request_url = @base_url || @client.base_url
2849
+
2850
+ options = {
2851
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2852
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2853
+ headers: request_headers.merge(custom_headers || {}),
2854
+ base_url: request_url
2855
+ }
2856
+ promise = @client.make_request_async(:get, path_template, options)
2857
+
2858
+ promise = promise.then do |result|
2859
+ http_response = result.response
2860
+ status_code = http_response.status
2861
+ response_content = http_response.body
2862
+ unless status_code == 200
2863
+ error_model = JSON.load(response_content)
2864
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2865
+ end
2866
+
2867
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2868
+ # Deserialize Response
2869
+ if status_code == 200
2870
+ begin
2871
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2872
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview::Models::DataLakeAnalyticsAccountListResult.mapper()
2873
+ result.body = @client.deserialize(result_mapper, parsed_response)
2874
+ rescue Exception => e
2875
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2876
+ end
2877
+ end
2878
+
2879
+ result
2880
+ end
2881
+
2882
+ promise.execute
2883
+ end
2884
+
2885
+ #
2886
+ # Lists the Azure Storage containers, if any, associated with the specified
2887
+ # Data Lake Analytics and Azure Storage account combination. The response
2888
+ # includes a link to the next page of results, if any.
2889
+ #
2890
+ # @param resource_group_name [String] The name of the Azure resource group that
2891
+ # contains the Data Lake Analytics account.
2892
+ # @param account_name [String] The name of the Data Lake Analytics account for
2893
+ # which to list Azure Storage blob containers.
2894
+ # @param storage_account_name [String] The name of the Azure storage account
2895
+ # from which to list blob containers.
2896
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2897
+ # will be added to the HTTP request.
2898
+ #
2899
+ # @return [ListBlobContainersResult] which provide lazy access to pages of the
2900
+ # response.
2901
+ #
2902
+ def list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers = nil)
2903
+ response = list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
2904
+ unless response.nil?
2905
+ page = response.body
2906
+ page.next_method = Proc.new do |next_page_link|
2907
+ list_storage_containers_next_async(next_page_link, custom_headers)
2908
+ end
2909
+ page
2910
+ end
2911
+ end
2912
+
2913
+ #
2914
+ # Gets the SAS token associated with the specified Data Lake Analytics and
2915
+ # Azure Storage account and container combination.
2916
+ #
2917
+ # @param resource_group_name [String] The name of the Azure resource group that
2918
+ # contains the Data Lake Analytics account.
2919
+ # @param account_name [String] The name of the Data Lake Analytics account from
2920
+ # which an Azure Storage account's SAS token is being requested.
2921
+ # @param storage_account_name [String] The name of the Azure storage account
2922
+ # for which the SAS token is being requested.
2923
+ # @param container_name [String] The name of the Azure storage container for
2924
+ # which the SAS token is being requested.
2925
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2926
+ # will be added to the HTTP request.
2927
+ #
2928
+ # @return [ListSasTokensResult] which provide lazy access to pages of the
2929
+ # response.
2930
+ #
2931
+ def list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
2932
+ response = list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
2933
+ unless response.nil?
2934
+ page = response.body
2935
+ page.next_method = Proc.new do |next_page_link|
2936
+ list_sas_tokens_next_async(next_page_link, custom_headers)
2937
+ end
2938
+ page
2939
+ end
2940
+ end
2941
+
2942
+ #
2943
+ # Gets the first page of Azure Storage accounts, if any, linked to the
2944
+ # specified Data Lake Analytics account. The response includes a link to the
2945
+ # next page, if any.
2946
+ #
2947
+ # @param resource_group_name [String] The name of the Azure resource group that
2948
+ # contains the Data Lake Analytics account.
2949
+ # @param account_name [String] The name of the Data Lake Analytics account for
2950
+ # which to list Azure Storage accounts.
2951
+ # @param filter [String] The OData filter. Optional.
2952
+ # @param top [Integer] The number of items to return. Optional.
2953
+ # @param skip [Integer] The number of items to skip over before returning
2954
+ # elements. Optional.
2955
+ # @param expand [String] OData expansion. Expand related resources in line with
2956
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
2957
+ # Product data in line with each Category entry. Optional.
2958
+ # @param select [String] OData Select statement. Limits the properties on each
2959
+ # entry to just those requested, e.g.
2960
+ # Categories?$select=CategoryName,Description. Optional.
2961
+ # @param orderby [String] OrderBy clause. One or more comma-separated
2962
+ # expressions with an optional "asc" (the default) or "desc" depending on the
2963
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
2964
+ # desc. Optional.
2965
+ # @param count [Boolean] The Boolean value of true or false to request a count
2966
+ # of the matching resources included with the resources in the response, e.g.
2967
+ # Categories?$count=true. Optional.
2968
+ # @param search [String] A free form search. A free-text search expression to
2969
+ # match for whether a particular entry should be included in the feed, e.g.
2970
+ # Categories?$search=blue OR green. Optional.
2971
+ # @param format [String] The desired return format. Return the response in
2972
+ # particular formatxii without access to request headers for standard
2973
+ # content-type negotiation (e.g Orders?$format=json). Optional.
2974
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2975
+ # will be added to the HTTP request.
2976
+ #
2977
+ # @return [DataLakeAnalyticsAccountListStorageAccountsResult] which provide
2978
+ # lazy access to pages of the response.
2979
+ #
2980
+ def list_storage_accounts_as_lazy(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
2981
+ response = list_storage_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
2982
+ unless response.nil?
2983
+ page = response.body
2984
+ page.next_method = Proc.new do |next_page_link|
2985
+ list_storage_accounts_next_async(next_page_link, custom_headers)
2986
+ end
2987
+ page
2988
+ end
2989
+ end
2990
+
2991
+ #
2992
+ # Gets the first page of Data Lake Store accounts linked to the specified Data
2993
+ # Lake Analytics account. The response includes a link to the next page, if
2994
+ # any.
2995
+ #
2996
+ # @param resource_group_name [String] The name of the Azure resource group that
2997
+ # contains the Data Lake Analytics account.
2998
+ # @param account_name [String] The name of the Data Lake Analytics account for
2999
+ # which to list Data Lake Store accounts.
3000
+ # @param filter [String] OData filter. Optional.
3001
+ # @param top [Integer] The number of items to return. Optional.
3002
+ # @param skip [Integer] The number of items to skip over before returning
3003
+ # elements. Optional.
3004
+ # @param expand [String] OData expansion. Expand related resources in line with
3005
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
3006
+ # Product data in line with each Category entry. Optional.
3007
+ # @param select [String] OData Select statement. Limits the properties on each
3008
+ # entry to just those requested, e.g.
3009
+ # Categories?$select=CategoryName,Description. Optional.
3010
+ # @param orderby [String] OrderBy clause. One or more comma-separated
3011
+ # expressions with an optional "asc" (the default) or "desc" depending on the
3012
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
3013
+ # desc. Optional.
3014
+ # @param count [Boolean] The Boolean value of true or false to request a count
3015
+ # of the matching resources included with the resources in the response, e.g.
3016
+ # Categories?$count=true. Optional.
3017
+ # @param search [String] A free form search. A free-text search expression to
3018
+ # match for whether a particular entry should be included in the feed, e.g.
3019
+ # Categories?$search=blue OR green. Optional.
3020
+ # @param format [String] The desired return format. Return the response in
3021
+ # particular formatxii without access to request headers for standard
3022
+ # content-type negotiation (e.g Orders?$format=json). Optional.
3023
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3024
+ # will be added to the HTTP request.
3025
+ #
3026
+ # @return [DataLakeAnalyticsAccountListDataLakeStoreResult] which provide lazy
3027
+ # access to pages of the response.
3028
+ #
3029
+ def list_data_lake_store_accounts_as_lazy(resource_group_name, account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
3030
+ response = list_data_lake_store_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
3031
+ unless response.nil?
3032
+ page = response.body
3033
+ page.next_method = Proc.new do |next_page_link|
3034
+ list_data_lake_store_accounts_next_async(next_page_link, custom_headers)
3035
+ end
3036
+ page
3037
+ end
3038
+ end
3039
+
3040
+ #
3041
+ # Gets the first page of Data Lake Analytics accounts, if any, within a
3042
+ # specific resource group. This includes a link to the next page, if any.
3043
+ #
3044
+ # @param resource_group_name [String] The name of the Azure resource group that
3045
+ # contains the Data Lake Analytics account.
3046
+ # @param filter [String] OData filter. Optional.
3047
+ # @param top [Integer] The number of items to return. Optional.
3048
+ # @param skip [Integer] The number of items to skip over before returning
3049
+ # elements. Optional.
3050
+ # @param expand [String] OData expansion. Expand related resources in line with
3051
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
3052
+ # Product data in line with each Category entry. Optional.
3053
+ # @param select [String] OData Select statement. Limits the properties on each
3054
+ # entry to just those requested, e.g.
3055
+ # Categories?$select=CategoryName,Description. Optional.
3056
+ # @param orderby [String] OrderBy clause. One or more comma-separated
3057
+ # expressions with an optional "asc" (the default) or "desc" depending on the
3058
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
3059
+ # desc. Optional.
3060
+ # @param count [Boolean] The Boolean value of true or false to request a count
3061
+ # of the matching resources included with the resources in the response, e.g.
3062
+ # Categories?$count=true. Optional.
3063
+ # @param search [String] A free form search. A free-text search expression to
3064
+ # match for whether a particular entry should be included in the feed, e.g.
3065
+ # Categories?$search=blue OR green. Optional.
3066
+ # @param format [String] The return format. Return the response in particular
3067
+ # formatxii without access to request headers for standard content-type
3068
+ # negotiation (e.g Orders?$format=json). Optional.
3069
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3070
+ # will be added to the HTTP request.
3071
+ #
3072
+ # @return [DataLakeAnalyticsAccountListResult] which provide lazy access to
3073
+ # pages of the response.
3074
+ #
3075
+ 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)
3076
+ response = list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
3077
+ unless response.nil?
3078
+ page = response.body
3079
+ page.next_method = Proc.new do |next_page_link|
3080
+ list_by_resource_group_next_async(next_page_link, custom_headers)
3081
+ end
3082
+ page
3083
+ end
3084
+ end
3085
+
3086
+ #
3087
+ # Gets the first page of Data Lake Analytics accounts, if any, within the
3088
+ # current subscription. This includes a link to the next page, if any.
3089
+ #
3090
+ # @param filter [String] OData filter. Optional.
3091
+ # @param top [Integer] The number of items to return. Optional.
3092
+ # @param skip [Integer] The number of items to skip over before returning
3093
+ # elements. Optional.
3094
+ # @param expand [String] OData expansion. Expand related resources in line with
3095
+ # the retrieved resources, e.g. Categories/$expand=Products would expand
3096
+ # Product data in line with each Category entry. Optional.
3097
+ # @param select [String] OData Select statement. Limits the properties on each
3098
+ # entry to just those requested, e.g.
3099
+ # Categories?$select=CategoryName,Description. Optional.
3100
+ # @param orderby [String] OrderBy clause. One or more comma-separated
3101
+ # expressions with an optional "asc" (the default) or "desc" depending on the
3102
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
3103
+ # desc. Optional.
3104
+ # @param count [Boolean] The Boolean value of true or false to request a count
3105
+ # of the matching resources included with the resources in the response, e.g.
3106
+ # Categories?$count=true. Optional.
3107
+ # @param search [String] A free form search. A free-text search expression to
3108
+ # match for whether a particular entry should be included in the feed, e.g.
3109
+ # Categories?$search=blue OR green. Optional.
3110
+ # @param format [String] The desired return format. Return the response in
3111
+ # particular formatxii without access to request headers for standard
3112
+ # content-type negotiation (e.g Orders?$format=json). Optional.
3113
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3114
+ # will be added to the HTTP request.
3115
+ #
3116
+ # @return [DataLakeAnalyticsAccountListResult] which provide lazy access to
3117
+ # pages of the response.
3118
+ #
3119
+ 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)
3120
+ response = list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
3121
+ unless response.nil?
3122
+ page = response.body
3123
+ page.next_method = Proc.new do |next_page_link|
3124
+ list_next_async(next_page_link, custom_headers)
3125
+ end
3126
+ page
3127
+ end
3128
+ end
3129
+
3130
+ end
3131
+ end