Skip to content

Commit

Permalink
feat(client-rds-data): This release adds support for using RDS Data A…
Browse files Browse the repository at this point in the history
…PI with Aurora PostgreSQL Serverless v2 and provisioned DB clusters.
  • Loading branch information
awstools committed Dec 21, 2023
1 parent dc7a599 commit 3650011
Show file tree
Hide file tree
Showing 13 changed files with 1,000 additions and 141 deletions.
24 changes: 15 additions & 9 deletions clients/client-rds-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@

AWS SDK for JavaScript RDSData Client for Node.js, Browser and React Native.

<fullname>Amazon RDS Data Service</fullname>

<p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless v1 DB cluster. To run these
statements, you work with the Data Service API.</p>
<note>
<p>The Data Service API isn't supported on Amazon Aurora Serverless v2 DB clusters.</p>
</note>
<p>For more information about the Data Service API, see
<a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
<fullname>RDS Data API</fullname>

<p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora DB cluster. To run these
statements, you use the RDS Data API (Data API).</p>
<p>Data API is available with the following types of Aurora databases:</p>
<ul>
<li>
<p>Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned</p>
</li>
<li>
<p>Aurora MySQL - Serverless v1 only</p>
</li>
</ul>
<p>For more information about the Data API, see
<a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using RDS Data API</a>
in the <i>Amazon Aurora User Guide</i>.</p>

## Installing
Expand Down
22 changes: 14 additions & 8 deletions clients/client-rds-data/src/RDSData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,20 @@ export interface RDSData {

/**
* @public
* <fullname>Amazon RDS Data Service</fullname>
* <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless v1 DB cluster. To run these
* statements, you work with the Data Service API.</p>
* <note>
* <p>The Data Service API isn't supported on Amazon Aurora Serverless v2 DB clusters.</p>
* </note>
* <p>For more information about the Data Service API, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
* <fullname>RDS Data API</fullname>
* <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora DB cluster. To run these
* statements, you use the RDS Data API (Data API).</p>
* <p>Data API is available with the following types of Aurora databases:</p>
* <ul>
* <li>
* <p>Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned</p>
* </li>
* <li>
* <p>Aurora MySQL - Serverless v1 only</p>
* </li>
* </ul>
* <p>For more information about the Data API, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using RDS Data API</a>
* in the <i>Amazon Aurora User Guide</i>.</p>
*/
export class RDSData extends RDSDataClient implements RDSData {}
Expand Down
22 changes: 14 additions & 8 deletions clients/client-rds-data/src/RDSDataClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,20 @@ export interface RDSDataClientResolvedConfig extends RDSDataClientResolvedConfig

/**
* @public
* <fullname>Amazon RDS Data Service</fullname>
* <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless v1 DB cluster. To run these
* statements, you work with the Data Service API.</p>
* <note>
* <p>The Data Service API isn't supported on Amazon Aurora Serverless v2 DB clusters.</p>
* </note>
* <p>For more information about the Data Service API, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
* <fullname>RDS Data API</fullname>
* <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora DB cluster. To run these
* statements, you use the RDS Data API (Data API).</p>
* <p>Data API is available with the following types of Aurora databases:</p>
* <ul>
* <li>
* <p>Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned</p>
* </li>
* <li>
* <p>Aurora MySQL - Serverless v1 only</p>
* </li>
* </ul>
* <p>For more information about the Data API, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using RDS Data API</a>
* in the <i>Amazon Aurora User Guide</i>.</p>
*/
export class RDSDataClient extends __Client<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen
/**
* @public
* <p>Runs a batch SQL statement over an array of data.</p>
* <p>You can run bulk update and insert operations for multiple records using a DML
* <p>You can run bulk update and insert operations for multiple records using a DML
* statement with different parameter sets. Bulk operations can provide a significant
* performance improvement over individual insert and update operations.</p>
* <note>
* <note>
* <p>If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> parameter,
* changes that result from the call are committed automatically.</p>
* <p>There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request
Expand All @@ -50,7 +50,7 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen
* number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and
* the size of each parameter set.</p>
* <p>The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated.</p>
* </note>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -175,24 +175,56 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen
* @see {@link RDSDataClientResolvedConfig | config} for RDSDataClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
* <p>You don't have sufficient access to perform this action.</p>
*
* @throws {@link BadRequestException} (client fault)
* <p>There is an error in the call or in a SQL statement.</p>
* <p>There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)</p>
*
* @throws {@link DatabaseErrorException} (client fault)
* <p>There was an error in processing the SQL statement.</p>
*
* @throws {@link DatabaseNotFoundException} (client fault)
* <p>The DB cluster doesn't have a DB instance.</p>
*
* @throws {@link DatabaseUnavailableException} (server fault)
* <p>The writer instance in the DB cluster isn't available.</p>
*
* @throws {@link ForbiddenException} (client fault)
* <p>There are insufficient privileges to make the call.</p>
*
* @throws {@link HttpEndpointNotEnabledException} (client fault)
* <p>The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.</p>
*
* @throws {@link InternalServerErrorException} (server fault)
* <p>An internal error occurred.</p>
*
* @throws {@link InvalidSecretException} (client fault)
* <p>The Secrets Manager secret used with the request isn't valid.</p>
*
* @throws {@link SecretsErrorException} (client fault)
* <p>There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:</p>
* <ul>
* <li>
* <p>RDS Data API timed out retrieving the secret.</p>
* </li>
* <li>
* <p>The secret provided wasn't found.</p>
* </li>
* <li>
* <p>The secret couldn't be decrypted.</p>
* </li>
* </ul>
*
* @throws {@link ServiceUnavailableError} (server fault)
* <p>The service specified by the <code>resourceArn</code> parameter is not
* <p>The service specified by the <code>resourceArn</code> parameter isn't
* available.</p>
*
* @throws {@link StatementTimeoutException} (client fault)
* <p>The execution of the SQL statement timed out.</p>
*
* @throws {@link TransactionNotFoundException} (client fault)
* <p>The transaction ID wasn't found.</p>
*
* @throws {@link RDSDataServiceException}
* <p>Base exception class for all service exceptions from RDSData service.</p>
*
Expand Down
42 changes: 37 additions & 5 deletions clients/client-rds-data/src/commands/BeginTransactionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export interface BeginTransactionCommandOutput extends BeginTransactionResponse,
/**
* @public
* <p>Starts a SQL transaction.</p>
* <note>
* <note>
* <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24
* hours.</p>
* <p>A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's
* committed, it's rolled back automatically.</p>
* <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate
* <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p>
* </note>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -73,24 +73,56 @@ export interface BeginTransactionCommandOutput extends BeginTransactionResponse,
* @see {@link RDSDataClientResolvedConfig | config} for RDSDataClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
* <p>You don't have sufficient access to perform this action.</p>
*
* @throws {@link BadRequestException} (client fault)
* <p>There is an error in the call or in a SQL statement.</p>
* <p>There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)</p>
*
* @throws {@link DatabaseErrorException} (client fault)
* <p>There was an error in processing the SQL statement.</p>
*
* @throws {@link DatabaseNotFoundException} (client fault)
* <p>The DB cluster doesn't have a DB instance.</p>
*
* @throws {@link DatabaseUnavailableException} (server fault)
* <p>The writer instance in the DB cluster isn't available.</p>
*
* @throws {@link ForbiddenException} (client fault)
* <p>There are insufficient privileges to make the call.</p>
*
* @throws {@link HttpEndpointNotEnabledException} (client fault)
* <p>The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.</p>
*
* @throws {@link InternalServerErrorException} (server fault)
* <p>An internal error occurred.</p>
*
* @throws {@link InvalidSecretException} (client fault)
* <p>The Secrets Manager secret used with the request isn't valid.</p>
*
* @throws {@link SecretsErrorException} (client fault)
* <p>There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:</p>
* <ul>
* <li>
* <p>RDS Data API timed out retrieving the secret.</p>
* </li>
* <li>
* <p>The secret provided wasn't found.</p>
* </li>
* <li>
* <p>The secret couldn't be decrypted.</p>
* </li>
* </ul>
*
* @throws {@link ServiceUnavailableError} (server fault)
* <p>The service specified by the <code>resourceArn</code> parameter is not
* <p>The service specified by the <code>resourceArn</code> parameter isn't
* available.</p>
*
* @throws {@link StatementTimeoutException} (client fault)
* <p>The execution of the SQL statement timed out.</p>
*
* @throws {@link TransactionNotFoundException} (client fault)
* <p>The transaction ID wasn't found.</p>
*
* @throws {@link RDSDataServiceException}
* <p>Base exception class for all service exceptions from RDSData service.</p>
*
Expand Down
38 changes: 35 additions & 3 deletions clients/client-rds-data/src/commands/CommitTransactionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,59 @@ export interface CommitTransactionCommandOutput extends CommitTransactionRespons
* @see {@link RDSDataClientResolvedConfig | config} for RDSDataClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
* <p>You don't have sufficient access to perform this action.</p>
*
* @throws {@link BadRequestException} (client fault)
* <p>There is an error in the call or in a SQL statement.</p>
* <p>There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)</p>
*
* @throws {@link DatabaseErrorException} (client fault)
* <p>There was an error in processing the SQL statement.</p>
*
* @throws {@link DatabaseNotFoundException} (client fault)
* <p>The DB cluster doesn't have a DB instance.</p>
*
* @throws {@link DatabaseUnavailableException} (server fault)
* <p>The writer instance in the DB cluster isn't available.</p>
*
* @throws {@link ForbiddenException} (client fault)
* <p>There are insufficient privileges to make the call.</p>
*
* @throws {@link HttpEndpointNotEnabledException} (client fault)
* <p>The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.</p>
*
* @throws {@link InternalServerErrorException} (server fault)
* <p>An internal error occurred.</p>
*
* @throws {@link InvalidSecretException} (client fault)
* <p>The Secrets Manager secret used with the request isn't valid.</p>
*
* @throws {@link NotFoundException} (client fault)
* <p>The <code>resourceArn</code>, <code>secretArn</code>, or <code>transactionId</code> value can't be found.</p>
*
* @throws {@link SecretsErrorException} (client fault)
* <p>There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:</p>
* <ul>
* <li>
* <p>RDS Data API timed out retrieving the secret.</p>
* </li>
* <li>
* <p>The secret provided wasn't found.</p>
* </li>
* <li>
* <p>The secret couldn't be decrypted.</p>
* </li>
* </ul>
*
* @throws {@link ServiceUnavailableError} (server fault)
* <p>The service specified by the <code>resourceArn</code> parameter is not
* <p>The service specified by the <code>resourceArn</code> parameter isn't
* available.</p>
*
* @throws {@link StatementTimeoutException} (client fault)
* <p>The execution of the SQL statement timed out.</p>
*
* @throws {@link TransactionNotFoundException} (client fault)
* <p>The transaction ID wasn't found.</p>
*
* @throws {@link RDSDataServiceException}
* <p>Base exception class for all service exceptions from RDSData service.</p>
*
Expand Down
14 changes: 7 additions & 7 deletions clients/client-rds-data/src/commands/ExecuteSqlCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export interface ExecuteSqlCommandOutput extends ExecuteSqlResponse, __MetadataB
* @deprecated
*
* <p>Runs one or more SQL statements.</p>
* <note>
* <p>This operation is deprecated. Use the <code>BatchExecuteStatement</code> or
* <code>ExecuteStatement</code> operation.</p>
* </note>
* <note>
* <p>This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters,
* the operation is deprecated. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -136,10 +136,10 @@ export interface ExecuteSqlCommandOutput extends ExecuteSqlResponse, __MetadataB
* @see {@link RDSDataClientResolvedConfig | config} for RDSDataClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
* <p>You don't have sufficient access to perform this action.</p>
*
* @throws {@link BadRequestException} (client fault)
* <p>There is an error in the call or in a SQL statement.</p>
* <p>There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)</p>
*
* @throws {@link ForbiddenException} (client fault)
* <p>There are insufficient privileges to make the call.</p>
Expand All @@ -148,7 +148,7 @@ export interface ExecuteSqlCommandOutput extends ExecuteSqlResponse, __MetadataB
* <p>An internal error occurred.</p>
*
* @throws {@link ServiceUnavailableError} (server fault)
* <p>The service specified by the <code>resourceArn</code> parameter is not
* <p>The service specified by the <code>resourceArn</code> parameter isn't
* available.</p>
*
* @throws {@link RDSDataServiceException}
Expand Down
Loading

0 comments on commit 3650011

Please sign in to comment.