Skip to content

Commit 905ab58

Browse files
author
awstools
committed
feat(client-athena): This release adds subfields, ErrorMessage, Retryable, to the AthenaError response object in the GetQueryExecution API when a query fails.
1 parent 4850e32 commit 905ab58

File tree

5 files changed

+56
-31
lines changed

5 files changed

+56
-31
lines changed

clients/client-athena/src/Athena.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,8 @@ export class Athena extends AthenaClient {
12701270
}
12711271

12721272
/**
1273-
* <p>Updates a <a>NamedQuery</a> object. The database or workgroup cannot be updated.</p>
1273+
* <p>Updates a <a>NamedQuery</a> object. The database or workgroup cannot be
1274+
* updated.</p>
12741275
*/
12751276
public updateNamedQuery(
12761277
args: UpdateNamedQueryCommandInput,

clients/client-athena/src/commands/UpdateNamedQueryCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export interface UpdateNamedQueryCommandInput extends UpdateNamedQueryInput {}
2222
export interface UpdateNamedQueryCommandOutput extends UpdateNamedQueryOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Updates a <a>NamedQuery</a> object. The database or workgroup cannot be updated.</p>
25+
* <p>Updates a <a>NamedQuery</a> object. The database or workgroup cannot be
26+
* updated.</p>
2627
* @example
2728
* Use a bare-bones client and the command you need to make an API call.
2829
* ```javascript

clients/client-athena/src/models/models_0.ts

+27-18
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export interface AclConfiguration {
2121
* <code>BUCKET_OWNER_FULL_CONTROL</code>. If a query runs in a workgroup and the
2222
* workgroup overrides client-side settings, then the Amazon S3 canned ACL
2323
* specified in the workgroup's settings is used for all queries that run in the workgroup.
24-
* For more information about Amazon S3 canned ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl">Canned ACL</a> in the <i>Amazon S3 User
25-
* Guide</i>.</p>
24+
* For more information about Amazon S3 canned ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
2625
*/
2726
S3AclOption: S3AclOption | string | undefined;
2827
}
@@ -53,8 +52,8 @@ export namespace BatchGetNamedQueryInput {
5352
}
5453

5554
/**
56-
* <p>A query, where <code>QueryString</code> contains the SQL statements that
57-
* make up the query.</p>
55+
* <p>A query, where <code>QueryString</code> contains the SQL statements that make up the
56+
* query.</p>
5857
*/
5958
export interface NamedQuery {
6059
/**
@@ -279,22 +278,22 @@ export enum EncryptionOption {
279278

280279
/**
281280
* <p>If query results are encrypted in Amazon S3, indicates the encryption option
282-
* used (for example, <code>SSE-KMS</code> or <code>CSE-KMS</code>) and key
281+
* used (for example, <code>SSE_KMS</code> or <code>CSE_KMS</code>) and key
283282
* information.</p>
284283
*/
285284
export interface EncryptionConfiguration {
286285
/**
287-
* <p>Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (<code>SSE-S3</code>), server-side encryption with KMS-managed keys
288-
* (<code>SSE-KMS</code>), or client-side encryption with KMS-managed keys (CSE-KMS) is
289-
* used.</p>
286+
* <p>Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (<code>SSE_S3</code>), server-side encryption with KMS-managed keys
287+
* (<code>SSE_KMS</code>), or client-side encryption with KMS-managed keys
288+
* (<code>CSE_KMS</code>) is used.</p>
290289
* <p>If a query runs in a workgroup and the workgroup overrides client-side settings, then
291290
* the workgroup's setting for encryption is used. It specifies whether query results must
292291
* be encrypted, for all queries that run in this workgroup. </p>
293292
*/
294293
EncryptionOption: EncryptionOption | string | undefined;
295294

296295
/**
297-
* <p>For <code>SSE-KMS</code> and <code>CSE-KMS</code>, this is the KMS key ARN or
296+
* <p>For <code>SSE_KMS</code> and <code>CSE_KMS</code>, this is the KMS key ARN or
298297
* ID.</p>
299298
*/
300299
KmsKey?: string;
@@ -329,7 +328,7 @@ export interface ResultConfiguration {
329328

330329
/**
331330
* <p>If query results are encrypted in Amazon S3, indicates the encryption option
332-
* used (for example, <code>SSE-KMS</code> or <code>CSE-KMS</code>) and key information.
331+
* used (for example, <code>SSE_KMS</code> or <code>CSE_KMS</code>) and key information.
333332
* This is a client-side setting. If workgroup settings override client-side settings, then
334333
* the query uses the encryption configuration that is specified for the workgroup, and
335334
* also uses the location for storing query results specified in the workgroup. See <a>WorkGroupConfiguration$EnforceWorkGroupConfiguration</a> and <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup Settings Override Client-Side Settings</a>.</p>
@@ -340,7 +339,7 @@ export interface ResultConfiguration {
340339
* <p>The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by <a>ResultConfiguration$OutputLocation</a>.
341340
* If set, Athena uses the value for <code>ExpectedBucketOwner</code> when it
342341
* makes Amazon S3 calls to your specified output location. If the
343-
* <code>ExpectedBucketOwner</code>
342+
* <code>ExpectedBucketOwner</code>
344343
* Amazon Web Services account ID does not match the actual owner of the Amazon S3
345344
* bucket, the call fails with a permissions error.</p>
346345
* <p>This is a client-side setting. If workgroup settings override client-side settings,
@@ -466,6 +465,16 @@ export interface AthenaError {
466465
* Guide</i>.</p>
467466
*/
468467
ErrorType?: number;
468+
469+
/**
470+
* <p>True if the query might succeed if resubmitted.</p>
471+
*/
472+
Retryable?: boolean;
473+
474+
/**
475+
* <p>Contains a short description of the error that occurred.</p>
476+
*/
477+
ErrorMessage?: string;
469478
}
470479

471480
export namespace AthenaError {
@@ -2898,9 +2907,9 @@ export interface ResultConfigurationUpdates {
28982907
* <p>If set to "true", indicates that the previously-specified query results location (also
28992908
* known as a client-side setting) for queries in this workgroup should be ignored and set
29002909
* to null. If set to "false" or not set, and a value is present in the
2901-
* <code>OutputLocation</code> in <code>ResultConfigurationUpdates</code> (the
2910+
* <code>OutputLocation</code> in <code>ResultConfigurationUpdates</code> (the
29022911
* client-side setting), the <code>OutputLocation</code> in the workgroup's
2903-
* <code>ResultConfiguration</code> will be updated with the new value. For more
2912+
* <code>ResultConfiguration</code> will be updated with the new value. For more
29042913
* information, see <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup Settings Override
29052914
* Client-Side Settings</a>.</p>
29062915
*/
@@ -2927,22 +2936,22 @@ export interface ResultConfigurationUpdates {
29272936
* <p>The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by <a>ResultConfiguration$OutputLocation</a>.
29282937
* If set, Athena uses the value for <code>ExpectedBucketOwner</code> when it
29292938
* makes Amazon S3 calls to your specified output location. If the
2930-
* <code>ExpectedBucketOwner</code>
2939+
* <code>ExpectedBucketOwner</code>
29312940
* Amazon Web Services account ID does not match the actual owner of the Amazon S3
29322941
* bucket, the call fails with a permissions error.</p>
29332942
*
29342943
* <p>If workgroup settings override client-side settings, then the query uses the
2935-
* <code>ExpectedBucketOwner</code> setting that is specified for the workgroup, and
2944+
* <code>ExpectedBucketOwner</code> setting that is specified for the workgroup, and
29362945
* also uses the location for storing query results specified in the workgroup. See <a>WorkGroupConfiguration$EnforceWorkGroupConfiguration</a> and <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup Settings Override Client-Side Settings</a>.</p>
29372946
*/
29382947
ExpectedBucketOwner?: string;
29392948

29402949
/**
29412950
* <p>If set to "true", removes the Amazon Web Services account ID previously specified for
2942-
* <a>ResultConfiguration$ExpectedBucketOwner</a>. If set to "false" or not
2951+
* <a>ResultConfiguration$ExpectedBucketOwner</a>. If set to "false" or not
29432952
* set, and a value is present in the <code>ExpectedBucketOwner</code> in
2944-
* <code>ResultConfigurationUpdates</code> (the client-side setting), the
2945-
* <code>ExpectedBucketOwner</code> in the workgroup's <code>ResultConfiguration</code>
2953+
* <code>ResultConfigurationUpdates</code> (the client-side setting), the
2954+
* <code>ExpectedBucketOwner</code> in the workgroup's <code>ResultConfiguration</code>
29462955
* is updated with the new value. For more information, see <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup Settings Override
29472956
* Client-Side Settings</a>.</p>
29482957
*/

clients/client-athena/src/protocols/Aws_json1_1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2881,7 +2881,9 @@ const deserializeAws_json1_1AclConfiguration = (output: any, context: __SerdeCon
28812881
const deserializeAws_json1_1AthenaError = (output: any, context: __SerdeContext): AthenaError => {
28822882
return {
28832883
ErrorCategory: __expectInt32(output.ErrorCategory),
2884+
ErrorMessage: __expectString(output.ErrorMessage),
28842885
ErrorType: __expectInt32(output.ErrorType),
2886+
Retryable: __expectBoolean(output.Retryable),
28852887
} as any;
28862888
};
28872889

0 commit comments

Comments
 (0)