UNPKG

49 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Athena extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Athena.Types.ClientConfiguration)
13 config: Config & Athena.Types.ClientConfiguration;
14 /**
15 * Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.
16 */
17 batchGetNamedQuery(params: Athena.Types.BatchGetNamedQueryInput, callback?: (err: AWSError, data: Athena.Types.BatchGetNamedQueryOutput) => void): Request<Athena.Types.BatchGetNamedQueryOutput, AWSError>;
18 /**
19 * Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.
20 */
21 batchGetNamedQuery(callback?: (err: AWSError, data: Athena.Types.BatchGetNamedQueryOutput) => void): Request<Athena.Types.BatchGetNamedQueryOutput, AWSError>;
22 /**
23 * Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.
24 */
25 batchGetQueryExecution(params: Athena.Types.BatchGetQueryExecutionInput, callback?: (err: AWSError, data: Athena.Types.BatchGetQueryExecutionOutput) => void): Request<Athena.Types.BatchGetQueryExecutionOutput, AWSError>;
26 /**
27 * Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.
28 */
29 batchGetQueryExecution(callback?: (err: AWSError, data: Athena.Types.BatchGetQueryExecutionOutput) => void): Request<Athena.Types.BatchGetQueryExecutionOutput, AWSError>;
30 /**
31 * Creates a named query in the specified workgroup. Requires that you have access to the workgroup. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
32 */
33 createNamedQuery(params: Athena.Types.CreateNamedQueryInput, callback?: (err: AWSError, data: Athena.Types.CreateNamedQueryOutput) => void): Request<Athena.Types.CreateNamedQueryOutput, AWSError>;
34 /**
35 * Creates a named query in the specified workgroup. Requires that you have access to the workgroup. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
36 */
37 createNamedQuery(callback?: (err: AWSError, data: Athena.Types.CreateNamedQueryOutput) => void): Request<Athena.Types.CreateNamedQueryOutput, AWSError>;
38 /**
39 * Creates a workgroup with the specified name.
40 */
41 createWorkGroup(params: Athena.Types.CreateWorkGroupInput, callback?: (err: AWSError, data: Athena.Types.CreateWorkGroupOutput) => void): Request<Athena.Types.CreateWorkGroupOutput, AWSError>;
42 /**
43 * Creates a workgroup with the specified name.
44 */
45 createWorkGroup(callback?: (err: AWSError, data: Athena.Types.CreateWorkGroupOutput) => void): Request<Athena.Types.CreateWorkGroupOutput, AWSError>;
46 /**
47 * Deletes the named query if you have access to the workgroup in which the query was saved. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
48 */
49 deleteNamedQuery(params: Athena.Types.DeleteNamedQueryInput, callback?: (err: AWSError, data: Athena.Types.DeleteNamedQueryOutput) => void): Request<Athena.Types.DeleteNamedQueryOutput, AWSError>;
50 /**
51 * Deletes the named query if you have access to the workgroup in which the query was saved. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
52 */
53 deleteNamedQuery(callback?: (err: AWSError, data: Athena.Types.DeleteNamedQueryOutput) => void): Request<Athena.Types.DeleteNamedQueryOutput, AWSError>;
54 /**
55 * Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
56 */
57 deleteWorkGroup(params: Athena.Types.DeleteWorkGroupInput, callback?: (err: AWSError, data: Athena.Types.DeleteWorkGroupOutput) => void): Request<Athena.Types.DeleteWorkGroupOutput, AWSError>;
58 /**
59 * Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
60 */
61 deleteWorkGroup(callback?: (err: AWSError, data: Athena.Types.DeleteWorkGroupOutput) => void): Request<Athena.Types.DeleteWorkGroupOutput, AWSError>;
62 /**
63 * Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
64 */
65 getNamedQuery(params: Athena.Types.GetNamedQueryInput, callback?: (err: AWSError, data: Athena.Types.GetNamedQueryOutput) => void): Request<Athena.Types.GetNamedQueryOutput, AWSError>;
66 /**
67 * Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
68 */
69 getNamedQuery(callback?: (err: AWSError, data: Athena.Types.GetNamedQueryOutput) => void): Request<Athena.Types.GetNamedQueryOutput, AWSError>;
70 /**
71 * Returns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.
72 */
73 getQueryExecution(params: Athena.Types.GetQueryExecutionInput, callback?: (err: AWSError, data: Athena.Types.GetQueryExecutionOutput) => void): Request<Athena.Types.GetQueryExecutionOutput, AWSError>;
74 /**
75 * Returns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.
76 */
77 getQueryExecution(callback?: (err: AWSError, data: Athena.Types.GetQueryExecutionOutput) => void): Request<Athena.Types.GetQueryExecutionOutput, AWSError>;
78 /**
79 * Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3. For more information, see Query Results in the Amazon Athena User Guide. This request does not execute the query but returns results. Use StartQueryExecution to run a query. To stream query results successfully, the IAM principal with permission to call GetQueryResults also must have permissions to the Amazon S3 GetObject action for the Athena query results location. IAM principals with permission to the Amazon S3 GetObject action for the query results location are able to retrieve query results from Amazon S3 even if permission to the GetQueryResults action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.
80 */
81 getQueryResults(params: Athena.Types.GetQueryResultsInput, callback?: (err: AWSError, data: Athena.Types.GetQueryResultsOutput) => void): Request<Athena.Types.GetQueryResultsOutput, AWSError>;
82 /**
83 * Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3. For more information, see Query Results in the Amazon Athena User Guide. This request does not execute the query but returns results. Use StartQueryExecution to run a query. To stream query results successfully, the IAM principal with permission to call GetQueryResults also must have permissions to the Amazon S3 GetObject action for the Athena query results location. IAM principals with permission to the Amazon S3 GetObject action for the query results location are able to retrieve query results from Amazon S3 even if permission to the GetQueryResults action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.
84 */
85 getQueryResults(callback?: (err: AWSError, data: Athena.Types.GetQueryResultsOutput) => void): Request<Athena.Types.GetQueryResultsOutput, AWSError>;
86 /**
87 * Returns information about the workgroup with the specified name.
88 */
89 getWorkGroup(params: Athena.Types.GetWorkGroupInput, callback?: (err: AWSError, data: Athena.Types.GetWorkGroupOutput) => void): Request<Athena.Types.GetWorkGroupOutput, AWSError>;
90 /**
91 * Returns information about the workgroup with the specified name.
92 */
93 getWorkGroup(callback?: (err: AWSError, data: Athena.Types.GetWorkGroupOutput) => void): Request<Athena.Types.GetWorkGroupOutput, AWSError>;
94 /**
95 * Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the workgroup. If a workgroup is not specified, lists the saved queries for the primary workgroup. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
96 */
97 listNamedQueries(params: Athena.Types.ListNamedQueriesInput, callback?: (err: AWSError, data: Athena.Types.ListNamedQueriesOutput) => void): Request<Athena.Types.ListNamedQueriesOutput, AWSError>;
98 /**
99 * Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the workgroup. If a workgroup is not specified, lists the saved queries for the primary workgroup. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
100 */
101 listNamedQueries(callback?: (err: AWSError, data: Athena.Types.ListNamedQueriesOutput) => void): Request<Athena.Types.ListNamedQueriesOutput, AWSError>;
102 /**
103 * Provides a list of available query execution IDs for the queries in the specified workgroup. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
104 */
105 listQueryExecutions(params: Athena.Types.ListQueryExecutionsInput, callback?: (err: AWSError, data: Athena.Types.ListQueryExecutionsOutput) => void): Request<Athena.Types.ListQueryExecutionsOutput, AWSError>;
106 /**
107 * Provides a list of available query execution IDs for the queries in the specified workgroup. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
108 */
109 listQueryExecutions(callback?: (err: AWSError, data: Athena.Types.ListQueryExecutionsOutput) => void): Request<Athena.Types.ListQueryExecutionsOutput, AWSError>;
110 /**
111 * Lists the tags associated with this workgroup.
112 */
113 listTagsForResource(params: Athena.Types.ListTagsForResourceInput, callback?: (err: AWSError, data: Athena.Types.ListTagsForResourceOutput) => void): Request<Athena.Types.ListTagsForResourceOutput, AWSError>;
114 /**
115 * Lists the tags associated with this workgroup.
116 */
117 listTagsForResource(callback?: (err: AWSError, data: Athena.Types.ListTagsForResourceOutput) => void): Request<Athena.Types.ListTagsForResourceOutput, AWSError>;
118 /**
119 * Lists available workgroups for the account.
120 */
121 listWorkGroups(params: Athena.Types.ListWorkGroupsInput, callback?: (err: AWSError, data: Athena.Types.ListWorkGroupsOutput) => void): Request<Athena.Types.ListWorkGroupsOutput, AWSError>;
122 /**
123 * Lists available workgroups for the account.
124 */
125 listWorkGroups(callback?: (err: AWSError, data: Athena.Types.ListWorkGroupsOutput) => void): Request<Athena.Types.ListWorkGroupsOutput, AWSError>;
126 /**
127 * Runs the SQL query statements contained in the Query. Requires you to have access to the workgroup in which the query ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
128 */
129 startQueryExecution(params: Athena.Types.StartQueryExecutionInput, callback?: (err: AWSError, data: Athena.Types.StartQueryExecutionOutput) => void): Request<Athena.Types.StartQueryExecutionOutput, AWSError>;
130 /**
131 * Runs the SQL query statements contained in the Query. Requires you to have access to the workgroup in which the query ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
132 */
133 startQueryExecution(callback?: (err: AWSError, data: Athena.Types.StartQueryExecutionOutput) => void): Request<Athena.Types.StartQueryExecutionOutput, AWSError>;
134 /**
135 * Stops a query execution. Requires you to have access to the workgroup in which the query ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
136 */
137 stopQueryExecution(params: Athena.Types.StopQueryExecutionInput, callback?: (err: AWSError, data: Athena.Types.StopQueryExecutionOutput) => void): Request<Athena.Types.StopQueryExecutionOutput, AWSError>;
138 /**
139 * Stops a query execution. Requires you to have access to the workgroup in which the query ran. For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
140 */
141 stopQueryExecution(callback?: (err: AWSError, data: Athena.Types.StopQueryExecutionOutput) => void): Request<Athena.Types.StopQueryExecutionOutput, AWSError>;
142 /**
143 * Adds one or more tags to the resource, such as a workgroup. A tag is a label that you assign to an AWS Athena resource (a workgroup). Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize resources (workgroups) in Athena, for example, by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups in your account. For best practices, see AWS Tagging Strategies. The key length is from 1 (minimum) to 128 (maximum) Unicode characters in UTF-8. The tag value length is from 0 (minimum) to 256 (maximum) Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one, separate them by commas.
144 */
145 tagResource(params: Athena.Types.TagResourceInput, callback?: (err: AWSError, data: Athena.Types.TagResourceOutput) => void): Request<Athena.Types.TagResourceOutput, AWSError>;
146 /**
147 * Adds one or more tags to the resource, such as a workgroup. A tag is a label that you assign to an AWS Athena resource (a workgroup). Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize resources (workgroups) in Athena, for example, by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups in your account. For best practices, see AWS Tagging Strategies. The key length is from 1 (minimum) to 128 (maximum) Unicode characters in UTF-8. The tag value length is from 0 (minimum) to 256 (maximum) Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one, separate them by commas.
148 */
149 tagResource(callback?: (err: AWSError, data: Athena.Types.TagResourceOutput) => void): Request<Athena.Types.TagResourceOutput, AWSError>;
150 /**
151 * Removes one or more tags from the workgroup resource. Takes as an input a list of TagKey Strings separated by commas, and removes their tags at the same time.
152 */
153 untagResource(params: Athena.Types.UntagResourceInput, callback?: (err: AWSError, data: Athena.Types.UntagResourceOutput) => void): Request<Athena.Types.UntagResourceOutput, AWSError>;
154 /**
155 * Removes one or more tags from the workgroup resource. Takes as an input a list of TagKey Strings separated by commas, and removes their tags at the same time.
156 */
157 untagResource(callback?: (err: AWSError, data: Athena.Types.UntagResourceOutput) => void): Request<Athena.Types.UntagResourceOutput, AWSError>;
158 /**
159 * Updates the workgroup with the specified name. The workgroup's name cannot be changed.
160 */
161 updateWorkGroup(params: Athena.Types.UpdateWorkGroupInput, callback?: (err: AWSError, data: Athena.Types.UpdateWorkGroupOutput) => void): Request<Athena.Types.UpdateWorkGroupOutput, AWSError>;
162 /**
163 * Updates the workgroup with the specified name. The workgroup's name cannot be changed.
164 */
165 updateWorkGroup(callback?: (err: AWSError, data: Athena.Types.UpdateWorkGroupOutput) => void): Request<Athena.Types.UpdateWorkGroupOutput, AWSError>;
166}
167declare namespace Athena {
168 export type AmazonResourceName = string;
169 export interface BatchGetNamedQueryInput {
170 /**
171 * An array of query IDs.
172 */
173 NamedQueryIds: NamedQueryIdList;
174 }
175 export interface BatchGetNamedQueryOutput {
176 /**
177 * Information about the named query IDs submitted.
178 */
179 NamedQueries?: NamedQueryList;
180 /**
181 * Information about provided query IDs.
182 */
183 UnprocessedNamedQueryIds?: UnprocessedNamedQueryIdList;
184 }
185 export interface BatchGetQueryExecutionInput {
186 /**
187 * An array of query execution IDs.
188 */
189 QueryExecutionIds: QueryExecutionIdList;
190 }
191 export interface BatchGetQueryExecutionOutput {
192 /**
193 * Information about a query execution.
194 */
195 QueryExecutions?: QueryExecutionList;
196 /**
197 * Information about the query executions that failed to run.
198 */
199 UnprocessedQueryExecutionIds?: UnprocessedQueryExecutionIdList;
200 }
201 export type Boolean = boolean;
202 export type BoxedBoolean = boolean;
203 export type BytesScannedCutoffValue = number;
204 export interface ColumnInfo {
205 /**
206 * The catalog to which the query results belong.
207 */
208 CatalogName?: String;
209 /**
210 * The schema name (database name) to which the query results belong.
211 */
212 SchemaName?: String;
213 /**
214 * The table name for the query results.
215 */
216 TableName?: String;
217 /**
218 * The name of the column.
219 */
220 Name: String;
221 /**
222 * A column label.
223 */
224 Label?: String;
225 /**
226 * The data type of the column.
227 */
228 Type: String;
229 /**
230 * For DECIMAL data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.
231 */
232 Precision?: Integer;
233 /**
234 * For DECIMAL data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.
235 */
236 Scale?: Integer;
237 /**
238 * Indicates the column's nullable status.
239 */
240 Nullable?: ColumnNullable;
241 /**
242 * Indicates whether values in the column are case-sensitive.
243 */
244 CaseSensitive?: Boolean;
245 }
246 export type ColumnInfoList = ColumnInfo[];
247 export type ColumnNullable = "NOT_NULL"|"NULLABLE"|"UNKNOWN"|string;
248 export interface CreateNamedQueryInput {
249 /**
250 * The query name.
251 */
252 Name: NameString;
253 /**
254 * The query description.
255 */
256 Description?: DescriptionString;
257 /**
258 * The database to which the query belongs.
259 */
260 Database: DatabaseString;
261 /**
262 * The contents of the query with all query statements.
263 */
264 QueryString: QueryString;
265 /**
266 * A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another CreateNamedQuery request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned. This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.
267 */
268 ClientRequestToken?: IdempotencyToken;
269 /**
270 * The name of the workgroup in which the named query is being created.
271 */
272 WorkGroup?: WorkGroupName;
273 }
274 export interface CreateNamedQueryOutput {
275 /**
276 * The unique ID of the query.
277 */
278 NamedQueryId?: NamedQueryId;
279 }
280 export interface CreateWorkGroupInput {
281 /**
282 * The workgroup name.
283 */
284 Name: WorkGroupName;
285 /**
286 * The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption configuration, if any, used for encrypting query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, the limit for the amount of bytes scanned (cutoff) per query, if it is specified, and whether workgroup's settings (specified with EnforceWorkGroupConfiguration) in the WorkGroupConfiguration override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
287 */
288 Configuration?: WorkGroupConfiguration;
289 /**
290 * The workgroup description.
291 */
292 Description?: WorkGroupDescriptionString;
293 /**
294 * One or more tags, separated by commas, that you want to attach to the workgroup as you create it.
295 */
296 Tags?: TagList;
297 }
298 export interface CreateWorkGroupOutput {
299 }
300 export type DatabaseString = string;
301 export type _Date = Date;
302 export interface Datum {
303 /**
304 * The value of the datum.
305 */
306 VarCharValue?: datumString;
307 }
308 export interface DeleteNamedQueryInput {
309 /**
310 * The unique ID of the query to delete.
311 */
312 NamedQueryId: NamedQueryId;
313 }
314 export interface DeleteNamedQueryOutput {
315 }
316 export interface DeleteWorkGroupInput {
317 /**
318 * The unique name of the workgroup to delete.
319 */
320 WorkGroup: WorkGroupName;
321 /**
322 * The option to delete the workgroup and its contents even if the workgroup contains any named queries.
323 */
324 RecursiveDeleteOption?: BoxedBoolean;
325 }
326 export interface DeleteWorkGroupOutput {
327 }
328 export type DescriptionString = string;
329 export interface EncryptionConfiguration {
330 /**
331 * Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or client-side encryption with KMS-managed keys (CSE-KMS) is used. If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
332 */
333 EncryptionOption: EncryptionOption;
334 /**
335 * For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.
336 */
337 KmsKey?: String;
338 }
339 export type EncryptionOption = "SSE_S3"|"SSE_KMS"|"CSE_KMS"|string;
340 export type ErrorCode = string;
341 export type ErrorMessage = string;
342 export interface GetNamedQueryInput {
343 /**
344 * The unique ID of the query. Use ListNamedQueries to get query IDs.
345 */
346 NamedQueryId: NamedQueryId;
347 }
348 export interface GetNamedQueryOutput {
349 /**
350 * Information about the query.
351 */
352 NamedQuery?: NamedQuery;
353 }
354 export interface GetQueryExecutionInput {
355 /**
356 * The unique ID of the query execution.
357 */
358 QueryExecutionId: QueryExecutionId;
359 }
360 export interface GetQueryExecutionOutput {
361 /**
362 * Information about the query execution.
363 */
364 QueryExecution?: QueryExecution;
365 }
366 export interface GetQueryResultsInput {
367 /**
368 * The unique ID of the query execution.
369 */
370 QueryExecutionId: QueryExecutionId;
371 /**
372 * The token that specifies where to start pagination if a previous request was truncated.
373 */
374 NextToken?: Token;
375 /**
376 * The maximum number of results (rows) to return in this request.
377 */
378 MaxResults?: MaxQueryResults;
379 }
380 export interface GetQueryResultsOutput {
381 /**
382 * The number of rows inserted with a CREATE TABLE AS SELECT statement.
383 */
384 UpdateCount?: Long;
385 /**
386 * The results of the query execution.
387 */
388 ResultSet?: ResultSet;
389 /**
390 * A token to be used by the next request if this request is truncated.
391 */
392 NextToken?: Token;
393 }
394 export interface GetWorkGroupInput {
395 /**
396 * The name of the workgroup.
397 */
398 WorkGroup: WorkGroupName;
399 }
400 export interface GetWorkGroupOutput {
401 /**
402 * Information about the workgroup.
403 */
404 WorkGroup?: WorkGroup;
405 }
406 export type IdempotencyToken = string;
407 export type Integer = number;
408 export interface ListNamedQueriesInput {
409 /**
410 * The token that specifies where to start pagination if a previous request was truncated.
411 */
412 NextToken?: Token;
413 /**
414 * The maximum number of queries to return in this request.
415 */
416 MaxResults?: MaxNamedQueriesCount;
417 /**
418 * The name of the workgroup from which the named queries are returned. If a workgroup is not specified, the saved queries for the primary workgroup are returned.
419 */
420 WorkGroup?: WorkGroupName;
421 }
422 export interface ListNamedQueriesOutput {
423 /**
424 * The list of unique query IDs.
425 */
426 NamedQueryIds?: NamedQueryIdList;
427 /**
428 * A token to be used by the next request if this request is truncated.
429 */
430 NextToken?: Token;
431 }
432 export interface ListQueryExecutionsInput {
433 /**
434 * The token that specifies where to start pagination if a previous request was truncated.
435 */
436 NextToken?: Token;
437 /**
438 * The maximum number of query executions to return in this request.
439 */
440 MaxResults?: MaxQueryExecutionsCount;
441 /**
442 * The name of the workgroup from which queries are returned. If a workgroup is not specified, a list of available query execution IDs for the queries in the primary workgroup is returned.
443 */
444 WorkGroup?: WorkGroupName;
445 }
446 export interface ListQueryExecutionsOutput {
447 /**
448 * The unique IDs of each query execution as an array of strings.
449 */
450 QueryExecutionIds?: QueryExecutionIdList;
451 /**
452 * A token to be used by the next request if this request is truncated.
453 */
454 NextToken?: Token;
455 }
456 export interface ListTagsForResourceInput {
457 /**
458 * Lists the tags for the workgroup resource with the specified ARN.
459 */
460 ResourceARN: AmazonResourceName;
461 /**
462 * The token for the next set of results, or null if there are no additional results for this request, where the request lists the tags for the workgroup resource with the specified ARN.
463 */
464 NextToken?: Token;
465 /**
466 * The maximum number of results to be returned per request that lists the tags for the workgroup resource.
467 */
468 MaxResults?: MaxTagsCount;
469 }
470 export interface ListTagsForResourceOutput {
471 /**
472 * The list of tags associated with this workgroup.
473 */
474 Tags?: TagList;
475 /**
476 * A token to be used by the next request if this request is truncated.
477 */
478 NextToken?: Token;
479 }
480 export interface ListWorkGroupsInput {
481 /**
482 * A token to be used by the next request if this request is truncated.
483 */
484 NextToken?: Token;
485 /**
486 * The maximum number of workgroups to return in this request.
487 */
488 MaxResults?: MaxWorkGroupsCount;
489 }
490 export interface ListWorkGroupsOutput {
491 /**
492 * The list of workgroups, including their names, descriptions, creation times, and states.
493 */
494 WorkGroups?: WorkGroupsList;
495 /**
496 * A token to be used by the next request if this request is truncated.
497 */
498 NextToken?: Token;
499 }
500 export type Long = number;
501 export type MaxNamedQueriesCount = number;
502 export type MaxQueryExecutionsCount = number;
503 export type MaxQueryResults = number;
504 export type MaxTagsCount = number;
505 export type MaxWorkGroupsCount = number;
506 export type NameString = string;
507 export interface NamedQuery {
508 /**
509 * The query name.
510 */
511 Name: NameString;
512 /**
513 * The query description.
514 */
515 Description?: DescriptionString;
516 /**
517 * The database to which the query belongs.
518 */
519 Database: DatabaseString;
520 /**
521 * The SQL query statements that comprise the query.
522 */
523 QueryString: QueryString;
524 /**
525 * The unique identifier of the query.
526 */
527 NamedQueryId?: NamedQueryId;
528 /**
529 * The name of the workgroup that contains the named query.
530 */
531 WorkGroup?: WorkGroupName;
532 }
533 export type NamedQueryId = string;
534 export type NamedQueryIdList = NamedQueryId[];
535 export type NamedQueryList = NamedQuery[];
536 export interface QueryExecution {
537 /**
538 * The unique identifier for each query execution.
539 */
540 QueryExecutionId?: QueryExecutionId;
541 /**
542 * The SQL query statements which the query execution ran.
543 */
544 Query?: QueryString;
545 /**
546 * The type of query statement that was run. DDL indicates DDL query statements. DML indicates DML (Data Manipulation Language) query statements, such as CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL and DML, such as SHOW CREATE TABLE, or DESCRIBE &lt;table&gt;.
547 */
548 StatementType?: StatementType;
549 /**
550 * The location in Amazon S3 where query results were stored and the encryption option, if any, used for query results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup.
551 */
552 ResultConfiguration?: ResultConfiguration;
553 /**
554 * The database in which the query execution occurred.
555 */
556 QueryExecutionContext?: QueryExecutionContext;
557 /**
558 * The completion date, current state, submission time, and state change reason (if applicable) for the query execution.
559 */
560 Status?: QueryExecutionStatus;
561 /**
562 * Query execution statistics, such as the amount of data scanned, the amount of time that the query took to process, and the type of statement that was run.
563 */
564 Statistics?: QueryExecutionStatistics;
565 /**
566 * The name of the workgroup in which the query ran.
567 */
568 WorkGroup?: WorkGroupName;
569 }
570 export interface QueryExecutionContext {
571 /**
572 * The name of the database.
573 */
574 Database?: DatabaseString;
575 }
576 export type QueryExecutionId = string;
577 export type QueryExecutionIdList = QueryExecutionId[];
578 export type QueryExecutionList = QueryExecution[];
579 export type QueryExecutionState = "QUEUED"|"RUNNING"|"SUCCEEDED"|"FAILED"|"CANCELLED"|string;
580 export interface QueryExecutionStatistics {
581 /**
582 * The number of milliseconds that the query took to execute.
583 */
584 EngineExecutionTimeInMillis?: Long;
585 /**
586 * The number of bytes in the data that was queried.
587 */
588 DataScannedInBytes?: Long;
589 /**
590 * The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output Files, and Query History in the Amazon Athena User Guide.
591 */
592 DataManifestLocation?: String;
593 /**
594 * The number of milliseconds that Athena took to run the query.
595 */
596 TotalExecutionTimeInMillis?: Long;
597 /**
598 * The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
599 */
600 QueryQueueTimeInMillis?: Long;
601 /**
602 * The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
603 */
604 QueryPlanningTimeInMillis?: Long;
605 /**
606 * The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
607 */
608 ServiceProcessingTimeInMillis?: Long;
609 }
610 export interface QueryExecutionStatus {
611 /**
612 * The state of query execution. QUEUED indicates that the query has been submitted to the service, and Athena will execute the query as soon as resources are available. RUNNING indicates that the query is in execution phase. SUCCEEDED indicates that the query completed without errors. FAILED indicates that the query experienced an error and did not complete processing. CANCELLED indicates that a user input interrupted query execution.
613 */
614 State?: QueryExecutionState;
615 /**
616 * Further detail about the status of the query.
617 */
618 StateChangeReason?: String;
619 /**
620 * The date and time that the query was submitted.
621 */
622 SubmissionDateTime?: _Date;
623 /**
624 * The date and time that the query completed.
625 */
626 CompletionDateTime?: _Date;
627 }
628 export type QueryString = string;
629 export interface ResultConfiguration {
630 /**
631 * The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. For more information, see Query Results. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
632 */
633 OutputLocation?: String;
634 /**
635 * If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE-KMS or CSE-KMS) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.
636 */
637 EncryptionConfiguration?: EncryptionConfiguration;
638 }
639 export interface ResultConfigurationUpdates {
640 /**
641 * The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. For more information, see Query Results If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup. The "workgroup settings override" is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
642 */
643 OutputLocation?: String;
644 /**
645 * If set to "true", indicates that the previously-specified query results location (also known as a client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the OutputLocation in ResultConfigurationUpdates (the client-side setting), the OutputLocation in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
646 */
647 RemoveOutputLocation?: BoxedBoolean;
648 /**
649 * The encryption configuration for the query results.
650 */
651 EncryptionConfiguration?: EncryptionConfiguration;
652 /**
653 * If set to "true", indicates that the previously-specified encryption configuration (also known as the client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the EncryptionConfiguration in ResultConfigurationUpdates (the client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
654 */
655 RemoveEncryptionConfiguration?: BoxedBoolean;
656 }
657 export interface ResultSet {
658 /**
659 * The rows in the table.
660 */
661 Rows?: RowList;
662 /**
663 * The metadata that describes the column structure and data types of a table of query results.
664 */
665 ResultSetMetadata?: ResultSetMetadata;
666 }
667 export interface ResultSetMetadata {
668 /**
669 * Information about the columns returned in a query result metadata.
670 */
671 ColumnInfo?: ColumnInfoList;
672 }
673 export interface Row {
674 /**
675 * The data that populates a row in a query result table.
676 */
677 Data?: datumList;
678 }
679 export type RowList = Row[];
680 export interface StartQueryExecutionInput {
681 /**
682 * The SQL query statements to be executed.
683 */
684 QueryString: QueryString;
685 /**
686 * A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned. This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.
687 */
688 ClientRequestToken?: IdempotencyToken;
689 /**
690 * The database within which the query executes.
691 */
692 QueryExecutionContext?: QueryExecutionContext;
693 /**
694 * Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
695 */
696 ResultConfiguration?: ResultConfiguration;
697 /**
698 * The name of the workgroup in which the query is being started.
699 */
700 WorkGroup?: WorkGroupName;
701 }
702 export interface StartQueryExecutionOutput {
703 /**
704 * The unique ID of the query that ran as a result of this request.
705 */
706 QueryExecutionId?: QueryExecutionId;
707 }
708 export type StatementType = "DDL"|"DML"|"UTILITY"|string;
709 export interface StopQueryExecutionInput {
710 /**
711 * The unique ID of the query execution to stop.
712 */
713 QueryExecutionId: QueryExecutionId;
714 }
715 export interface StopQueryExecutionOutput {
716 }
717 export type String = string;
718 export interface Tag {
719 /**
720 * A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
721 */
722 Key?: TagKey;
723 /**
724 * A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
725 */
726 Value?: TagValue;
727 }
728 export type TagKey = string;
729 export type TagKeyList = TagKey[];
730 export type TagList = Tag[];
731 export interface TagResourceInput {
732 /**
733 * Requests that one or more tags are added to the resource (such as a workgroup) for the specified ARN.
734 */
735 ResourceARN: AmazonResourceName;
736 /**
737 * One or more tags, separated by commas, to be added to the resource, such as a workgroup.
738 */
739 Tags: TagList;
740 }
741 export interface TagResourceOutput {
742 }
743 export type TagValue = string;
744 export type Token = string;
745 export interface UnprocessedNamedQueryId {
746 /**
747 * The unique identifier of the named query.
748 */
749 NamedQueryId?: NamedQueryId;
750 /**
751 * The error code returned when the processing request for the named query failed, if applicable.
752 */
753 ErrorCode?: ErrorCode;
754 /**
755 * The error message returned when the processing request for the named query failed, if applicable.
756 */
757 ErrorMessage?: ErrorMessage;
758 }
759 export type UnprocessedNamedQueryIdList = UnprocessedNamedQueryId[];
760 export interface UnprocessedQueryExecutionId {
761 /**
762 * The unique identifier of the query execution.
763 */
764 QueryExecutionId?: QueryExecutionId;
765 /**
766 * The error code returned when the query execution failed to process, if applicable.
767 */
768 ErrorCode?: ErrorCode;
769 /**
770 * The error message returned when the query execution failed to process, if applicable.
771 */
772 ErrorMessage?: ErrorMessage;
773 }
774 export type UnprocessedQueryExecutionIdList = UnprocessedQueryExecutionId[];
775 export interface UntagResourceInput {
776 /**
777 * Removes one or more tags from the workgroup resource for the specified ARN.
778 */
779 ResourceARN: AmazonResourceName;
780 /**
781 * Removes the tags associated with one or more tag keys from the workgroup resource.
782 */
783 TagKeys: TagKeyList;
784 }
785 export interface UntagResourceOutput {
786 }
787 export interface UpdateWorkGroupInput {
788 /**
789 * The specified workgroup that will be updated.
790 */
791 WorkGroup: WorkGroupName;
792 /**
793 * The workgroup description.
794 */
795 Description?: WorkGroupDescriptionString;
796 /**
797 * The workgroup configuration that will be updated for the given workgroup.
798 */
799 ConfigurationUpdates?: WorkGroupConfigurationUpdates;
800 /**
801 * The workgroup state that will be updated for the given workgroup.
802 */
803 State?: WorkGroupState;
804 }
805 export interface UpdateWorkGroupOutput {
806 }
807 export interface WorkGroup {
808 /**
809 * The workgroup name.
810 */
811 Name: WorkGroupName;
812 /**
813 * The state of the workgroup: ENABLED or DISABLED.
814 */
815 State?: WorkGroupState;
816 /**
817 * The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption configuration, if any, used for query results; whether the Amazon CloudWatch Metrics are enabled for the workgroup; whether workgroup settings override client-side settings; and the data usage limits for the amount of data scanned per query or per workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
818 */
819 Configuration?: WorkGroupConfiguration;
820 /**
821 * The workgroup description.
822 */
823 Description?: WorkGroupDescriptionString;
824 /**
825 * The date and time the workgroup was created.
826 */
827 CreationTime?: _Date;
828 }
829 export interface WorkGroupConfiguration {
830 /**
831 * The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored and the encryption option, if any, used for query results. To run the query, you must specify the query results location using one of the ways: either in the workgroup using this setting, or for individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error that no output location is provided. For more information, see Query Results.
832 */
833 ResultConfiguration?: ResultConfiguration;
834 /**
835 * If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
836 */
837 EnforceWorkGroupConfiguration?: BoxedBoolean;
838 /**
839 * Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
840 */
841 PublishCloudWatchMetricsEnabled?: BoxedBoolean;
842 /**
843 * The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
844 */
845 BytesScannedCutoffPerQuery?: BytesScannedCutoffValue;
846 /**
847 * If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
848 */
849 RequesterPaysEnabled?: BoxedBoolean;
850 }
851 export interface WorkGroupConfigurationUpdates {
852 /**
853 * If set to "true", the settings for the workgroup override client-side settings. If set to "false" client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
854 */
855 EnforceWorkGroupConfiguration?: BoxedBoolean;
856 /**
857 * The result configuration information about the queries in this workgroup that will be updated. Includes the updated results location and an updated option for encrypting query results.
858 */
859 ResultConfigurationUpdates?: ResultConfigurationUpdates;
860 /**
861 * Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
862 */
863 PublishCloudWatchMetricsEnabled?: BoxedBoolean;
864 /**
865 * The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
866 */
867 BytesScannedCutoffPerQuery?: BytesScannedCutoffValue;
868 /**
869 * Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
870 */
871 RemoveBytesScannedCutoffPerQuery?: BoxedBoolean;
872 /**
873 * If set to true, allows members assigned to a workgroup to specify Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
874 */
875 RequesterPaysEnabled?: BoxedBoolean;
876 }
877 export type WorkGroupDescriptionString = string;
878 export type WorkGroupName = string;
879 export type WorkGroupState = "ENABLED"|"DISABLED"|string;
880 export interface WorkGroupSummary {
881 /**
882 * The name of the workgroup.
883 */
884 Name?: WorkGroupName;
885 /**
886 * The state of the workgroup.
887 */
888 State?: WorkGroupState;
889 /**
890 * The workgroup description.
891 */
892 Description?: WorkGroupDescriptionString;
893 /**
894 * The workgroup creation date and time.
895 */
896 CreationTime?: _Date;
897 }
898 export type WorkGroupsList = WorkGroupSummary[];
899 export type datumList = Datum[];
900 export type datumString = string;
901 /**
902 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
903 */
904 export type apiVersion = "2017-05-18"|"latest"|string;
905 export interface ClientApiVersions {
906 /**
907 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
908 */
909 apiVersion?: apiVersion;
910 }
911 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
912 /**
913 * Contains interfaces for use with the Athena client.
914 */
915 export import Types = Athena;
916}
917export = Athena;