diff --git a/clients/client-rds-data/src/commands/BatchExecuteStatementCommand.ts b/clients/client-rds-data/src/commands/BatchExecuteStatementCommand.ts index 7b081170d4fc..42530b42af11 100644 --- a/clients/client-rds-data/src/commands/BatchExecuteStatementCommand.ts +++ b/clients/client-rds-data/src/commands/BatchExecuteStatementCommand.ts @@ -178,9 +178,9 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen *

The DB cluster doesn't have a DB instance.

* * @throws {@link DatabaseResumingException} (client fault) - *

A request was canceled because the Aurora Serverless v2 DB instance was in a paused state. - * The Data API request automatically causes the DB instance to begin resuming. Wait a few seconds and - * try again.

+ *

A request was cancelled because the Aurora Serverless v2 DB instance was paused. + * The Data API request automatically resumes the DB instance. Wait a few seconds and + * try again.

* * @throws {@link DatabaseUnavailableException} (server fault) *

The writer instance in the DB cluster isn't available.

@@ -194,6 +194,9 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen * @throws {@link InternalServerErrorException} (server fault) *

An internal error occurred.

* + * @throws {@link InvalidResourceStateException} (client fault) + *

The resource is in an invalid state.

+ * * @throws {@link InvalidSecretException} (client fault) *

The Secrets Manager secret used with the request isn't valid.

* diff --git a/clients/client-rds-data/src/commands/BeginTransactionCommand.ts b/clients/client-rds-data/src/commands/BeginTransactionCommand.ts index 20e7d23a09d4..3dee53851186 100644 --- a/clients/client-rds-data/src/commands/BeginTransactionCommand.ts +++ b/clients/client-rds-data/src/commands/BeginTransactionCommand.ts @@ -76,9 +76,9 @@ export interface BeginTransactionCommandOutput extends BeginTransactionResponse, *

The DB cluster doesn't have a DB instance.

* * @throws {@link DatabaseResumingException} (client fault) - *

A request was canceled because the Aurora Serverless v2 DB instance was in a paused state. - * The Data API request automatically causes the DB instance to begin resuming. Wait a few seconds and - * try again.

+ *

A request was cancelled because the Aurora Serverless v2 DB instance was paused. + * The Data API request automatically resumes the DB instance. Wait a few seconds and + * try again.

* * @throws {@link DatabaseUnavailableException} (server fault) *

The writer instance in the DB cluster isn't available.

@@ -92,6 +92,9 @@ export interface BeginTransactionCommandOutput extends BeginTransactionResponse, * @throws {@link InternalServerErrorException} (server fault) *

An internal error occurred.

* + * @throws {@link InvalidResourceStateException} (client fault) + *

The resource is in an invalid state.

+ * * @throws {@link InvalidSecretException} (client fault) *

The Secrets Manager secret used with the request isn't valid.

* diff --git a/clients/client-rds-data/src/commands/CommitTransactionCommand.ts b/clients/client-rds-data/src/commands/CommitTransactionCommand.ts index 9d981fe98a1e..3702c3c20c6f 100644 --- a/clients/client-rds-data/src/commands/CommitTransactionCommand.ts +++ b/clients/client-rds-data/src/commands/CommitTransactionCommand.ts @@ -79,6 +79,9 @@ export interface CommitTransactionCommandOutput extends CommitTransactionRespons * @throws {@link InternalServerErrorException} (server fault) *

An internal error occurred.

* + * @throws {@link InvalidResourceStateException} (client fault) + *

The resource is in an invalid state.

+ * * @throws {@link InvalidSecretException} (client fault) *

The Secrets Manager secret used with the request isn't valid.

* diff --git a/clients/client-rds-data/src/commands/ExecuteStatementCommand.ts b/clients/client-rds-data/src/commands/ExecuteStatementCommand.ts index 6bd39933277f..25433d9f5459 100644 --- a/clients/client-rds-data/src/commands/ExecuteStatementCommand.ts +++ b/clients/client-rds-data/src/commands/ExecuteStatementCommand.ts @@ -205,9 +205,9 @@ export interface ExecuteStatementCommandOutput extends ExecuteStatementResponse, *

The DB cluster doesn't have a DB instance.

* * @throws {@link DatabaseResumingException} (client fault) - *

A request was canceled because the Aurora Serverless v2 DB instance was in a paused state. - * The Data API request automatically causes the DB instance to begin resuming. Wait a few seconds and - * try again.

+ *

A request was cancelled because the Aurora Serverless v2 DB instance was paused. + * The Data API request automatically resumes the DB instance. Wait a few seconds and + * try again.

* * @throws {@link DatabaseUnavailableException} (server fault) *

The writer instance in the DB cluster isn't available.

@@ -221,6 +221,9 @@ export interface ExecuteStatementCommandOutput extends ExecuteStatementResponse, * @throws {@link InternalServerErrorException} (server fault) *

An internal error occurred.

* + * @throws {@link InvalidResourceStateException} (client fault) + *

The resource is in an invalid state.

+ * * @throws {@link InvalidSecretException} (client fault) *

The Secrets Manager secret used with the request isn't valid.

* diff --git a/clients/client-rds-data/src/commands/RollbackTransactionCommand.ts b/clients/client-rds-data/src/commands/RollbackTransactionCommand.ts index f8c96ee6bb53..f04330599b42 100644 --- a/clients/client-rds-data/src/commands/RollbackTransactionCommand.ts +++ b/clients/client-rds-data/src/commands/RollbackTransactionCommand.ts @@ -78,6 +78,9 @@ export interface RollbackTransactionCommandOutput extends RollbackTransactionRes * @throws {@link InternalServerErrorException} (server fault) *

An internal error occurred.

* + * @throws {@link InvalidResourceStateException} (client fault) + *

The resource is in an invalid state.

+ * * @throws {@link InvalidSecretException} (client fault) *

The Secrets Manager secret used with the request isn't valid.

* diff --git a/clients/client-rds-data/src/models/models_0.ts b/clients/client-rds-data/src/models/models_0.ts index f7d0d9bc6a05..edd0d85557ad 100644 --- a/clients/client-rds-data/src/models/models_0.ts +++ b/clients/client-rds-data/src/models/models_0.ts @@ -102,9 +102,9 @@ export class DatabaseNotFoundException extends __BaseException { } /** - *

A request was canceled because the Aurora Serverless v2 DB instance was in a paused state. - * The Data API request automatically causes the DB instance to begin resuming. Wait a few seconds and - * try again.

+ *

A request was cancelled because the Aurora Serverless v2 DB instance was paused. + * The Data API request automatically resumes the DB instance. Wait a few seconds and + * try again.

* @public */ export class DatabaseResumingException extends __BaseException { @@ -203,6 +203,26 @@ export class InternalServerErrorException extends __BaseException { } } +/** + *

The resource is in an invalid state.

+ * @public + */ +export class InvalidResourceStateException extends __BaseException { + readonly name: "InvalidResourceStateException" = "InvalidResourceStateException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidResourceStateException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidResourceStateException.prototype); + } +} + /** *

The Secrets Manager secret used with the request isn't valid.

* @public diff --git a/clients/client-rds-data/src/protocols/Aws_restJson1.ts b/clients/client-rds-data/src/protocols/Aws_restJson1.ts index e97a1caea338..504f0e1edcdf 100644 --- a/clients/client-rds-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-rds-data/src/protocols/Aws_restJson1.ts @@ -55,6 +55,7 @@ import { ForbiddenException, HttpEndpointNotEnabledException, InternalServerErrorException, + InvalidResourceStateException, InvalidSecretException, NotFoundException, ResultFrame, @@ -398,6 +399,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "InternalServerErrorException": case "com.amazonaws.rdsdata#InternalServerErrorException": throw await de_InternalServerErrorExceptionRes(parsedOutput, context); + case "InvalidResourceStateException": + case "com.amazonaws.rdsdata#InvalidResourceStateException": + throw await de_InvalidResourceStateExceptionRes(parsedOutput, context); case "InvalidSecretException": case "com.amazonaws.rdsdata#InvalidSecretException": throw await de_InvalidSecretExceptionRes(parsedOutput, context); @@ -600,6 +604,26 @@ const de_InternalServerErrorExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1InvalidResourceStateExceptionRes + */ +const de_InvalidResourceStateExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidResourceStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1InvalidSecretExceptionRes */ diff --git a/codegen/sdk-codegen/aws-models/rds-data.json b/codegen/sdk-codegen/aws-models/rds-data.json index 2c9080f8862a..e6648497576d 100644 --- a/codegen/sdk-codegen/aws-models/rds-data.json +++ b/codegen/sdk-codegen/aws-models/rds-data.json @@ -128,6 +128,9 @@ { "target": "com.amazonaws.rdsdata#InternalServerErrorException" }, + { + "target": "com.amazonaws.rdsdata#InvalidResourceStateException" + }, { "target": "com.amazonaws.rdsdata#InvalidSecretException" }, @@ -256,6 +259,9 @@ { "target": "com.amazonaws.rdsdata#InternalServerErrorException" }, + { + "target": "com.amazonaws.rdsdata#InvalidResourceStateException" + }, { "target": "com.amazonaws.rdsdata#InvalidSecretException" }, @@ -496,6 +502,9 @@ { "target": "com.amazonaws.rdsdata#InternalServerErrorException" }, + { + "target": "com.amazonaws.rdsdata#InvalidResourceStateException" + }, { "target": "com.amazonaws.rdsdata#InvalidSecretException" }, @@ -601,7 +610,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request was canceled because the Aurora Serverless v2 DB instance was in a paused state.\n The Data API request automatically causes the DB instance to begin resuming. Wait a few seconds and\n try again.

", + "smithy.api#documentation": "

A request was cancelled because the Aurora Serverless v2 DB instance was paused.\n The Data API request automatically resumes the DB instance. Wait a few seconds and\n try again.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -779,6 +788,9 @@ { "target": "com.amazonaws.rdsdata#InternalServerErrorException" }, + { + "target": "com.amazonaws.rdsdata#InvalidResourceStateException" + }, { "target": "com.amazonaws.rdsdata#InvalidSecretException" }, @@ -1036,6 +1048,19 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.rdsdata#InvalidResourceStateException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.rdsdata#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The resource is in an invalid state.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.rdsdata#InvalidSecretException": { "type": "structure", "members": { @@ -1904,6 +1929,9 @@ { "target": "com.amazonaws.rdsdata#InternalServerErrorException" }, + { + "target": "com.amazonaws.rdsdata#InvalidResourceStateException" + }, { "target": "com.amazonaws.rdsdata#InvalidSecretException" },