UNPKG

44.4 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 * Returns the results of a single query execution specified by QueryExecutionId if you have access to the workgroup in which the query ran. This request does not execute the query but returns results. Use StartQueryExecution to run a query.
80 */
81 getQueryResults(params: Athena.Types.GetQueryResultsInput, callback?: (err: AWSError, data: Athena.Types.GetQueryResultsOutput) => void): Request<Athena.Types.GetQueryResultsOutput, AWSError>;
82 /**
83 * Returns the results of a single query execution specified by QueryExecutionId if you have access to the workgroup in which the query ran. This request does not execute the query but returns results. Use StartQueryExecution to run a query.
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. 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. 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. 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. 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 being 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 being 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 * The amount of data scanned during the query execution and the amount of time that it took to execute, 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 export interface QueryExecutionStatus {
591 /**
592 * The state of query execution. QUEUED state is listed but is not used by Athena and is reserved for future use. RUNNING indicates that the query has been submitted to the service, and Athena will execute the query as soon as resources are available. 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.
593 */
594 State?: QueryExecutionState;
595 /**
596 * Further detail about the status of the query.
597 */
598 StateChangeReason?: String;
599 /**
600 * The date and time that the query was submitted.
601 */
602 SubmissionDateTime?: _Date;
603 /**
604 * The date and time that the query completed.
605 */
606 CompletionDateTime?: _Date;
607 }
608 export type QueryString = string;
609 export interface ResultConfiguration {
610 /**
611 * The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. For more information, see Queries and Query Result Files. 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.
612 */
613 OutputLocation?: String;
614 /**
615 * 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.
616 */
617 EncryptionConfiguration?: EncryptionConfiguration;
618 }
619 export interface ResultConfigurationUpdates {
620 /**
621 * The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. For more information, see Queries and Query Result Files. 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.
622 */
623 OutputLocation?: String;
624 /**
625 * 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.
626 */
627 RemoveOutputLocation?: BoxedBoolean;
628 /**
629 * The encryption configuration for the query results.
630 */
631 EncryptionConfiguration?: EncryptionConfiguration;
632 /**
633 * 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.
634 */
635 RemoveEncryptionConfiguration?: BoxedBoolean;
636 }
637 export interface ResultSet {
638 /**
639 * The rows in the table.
640 */
641 Rows?: RowList;
642 /**
643 * The metadata that describes the column structure and data types of a table of query results.
644 */
645 ResultSetMetadata?: ResultSetMetadata;
646 }
647 export interface ResultSetMetadata {
648 /**
649 * Information about the columns returned in a query result metadata.
650 */
651 ColumnInfo?: ColumnInfoList;
652 }
653 export interface Row {
654 /**
655 * The data that populates a row in a query result table.
656 */
657 Data?: datumList;
658 }
659 export type RowList = Row[];
660 export interface StartQueryExecutionInput {
661 /**
662 * The SQL query statements to be executed.
663 */
664 QueryString: QueryString;
665 /**
666 * 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.
667 */
668 ClientRequestToken?: IdempotencyToken;
669 /**
670 * The database within which the query executes.
671 */
672 QueryExecutionContext?: QueryExecutionContext;
673 /**
674 * 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.
675 */
676 ResultConfiguration?: ResultConfiguration;
677 /**
678 * The name of the workgroup in which the query is being started.
679 */
680 WorkGroup?: WorkGroupName;
681 }
682 export interface StartQueryExecutionOutput {
683 /**
684 * The unique ID of the query that ran as a result of this request.
685 */
686 QueryExecutionId?: QueryExecutionId;
687 }
688 export type StatementType = "DDL"|"DML"|"UTILITY"|string;
689 export interface StopQueryExecutionInput {
690 /**
691 * The unique ID of the query execution to stop.
692 */
693 QueryExecutionId: QueryExecutionId;
694 }
695 export interface StopQueryExecutionOutput {
696 }
697 export type String = string;
698 export interface Tag {
699 /**
700 * 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.
701 */
702 Key?: TagKey;
703 /**
704 * 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.
705 */
706 Value?: TagValue;
707 }
708 export type TagKey = string;
709 export type TagKeyList = TagKey[];
710 export type TagList = Tag[];
711 export interface TagResourceInput {
712 /**
713 * Requests that one or more tags are added to the resource (such as a workgroup) for the specified ARN.
714 */
715 ResourceARN: AmazonResourceName;
716 /**
717 * One or more tags, separated by commas, to be added to the resource, such as a workgroup.
718 */
719 Tags: TagList;
720 }
721 export interface TagResourceOutput {
722 }
723 export type TagValue = string;
724 export type Token = string;
725 export interface UnprocessedNamedQueryId {
726 /**
727 * The unique identifier of the named query.
728 */
729 NamedQueryId?: NamedQueryId;
730 /**
731 * The error code returned when the processing request for the named query failed, if applicable.
732 */
733 ErrorCode?: ErrorCode;
734 /**
735 * The error message returned when the processing request for the named query failed, if applicable.
736 */
737 ErrorMessage?: ErrorMessage;
738 }
739 export type UnprocessedNamedQueryIdList = UnprocessedNamedQueryId[];
740 export interface UnprocessedQueryExecutionId {
741 /**
742 * The unique identifier of the query execution.
743 */
744 QueryExecutionId?: QueryExecutionId;
745 /**
746 * The error code returned when the query execution failed to process, if applicable.
747 */
748 ErrorCode?: ErrorCode;
749 /**
750 * The error message returned when the query execution failed to process, if applicable.
751 */
752 ErrorMessage?: ErrorMessage;
753 }
754 export type UnprocessedQueryExecutionIdList = UnprocessedQueryExecutionId[];
755 export interface UntagResourceInput {
756 /**
757 * Removes one or more tags from the workgroup resource for the specified ARN.
758 */
759 ResourceARN: AmazonResourceName;
760 /**
761 * Removes the tags associated with one or more tag keys from the workgroup resource.
762 */
763 TagKeys: TagKeyList;
764 }
765 export interface UntagResourceOutput {
766 }
767 export interface UpdateWorkGroupInput {
768 /**
769 * The specified workgroup that will be updated.
770 */
771 WorkGroup: WorkGroupName;
772 /**
773 * The workgroup description.
774 */
775 Description?: WorkGroupDescriptionString;
776 /**
777 * The workgroup configuration that will be updated for the given workgroup.
778 */
779 ConfigurationUpdates?: WorkGroupConfigurationUpdates;
780 /**
781 * The workgroup state that will be updated for the given workgroup.
782 */
783 State?: WorkGroupState;
784 }
785 export interface UpdateWorkGroupOutput {
786 }
787 export interface WorkGroup {
788 /**
789 * The workgroup name.
790 */
791 Name: WorkGroupName;
792 /**
793 * The state of the workgroup: ENABLED or DISABLED.
794 */
795 State?: WorkGroupState;
796 /**
797 * 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 limit for the amount of data scanned per query, if it is specified. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
798 */
799 Configuration?: WorkGroupConfiguration;
800 /**
801 * The workgroup description.
802 */
803 Description?: WorkGroupDescriptionString;
804 /**
805 * The date and time the workgroup was created.
806 */
807 CreationTime?: _Date;
808 }
809 export interface WorkGroupConfiguration {
810 /**
811 * 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.
812 */
813 ResultConfiguration?: ResultConfiguration;
814 /**
815 * 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.
816 */
817 EnforceWorkGroupConfiguration?: BoxedBoolean;
818 /**
819 * Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
820 */
821 PublishCloudWatchMetricsEnabled?: BoxedBoolean;
822 /**
823 * The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
824 */
825 BytesScannedCutoffPerQuery?: BytesScannedCutoffValue;
826 }
827 export interface WorkGroupConfigurationUpdates {
828 /**
829 * 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.
830 */
831 EnforceWorkGroupConfiguration?: BoxedBoolean;
832 /**
833 * 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.
834 */
835 ResultConfigurationUpdates?: ResultConfigurationUpdates;
836 /**
837 * Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
838 */
839 PublishCloudWatchMetricsEnabled?: BoxedBoolean;
840 /**
841 * The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
842 */
843 BytesScannedCutoffPerQuery?: BytesScannedCutoffValue;
844 /**
845 * Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
846 */
847 RemoveBytesScannedCutoffPerQuery?: BoxedBoolean;
848 }
849 export type WorkGroupDescriptionString = string;
850 export type WorkGroupName = string;
851 export type WorkGroupState = "ENABLED"|"DISABLED"|string;
852 export interface WorkGroupSummary {
853 /**
854 * The name of the workgroup.
855 */
856 Name?: WorkGroupName;
857 /**
858 * The state of the workgroup.
859 */
860 State?: WorkGroupState;
861 /**
862 * The workgroup description.
863 */
864 Description?: WorkGroupDescriptionString;
865 /**
866 * The workgroup creation date and time.
867 */
868 CreationTime?: _Date;
869 }
870 export type WorkGroupsList = WorkGroupSummary[];
871 export type datumList = Datum[];
872 export type datumString = string;
873 /**
874 * 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.
875 */
876 export type apiVersion = "2017-05-18"|"latest"|string;
877 export interface ClientApiVersions {
878 /**
879 * 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.
880 */
881 apiVersion?: apiVersion;
882 }
883 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
884 /**
885 * Contains interfaces for use with the Athena client.
886 */
887 export import Types = Athena;
888}
889export = Athena;