azure_mgmt_datalake_analytics 0.4.0

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