aws-sdk-athena 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-athena.rb +47 -0
- data/lib/aws-sdk-athena/client.rb +697 -0
- data/lib/aws-sdk-athena/client_api.rb +401 -0
- data/lib/aws-sdk-athena/customizations.rb +0 -0
- data/lib/aws-sdk-athena/errors.rb +14 -0
- data/lib/aws-sdk-athena/resource.rb +23 -0
- data/lib/aws-sdk-athena/types.rb +830 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 950deb335d525e70a14ab9fb696a2603c85768c2
|
4
|
+
data.tar.gz: e7deffc1d6375e39ee5a70ed83c8e2d1ec008861
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60f4169e511ac62e9cdc6558096470adb6df281668ae398283492b69457ee0d844f92d08b982802ab60ea43b7ce3534e2377c72d33734687f717d98ed78d8760
|
7
|
+
data.tar.gz: e3f33611db26e56a6359c6631c3340d27d09a6bc1a0dfd78e250f7389dbd032bbb2f1c8bf7186755a6216c1d4cffafabf26bcca4f86f2a46367772914936699a
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-athena/types'
|
12
|
+
require_relative 'aws-sdk-athena/client_api'
|
13
|
+
require_relative 'aws-sdk-athena/client'
|
14
|
+
require_relative 'aws-sdk-athena/errors'
|
15
|
+
require_relative 'aws-sdk-athena/resource'
|
16
|
+
require_relative 'aws-sdk-athena/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Amazon Athena. This module is available in the
|
19
|
+
# `aws-sdk-athena` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from Amazon Athena all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::Athena::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::Athena
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0.rc1'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,697 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
22
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
23
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
24
|
+
|
25
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:athena)
|
26
|
+
|
27
|
+
module Aws::Athena
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :athena
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
50
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
51
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
52
|
+
|
53
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
54
|
+
# Your AWS credentials. This can be an instance of any one of the
|
55
|
+
# following classes:
|
56
|
+
#
|
57
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
58
|
+
# credentials.
|
59
|
+
#
|
60
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
61
|
+
# from an EC2 IMDS on an EC2 instance.
|
62
|
+
#
|
63
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
64
|
+
# shared file, such as `~/.aws/config`.
|
65
|
+
#
|
66
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
67
|
+
#
|
68
|
+
# When `:credentials` are not configured directly, the following
|
69
|
+
# locations will be searched for credentials:
|
70
|
+
#
|
71
|
+
# * `Aws.config[:credentials]`
|
72
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
73
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
74
|
+
# * `~/.aws/credentials`
|
75
|
+
# * `~/.aws/config`
|
76
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
77
|
+
# very aggressive. Construct and pass an instance of
|
78
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
79
|
+
# timeouts.
|
80
|
+
#
|
81
|
+
# @option options [required, String] :region
|
82
|
+
# The AWS region to connect to. The configured `:region` is
|
83
|
+
# used to determine the service `:endpoint`. When not passed,
|
84
|
+
# a default `:region` is search for in the following locations:
|
85
|
+
#
|
86
|
+
# * `Aws.config[:region]`
|
87
|
+
# * `ENV['AWS_REGION']`
|
88
|
+
# * `ENV['AMAZON_REGION']`
|
89
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
90
|
+
# * `~/.aws/credentials`
|
91
|
+
# * `~/.aws/config`
|
92
|
+
#
|
93
|
+
# @option options [String] :access_key_id
|
94
|
+
#
|
95
|
+
# @option options [Boolean] :convert_params (true)
|
96
|
+
# When `true`, an attempt is made to coerce request parameters into
|
97
|
+
# the required types.
|
98
|
+
#
|
99
|
+
# @option options [String] :endpoint
|
100
|
+
# The client endpoint is normally constructed from the `:region`
|
101
|
+
# option. You should only configure an `:endpoint` when connecting
|
102
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
103
|
+
#
|
104
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
105
|
+
# The log formatter.
|
106
|
+
#
|
107
|
+
# @option options [Symbol] :log_level (:info)
|
108
|
+
# The log level to send messages to the `:logger` at.
|
109
|
+
#
|
110
|
+
# @option options [Logger] :logger
|
111
|
+
# The Logger instance to send log messages to. If this option
|
112
|
+
# is not set, logging will be disabled.
|
113
|
+
#
|
114
|
+
# @option options [String] :profile ("default")
|
115
|
+
# Used when loading credentials from the shared credentials file
|
116
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
117
|
+
#
|
118
|
+
# @option options [Integer] :retry_limit (3)
|
119
|
+
# The maximum number of times to retry failed requests. Only
|
120
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
121
|
+
# are retried. Generally, these are throttling errors, data
|
122
|
+
# checksum errors, networking errors, timeout errors and auth
|
123
|
+
# errors from expired credentials.
|
124
|
+
#
|
125
|
+
# @option options [String] :secret_access_key
|
126
|
+
#
|
127
|
+
# @option options [String] :session_token
|
128
|
+
#
|
129
|
+
# @option options [Boolean] :simple_json (false)
|
130
|
+
# Disables request parameter conversion, validation, and formatting.
|
131
|
+
# Also disable response data type conversions. This option is useful
|
132
|
+
# when you want to ensure the highest level of performance by
|
133
|
+
# avoiding overhead of walking request parameters and response data
|
134
|
+
# structures.
|
135
|
+
#
|
136
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
137
|
+
# be formatted exactly as the DynamoDB API expects.
|
138
|
+
#
|
139
|
+
# @option options [Boolean] :stub_responses (false)
|
140
|
+
# Causes the client to return stubbed responses. By default
|
141
|
+
# fake responses are generated and returned. You can specify
|
142
|
+
# the response data to return or errors to raise by calling
|
143
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
144
|
+
#
|
145
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
146
|
+
# requests are made, and retries are disabled.
|
147
|
+
#
|
148
|
+
# @option options [Boolean] :validate_params (true)
|
149
|
+
# When `true`, request parameters are validated before
|
150
|
+
# sending the request.
|
151
|
+
#
|
152
|
+
def initialize(*args)
|
153
|
+
super
|
154
|
+
end
|
155
|
+
|
156
|
+
# @!group API Operations
|
157
|
+
|
158
|
+
# Returns the details of a single named query or a list of up to 50
|
159
|
+
# queries, which you provide as an array of query ID strings. Use
|
160
|
+
# ListNamedQueries to get the list of named query IDs. If information
|
161
|
+
# could not be retrieved for a submitted query ID, information about the
|
162
|
+
# query ID submitted is listed under UnprocessedNamedQueryId. Named
|
163
|
+
# queries are different from executed queries. Use
|
164
|
+
# BatchGetQueryExecution to get details about each unique query
|
165
|
+
# execution, and ListQueryExecutions to get a list of query execution
|
166
|
+
# IDs.
|
167
|
+
#
|
168
|
+
# @option params [required, Array<String>] :named_query_ids
|
169
|
+
# An array of query IDs.
|
170
|
+
#
|
171
|
+
# @return [Types::BatchGetNamedQueryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
172
|
+
#
|
173
|
+
# * {Types::BatchGetNamedQueryOutput#named_queries #named_queries} => Array<Types::NamedQuery>
|
174
|
+
# * {Types::BatchGetNamedQueryOutput#unprocessed_named_query_ids #unprocessed_named_query_ids} => Array<Types::UnprocessedNamedQueryId>
|
175
|
+
#
|
176
|
+
# @example Request syntax with placeholder values
|
177
|
+
#
|
178
|
+
# resp = client.batch_get_named_query({
|
179
|
+
# named_query_ids: ["NamedQueryId"], # required
|
180
|
+
# })
|
181
|
+
#
|
182
|
+
# @example Response structure
|
183
|
+
#
|
184
|
+
# resp.named_queries #=> Array
|
185
|
+
# resp.named_queries[0].name #=> String
|
186
|
+
# resp.named_queries[0].description #=> String
|
187
|
+
# resp.named_queries[0].database #=> String
|
188
|
+
# resp.named_queries[0].query_string #=> String
|
189
|
+
# resp.named_queries[0].named_query_id #=> String
|
190
|
+
# resp.unprocessed_named_query_ids #=> Array
|
191
|
+
# resp.unprocessed_named_query_ids[0].named_query_id #=> String
|
192
|
+
# resp.unprocessed_named_query_ids[0].error_code #=> String
|
193
|
+
# resp.unprocessed_named_query_ids[0].error_message #=> String
|
194
|
+
#
|
195
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery AWS API Documentation
|
196
|
+
#
|
197
|
+
# @overload batch_get_named_query(params = {})
|
198
|
+
# @param [Hash] params ({})
|
199
|
+
def batch_get_named_query(params = {}, options = {})
|
200
|
+
req = build_request(:batch_get_named_query, params)
|
201
|
+
req.send_request(options)
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the details of a single query execution or a list of up to 50
|
205
|
+
# query executions, which you provide as an array of query execution ID
|
206
|
+
# strings. To get a list of query execution IDs, use
|
207
|
+
# ListQueryExecutions. Query executions are different from named (saved)
|
208
|
+
# queries. Use BatchGetNamedQuery to get details about named queries.
|
209
|
+
#
|
210
|
+
# @option params [required, Array<String>] :query_execution_ids
|
211
|
+
# An array of query execution IDs.
|
212
|
+
#
|
213
|
+
# @return [Types::BatchGetQueryExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
214
|
+
#
|
215
|
+
# * {Types::BatchGetQueryExecutionOutput#query_executions #query_executions} => Array<Types::QueryExecution>
|
216
|
+
# * {Types::BatchGetQueryExecutionOutput#unprocessed_query_execution_ids #unprocessed_query_execution_ids} => Array<Types::UnprocessedQueryExecutionId>
|
217
|
+
#
|
218
|
+
# @example Request syntax with placeholder values
|
219
|
+
#
|
220
|
+
# resp = client.batch_get_query_execution({
|
221
|
+
# query_execution_ids: ["QueryExecutionId"], # required
|
222
|
+
# })
|
223
|
+
#
|
224
|
+
# @example Response structure
|
225
|
+
#
|
226
|
+
# resp.query_executions #=> Array
|
227
|
+
# resp.query_executions[0].query_execution_id #=> String
|
228
|
+
# resp.query_executions[0].query #=> String
|
229
|
+
# resp.query_executions[0].result_configuration.output_location #=> String
|
230
|
+
# resp.query_executions[0].result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
|
231
|
+
# resp.query_executions[0].result_configuration.encryption_configuration.kms_key #=> String
|
232
|
+
# resp.query_executions[0].query_execution_context.database #=> String
|
233
|
+
# resp.query_executions[0].status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
|
234
|
+
# resp.query_executions[0].status.state_change_reason #=> String
|
235
|
+
# resp.query_executions[0].status.submission_date_time #=> Time
|
236
|
+
# resp.query_executions[0].status.completion_date_time #=> Time
|
237
|
+
# resp.query_executions[0].statistics.engine_execution_time_in_millis #=> Integer
|
238
|
+
# resp.query_executions[0].statistics.data_scanned_in_bytes #=> Integer
|
239
|
+
# resp.unprocessed_query_execution_ids #=> Array
|
240
|
+
# resp.unprocessed_query_execution_ids[0].query_execution_id #=> String
|
241
|
+
# resp.unprocessed_query_execution_ids[0].error_code #=> String
|
242
|
+
# resp.unprocessed_query_execution_ids[0].error_message #=> String
|
243
|
+
#
|
244
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution AWS API Documentation
|
245
|
+
#
|
246
|
+
# @overload batch_get_query_execution(params = {})
|
247
|
+
# @param [Hash] params ({})
|
248
|
+
def batch_get_query_execution(params = {}, options = {})
|
249
|
+
req = build_request(:batch_get_query_execution, params)
|
250
|
+
req.send_request(options)
|
251
|
+
end
|
252
|
+
|
253
|
+
# Creates a named query.
|
254
|
+
#
|
255
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
256
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
257
|
+
#
|
258
|
+
#
|
259
|
+
#
|
260
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
261
|
+
#
|
262
|
+
# @option params [required, String] :name
|
263
|
+
# The plain language name for the query.
|
264
|
+
#
|
265
|
+
# @option params [String] :description
|
266
|
+
# A brief explanation of the query.
|
267
|
+
#
|
268
|
+
# @option params [required, String] :database
|
269
|
+
# The database to which the query belongs.
|
270
|
+
#
|
271
|
+
# @option params [required, String] :query_string
|
272
|
+
# The text of the query itself. In other words, all query statements.
|
273
|
+
#
|
274
|
+
# @option params [String] :client_request_token
|
275
|
+
# A unique case-sensitive string used to ensure the request to create
|
276
|
+
# the query is idempotent (executes only once). If another
|
277
|
+
# `CreateNamedQuery` request is received, the same response is returned
|
278
|
+
# and another query is not created. If a parameter has changed, for
|
279
|
+
# example, the `QueryString`, an error is returned.
|
280
|
+
#
|
281
|
+
# This token is listed as not required because AWS SDKs (for example the
|
282
|
+
# AWS SDK for Java) auto-generate the token for users. If you are not
|
283
|
+
# using the AWS SDK or the AWS CLI, you must provide this token or the
|
284
|
+
# action will fail.
|
285
|
+
#
|
286
|
+
# **A suitable default value is auto-generated.** You should normally
|
287
|
+
# not need to pass this option.**
|
288
|
+
#
|
289
|
+
# @return [Types::CreateNamedQueryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
290
|
+
#
|
291
|
+
# * {Types::CreateNamedQueryOutput#named_query_id #named_query_id} => String
|
292
|
+
#
|
293
|
+
# @example Request syntax with placeholder values
|
294
|
+
#
|
295
|
+
# resp = client.create_named_query({
|
296
|
+
# name: "NameString", # required
|
297
|
+
# description: "DescriptionString",
|
298
|
+
# database: "DatabaseString", # required
|
299
|
+
# query_string: "QueryString", # required
|
300
|
+
# client_request_token: "IdempotencyToken",
|
301
|
+
# })
|
302
|
+
#
|
303
|
+
# @example Response structure
|
304
|
+
#
|
305
|
+
# resp.named_query_id #=> String
|
306
|
+
#
|
307
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery AWS API Documentation
|
308
|
+
#
|
309
|
+
# @overload create_named_query(params = {})
|
310
|
+
# @param [Hash] params ({})
|
311
|
+
def create_named_query(params = {}, options = {})
|
312
|
+
req = build_request(:create_named_query, params)
|
313
|
+
req.send_request(options)
|
314
|
+
end
|
315
|
+
|
316
|
+
# Deletes a named query.
|
317
|
+
#
|
318
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
319
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
320
|
+
#
|
321
|
+
#
|
322
|
+
#
|
323
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
324
|
+
#
|
325
|
+
# @option params [required, String] :named_query_id
|
326
|
+
# The unique ID of the query to delete.
|
327
|
+
#
|
328
|
+
# **A suitable default value is auto-generated.** You should normally
|
329
|
+
# not need to pass this option.**
|
330
|
+
#
|
331
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
332
|
+
#
|
333
|
+
# @example Request syntax with placeholder values
|
334
|
+
#
|
335
|
+
# resp = client.delete_named_query({
|
336
|
+
# named_query_id: "NamedQueryId", # required
|
337
|
+
# })
|
338
|
+
#
|
339
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery AWS API Documentation
|
340
|
+
#
|
341
|
+
# @overload delete_named_query(params = {})
|
342
|
+
# @param [Hash] params ({})
|
343
|
+
def delete_named_query(params = {}, options = {})
|
344
|
+
req = build_request(:delete_named_query, params)
|
345
|
+
req.send_request(options)
|
346
|
+
end
|
347
|
+
|
348
|
+
# Returns information about a single query.
|
349
|
+
#
|
350
|
+
# @option params [required, String] :named_query_id
|
351
|
+
# The unique ID of the query. Use ListNamedQueries to get query IDs.
|
352
|
+
#
|
353
|
+
# @return [Types::GetNamedQueryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
354
|
+
#
|
355
|
+
# * {Types::GetNamedQueryOutput#named_query #named_query} => Types::NamedQuery
|
356
|
+
#
|
357
|
+
# @example Request syntax with placeholder values
|
358
|
+
#
|
359
|
+
# resp = client.get_named_query({
|
360
|
+
# named_query_id: "NamedQueryId", # required
|
361
|
+
# })
|
362
|
+
#
|
363
|
+
# @example Response structure
|
364
|
+
#
|
365
|
+
# resp.named_query.name #=> String
|
366
|
+
# resp.named_query.description #=> String
|
367
|
+
# resp.named_query.database #=> String
|
368
|
+
# resp.named_query.query_string #=> String
|
369
|
+
# resp.named_query.named_query_id #=> String
|
370
|
+
#
|
371
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery AWS API Documentation
|
372
|
+
#
|
373
|
+
# @overload get_named_query(params = {})
|
374
|
+
# @param [Hash] params ({})
|
375
|
+
def get_named_query(params = {}, options = {})
|
376
|
+
req = build_request(:get_named_query, params)
|
377
|
+
req.send_request(options)
|
378
|
+
end
|
379
|
+
|
380
|
+
# Returns information about a single execution of a query. Each time a
|
381
|
+
# query executes, information about the query execution is saved with a
|
382
|
+
# unique ID.
|
383
|
+
#
|
384
|
+
# @option params [required, String] :query_execution_id
|
385
|
+
# The unique ID of the query execution.
|
386
|
+
#
|
387
|
+
# @return [Types::GetQueryExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
388
|
+
#
|
389
|
+
# * {Types::GetQueryExecutionOutput#query_execution #query_execution} => Types::QueryExecution
|
390
|
+
#
|
391
|
+
# @example Request syntax with placeholder values
|
392
|
+
#
|
393
|
+
# resp = client.get_query_execution({
|
394
|
+
# query_execution_id: "QueryExecutionId", # required
|
395
|
+
# })
|
396
|
+
#
|
397
|
+
# @example Response structure
|
398
|
+
#
|
399
|
+
# resp.query_execution.query_execution_id #=> String
|
400
|
+
# resp.query_execution.query #=> String
|
401
|
+
# resp.query_execution.result_configuration.output_location #=> String
|
402
|
+
# resp.query_execution.result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
|
403
|
+
# resp.query_execution.result_configuration.encryption_configuration.kms_key #=> String
|
404
|
+
# resp.query_execution.query_execution_context.database #=> String
|
405
|
+
# resp.query_execution.status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
|
406
|
+
# resp.query_execution.status.state_change_reason #=> String
|
407
|
+
# resp.query_execution.status.submission_date_time #=> Time
|
408
|
+
# resp.query_execution.status.completion_date_time #=> Time
|
409
|
+
# resp.query_execution.statistics.engine_execution_time_in_millis #=> Integer
|
410
|
+
# resp.query_execution.statistics.data_scanned_in_bytes #=> Integer
|
411
|
+
#
|
412
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution AWS API Documentation
|
413
|
+
#
|
414
|
+
# @overload get_query_execution(params = {})
|
415
|
+
# @param [Hash] params ({})
|
416
|
+
def get_query_execution(params = {}, options = {})
|
417
|
+
req = build_request(:get_query_execution, params)
|
418
|
+
req.send_request(options)
|
419
|
+
end
|
420
|
+
|
421
|
+
# Returns the results of a single query execution specified by
|
422
|
+
# `QueryExecutionId`. This request does not execute the query but
|
423
|
+
# returns results. Use StartQueryExecution to run a query.
|
424
|
+
#
|
425
|
+
# @option params [required, String] :query_execution_id
|
426
|
+
# The unique ID of the query execution.
|
427
|
+
#
|
428
|
+
# @option params [String] :next_token
|
429
|
+
# The token that specifies where to start pagination if a previous
|
430
|
+
# request was truncated.
|
431
|
+
#
|
432
|
+
# @option params [Integer] :max_results
|
433
|
+
# The maximum number of results (rows) to return in this request.
|
434
|
+
#
|
435
|
+
# @return [Types::GetQueryResultsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
436
|
+
#
|
437
|
+
# * {Types::GetQueryResultsOutput#result_set #result_set} => Types::ResultSet
|
438
|
+
# * {Types::GetQueryResultsOutput#next_token #next_token} => String
|
439
|
+
#
|
440
|
+
# @example Request syntax with placeholder values
|
441
|
+
#
|
442
|
+
# resp = client.get_query_results({
|
443
|
+
# query_execution_id: "QueryExecutionId", # required
|
444
|
+
# next_token: "Token",
|
445
|
+
# max_results: 1,
|
446
|
+
# })
|
447
|
+
#
|
448
|
+
# @example Response structure
|
449
|
+
#
|
450
|
+
# resp.result_set.rows #=> Array
|
451
|
+
# resp.result_set.rows[0].data #=> Array
|
452
|
+
# resp.result_set.rows[0].data[0].var_char_value #=> String
|
453
|
+
# resp.result_set.result_set_metadata.column_info #=> Array
|
454
|
+
# resp.result_set.result_set_metadata.column_info[0].catalog_name #=> String
|
455
|
+
# resp.result_set.result_set_metadata.column_info[0].schema_name #=> String
|
456
|
+
# resp.result_set.result_set_metadata.column_info[0].table_name #=> String
|
457
|
+
# resp.result_set.result_set_metadata.column_info[0].name #=> String
|
458
|
+
# resp.result_set.result_set_metadata.column_info[0].label #=> String
|
459
|
+
# resp.result_set.result_set_metadata.column_info[0].type #=> String
|
460
|
+
# resp.result_set.result_set_metadata.column_info[0].precision #=> Integer
|
461
|
+
# resp.result_set.result_set_metadata.column_info[0].scale #=> Integer
|
462
|
+
# resp.result_set.result_set_metadata.column_info[0].nullable #=> String, one of "NOT_NULL", "NULLABLE", "UNKNOWN"
|
463
|
+
# resp.result_set.result_set_metadata.column_info[0].case_sensitive #=> Boolean
|
464
|
+
# resp.next_token #=> String
|
465
|
+
#
|
466
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults AWS API Documentation
|
467
|
+
#
|
468
|
+
# @overload get_query_results(params = {})
|
469
|
+
# @param [Hash] params ({})
|
470
|
+
def get_query_results(params = {}, options = {})
|
471
|
+
req = build_request(:get_query_results, params)
|
472
|
+
req.send_request(options)
|
473
|
+
end
|
474
|
+
|
475
|
+
# Provides a list of all available query IDs.
|
476
|
+
#
|
477
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
478
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
479
|
+
#
|
480
|
+
#
|
481
|
+
#
|
482
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
483
|
+
#
|
484
|
+
# @option params [String] :next_token
|
485
|
+
# The token that specifies where to start pagination if a previous
|
486
|
+
# request was truncated.
|
487
|
+
#
|
488
|
+
# @option params [Integer] :max_results
|
489
|
+
# The maximum number of queries to return in this request.
|
490
|
+
#
|
491
|
+
# @return [Types::ListNamedQueriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
492
|
+
#
|
493
|
+
# * {Types::ListNamedQueriesOutput#named_query_ids #named_query_ids} => Array<String>
|
494
|
+
# * {Types::ListNamedQueriesOutput#next_token #next_token} => String
|
495
|
+
#
|
496
|
+
# @example Request syntax with placeholder values
|
497
|
+
#
|
498
|
+
# resp = client.list_named_queries({
|
499
|
+
# next_token: "Token",
|
500
|
+
# max_results: 1,
|
501
|
+
# })
|
502
|
+
#
|
503
|
+
# @example Response structure
|
504
|
+
#
|
505
|
+
# resp.named_query_ids #=> Array
|
506
|
+
# resp.named_query_ids[0] #=> String
|
507
|
+
# resp.next_token #=> String
|
508
|
+
#
|
509
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries AWS API Documentation
|
510
|
+
#
|
511
|
+
# @overload list_named_queries(params = {})
|
512
|
+
# @param [Hash] params ({})
|
513
|
+
def list_named_queries(params = {}, options = {})
|
514
|
+
req = build_request(:list_named_queries, params)
|
515
|
+
req.send_request(options)
|
516
|
+
end
|
517
|
+
|
518
|
+
# Provides a list of all available query execution IDs.
|
519
|
+
#
|
520
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
521
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
522
|
+
#
|
523
|
+
#
|
524
|
+
#
|
525
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
526
|
+
#
|
527
|
+
# @option params [String] :next_token
|
528
|
+
# The token that specifies where to start pagination if a previous
|
529
|
+
# request was truncated.
|
530
|
+
#
|
531
|
+
# @option params [Integer] :max_results
|
532
|
+
# The maximum number of query executions to return in this request.
|
533
|
+
#
|
534
|
+
# @return [Types::ListQueryExecutionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
535
|
+
#
|
536
|
+
# * {Types::ListQueryExecutionsOutput#query_execution_ids #query_execution_ids} => Array<String>
|
537
|
+
# * {Types::ListQueryExecutionsOutput#next_token #next_token} => String
|
538
|
+
#
|
539
|
+
# @example Request syntax with placeholder values
|
540
|
+
#
|
541
|
+
# resp = client.list_query_executions({
|
542
|
+
# next_token: "Token",
|
543
|
+
# max_results: 1,
|
544
|
+
# })
|
545
|
+
#
|
546
|
+
# @example Response structure
|
547
|
+
#
|
548
|
+
# resp.query_execution_ids #=> Array
|
549
|
+
# resp.query_execution_ids[0] #=> String
|
550
|
+
# resp.next_token #=> String
|
551
|
+
#
|
552
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions AWS API Documentation
|
553
|
+
#
|
554
|
+
# @overload list_query_executions(params = {})
|
555
|
+
# @param [Hash] params ({})
|
556
|
+
def list_query_executions(params = {}, options = {})
|
557
|
+
req = build_request(:list_query_executions, params)
|
558
|
+
req.send_request(options)
|
559
|
+
end
|
560
|
+
|
561
|
+
# Runs (executes) the SQL query statements contained in the `Query`
|
562
|
+
# string.
|
563
|
+
#
|
564
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
565
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
566
|
+
#
|
567
|
+
#
|
568
|
+
#
|
569
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
570
|
+
#
|
571
|
+
# @option params [required, String] :query_string
|
572
|
+
# The SQL query statements to be executed.
|
573
|
+
#
|
574
|
+
# @option params [String] :client_request_token
|
575
|
+
# A unique case-sensitive string used to ensure the request to create
|
576
|
+
# the query is idempotent (executes only once). If another
|
577
|
+
# `StartQueryExecution` request is received, the same response is
|
578
|
+
# returned and another query is not created. If a parameter has changed,
|
579
|
+
# for example, the `QueryString`, an error is returned.
|
580
|
+
#
|
581
|
+
# This token is listed as not required because AWS SDKs (for example the
|
582
|
+
# AWS SDK for Java) auto-generate the token for users. If you are not
|
583
|
+
# using the AWS SDK or the AWS CLI, you must provide this token or the
|
584
|
+
# action will fail.
|
585
|
+
#
|
586
|
+
# **A suitable default value is auto-generated.** You should normally
|
587
|
+
# not need to pass this option.**
|
588
|
+
#
|
589
|
+
# @option params [Types::QueryExecutionContext] :query_execution_context
|
590
|
+
# The database within which the query executes.
|
591
|
+
#
|
592
|
+
# @option params [required, Types::ResultConfiguration] :result_configuration
|
593
|
+
# Specifies information about where and how to save the results of the
|
594
|
+
# query execution.
|
595
|
+
#
|
596
|
+
# @return [Types::StartQueryExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
597
|
+
#
|
598
|
+
# * {Types::StartQueryExecutionOutput#query_execution_id #query_execution_id} => String
|
599
|
+
#
|
600
|
+
# @example Request syntax with placeholder values
|
601
|
+
#
|
602
|
+
# resp = client.start_query_execution({
|
603
|
+
# query_string: "QueryString", # required
|
604
|
+
# client_request_token: "IdempotencyToken",
|
605
|
+
# query_execution_context: {
|
606
|
+
# database: "DatabaseString",
|
607
|
+
# },
|
608
|
+
# result_configuration: { # required
|
609
|
+
# output_location: "String", # required
|
610
|
+
# encryption_configuration: {
|
611
|
+
# encryption_option: "SSE_S3", # required, accepts SSE_S3, SSE_KMS, CSE_KMS
|
612
|
+
# kms_key: "String",
|
613
|
+
# },
|
614
|
+
# },
|
615
|
+
# })
|
616
|
+
#
|
617
|
+
# @example Response structure
|
618
|
+
#
|
619
|
+
# resp.query_execution_id #=> String
|
620
|
+
#
|
621
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution AWS API Documentation
|
622
|
+
#
|
623
|
+
# @overload start_query_execution(params = {})
|
624
|
+
# @param [Hash] params ({})
|
625
|
+
def start_query_execution(params = {}, options = {})
|
626
|
+
req = build_request(:start_query_execution, params)
|
627
|
+
req.send_request(options)
|
628
|
+
end
|
629
|
+
|
630
|
+
# Stops a query execution.
|
631
|
+
#
|
632
|
+
# For code samples using the AWS SDK for Java, see [Examples and Code
|
633
|
+
# Samples][1] in the *Amazon Athena User Guide*.
|
634
|
+
#
|
635
|
+
#
|
636
|
+
#
|
637
|
+
# [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
|
638
|
+
#
|
639
|
+
# @option params [required, String] :query_execution_id
|
640
|
+
# The unique ID of the query execution to stop.
|
641
|
+
#
|
642
|
+
# **A suitable default value is auto-generated.** You should normally
|
643
|
+
# not need to pass this option.**
|
644
|
+
#
|
645
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
646
|
+
#
|
647
|
+
# @example Request syntax with placeholder values
|
648
|
+
#
|
649
|
+
# resp = client.stop_query_execution({
|
650
|
+
# query_execution_id: "QueryExecutionId", # required
|
651
|
+
# })
|
652
|
+
#
|
653
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution AWS API Documentation
|
654
|
+
#
|
655
|
+
# @overload stop_query_execution(params = {})
|
656
|
+
# @param [Hash] params ({})
|
657
|
+
def stop_query_execution(params = {}, options = {})
|
658
|
+
req = build_request(:stop_query_execution, params)
|
659
|
+
req.send_request(options)
|
660
|
+
end
|
661
|
+
|
662
|
+
# @!endgroup
|
663
|
+
|
664
|
+
# @param params ({})
|
665
|
+
# @api private
|
666
|
+
def build_request(operation_name, params = {})
|
667
|
+
handlers = @handlers.for(operation_name)
|
668
|
+
context = Seahorse::Client::RequestContext.new(
|
669
|
+
operation_name: operation_name,
|
670
|
+
operation: config.api.operation(operation_name),
|
671
|
+
client: self,
|
672
|
+
params: params,
|
673
|
+
config: config)
|
674
|
+
context[:gem_name] = 'aws-sdk-athena'
|
675
|
+
context[:gem_version] = '1.0.0.rc1'
|
676
|
+
Seahorse::Client::Request.new(handlers, context)
|
677
|
+
end
|
678
|
+
|
679
|
+
# @api private
|
680
|
+
# @deprecated
|
681
|
+
def waiter_names
|
682
|
+
[]
|
683
|
+
end
|
684
|
+
|
685
|
+
class << self
|
686
|
+
|
687
|
+
# @api private
|
688
|
+
attr_reader :identifier
|
689
|
+
|
690
|
+
# @api private
|
691
|
+
def errors_module
|
692
|
+
Errors
|
693
|
+
end
|
694
|
+
|
695
|
+
end
|
696
|
+
end
|
697
|
+
end
|