From 03416814abf4e098dbd61913ed87690bc08d3a84 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 22 Oct 2024 18:40:15 +0000 Subject: [PATCH] feat(client-rds): Global clusters now expose the Endpoint attribute as one of its fields. It is a Read/Write endpoint for the global cluster which resolves to the Global Cluster writer instance. --- clients/client-rds/README.md | 2 +- .../src/commands/CreateGlobalClusterCommand.ts | 4 +++- .../src/commands/DeleteGlobalClusterCommand.ts | 1 + .../src/commands/DescribeGlobalClustersCommand.ts | 1 + .../src/commands/FailoverGlobalClusterCommand.ts | 1 + .../src/commands/ModifyGlobalClusterCommand.ts | 5 +++++ .../src/commands/RemoveFromGlobalClusterCommand.ts | 1 + .../src/commands/SwitchoverGlobalClusterCommand.ts | 1 + clients/client-rds/src/models/models_0.ts | 12 +++++++++++- clients/client-rds/src/protocols/Aws_query.ts | 3 +++ codegen/sdk-codegen/aws-models/rds.json | 11 ++++++++++- 11 files changed, 38 insertions(+), 4 deletions(-) diff --git a/clients/client-rds/README.md b/clients/client-rds/README.md index dbadd812c4e7..8345bae62132 100644 --- a/clients/client-rds/README.md +++ b/clients/client-rds/README.md @@ -63,7 +63,7 @@ from the user guide.

## Installing -To install the this package, simply type add or install @aws-sdk/client-rds +To install this package, simply type add or install @aws-sdk/client-rds using your favorite package manager: - `npm install @aws-sdk/client-rds` diff --git a/clients/client-rds/src/commands/CreateGlobalClusterCommand.ts b/clients/client-rds/src/commands/CreateGlobalClusterCommand.ts index 3a573a21fd7d..93cbc19c02ae 100644 --- a/clients/client-rds/src/commands/CreateGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/CreateGlobalClusterCommand.ts @@ -88,6 +88,7 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", @@ -116,7 +117,8 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes * DBClusterIdentifier doesn't refer to an existing DB cluster.

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

The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique name) to create a new global database cluster.

+ *

The GlobalClusterIdentifier already exists. Specify a new global database identifier + * (unique name) to create a new global database cluster or to rename an existing one.

* * @throws {@link GlobalClusterQuotaExceededFault} (client fault) *

The number of global database clusters for this account is already at the maximum allowed.

diff --git a/clients/client-rds/src/commands/DeleteGlobalClusterCommand.ts b/clients/client-rds/src/commands/DeleteGlobalClusterCommand.ts index dbc9d77326a9..69337010609c 100644 --- a/clients/client-rds/src/commands/DeleteGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/DeleteGlobalClusterCommand.ts @@ -67,6 +67,7 @@ export interface DeleteGlobalClusterCommandOutput extends DeleteGlobalClusterRes * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", diff --git a/clients/client-rds/src/commands/DescribeGlobalClustersCommand.ts b/clients/client-rds/src/commands/DescribeGlobalClustersCommand.ts index 50de1c97eb43..0f415d4f99e1 100644 --- a/clients/client-rds/src/commands/DescribeGlobalClustersCommand.ts +++ b/clients/client-rds/src/commands/DescribeGlobalClustersCommand.ts @@ -80,6 +80,7 @@ export interface DescribeGlobalClustersCommandOutput extends GlobalClustersMessa * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", diff --git a/clients/client-rds/src/commands/FailoverGlobalClusterCommand.ts b/clients/client-rds/src/commands/FailoverGlobalClusterCommand.ts index 007b36ed53fe..09bc165cda6b 100644 --- a/clients/client-rds/src/commands/FailoverGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/FailoverGlobalClusterCommand.ts @@ -101,6 +101,7 @@ export interface FailoverGlobalClusterCommandOutput extends FailoverGlobalCluste * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", diff --git a/clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts b/clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts index 868d94c7c8b6..43f47e5acfd3 100644 --- a/clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts @@ -73,6 +73,7 @@ export interface ModifyGlobalClusterCommandOutput extends ModifyGlobalClusterRes * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", @@ -96,6 +97,10 @@ export interface ModifyGlobalClusterCommandOutput extends ModifyGlobalClusterRes * @see {@link ModifyGlobalClusterCommandOutput} for command's `response` shape. * @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape. * + * @throws {@link GlobalClusterAlreadyExistsFault} (client fault) + *

The GlobalClusterIdentifier already exists. Specify a new global database identifier + * (unique name) to create a new global database cluster or to rename an existing one.

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

The GlobalClusterIdentifier doesn't refer to an existing global database cluster.

* diff --git a/clients/client-rds/src/commands/RemoveFromGlobalClusterCommand.ts b/clients/client-rds/src/commands/RemoveFromGlobalClusterCommand.ts index 7be268bb3dba..1534870cad68 100644 --- a/clients/client-rds/src/commands/RemoveFromGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/RemoveFromGlobalClusterCommand.ts @@ -69,6 +69,7 @@ export interface RemoveFromGlobalClusterCommandOutput extends RemoveFromGlobalCl * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", diff --git a/clients/client-rds/src/commands/SwitchoverGlobalClusterCommand.ts b/clients/client-rds/src/commands/SwitchoverGlobalClusterCommand.ts index bb4b1a7dda34..e377fce1c5c4 100644 --- a/clients/client-rds/src/commands/SwitchoverGlobalClusterCommand.ts +++ b/clients/client-rds/src/commands/SwitchoverGlobalClusterCommand.ts @@ -74,6 +74,7 @@ export interface SwitchoverGlobalClusterCommandOutput extends SwitchoverGlobalCl * // SynchronizationStatus: "connected" || "pending-resync", * // }, * // ], + * // Endpoint: "STRING_VALUE", * // FailoverState: { // FailoverState * // Status: "pending" || "failing-over" || "cancelling", * // FromDbClusterArn: "STRING_VALUE", diff --git a/clients/client-rds/src/models/models_0.ts b/clients/client-rds/src/models/models_0.ts index 5cad4da29c85..8c638833d1b7 100644 --- a/clients/client-rds/src/models/models_0.ts +++ b/clients/client-rds/src/models/models_0.ts @@ -12433,6 +12433,15 @@ export interface GlobalCluster { */ GlobalClusterMembers?: GlobalClusterMember[]; + /** + *

+ * The writer endpoint for the new global database cluster. This endpoint always + * points to the writer DB instance in the current primary cluster. + *

+ * @public + */ + Endpoint?: string; + /** *

A data object containing all properties for the current state of an in-process or pending switchover or failover process for this global cluster (Aurora global database). * This object is empty unless the SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this global cluster.

@@ -12463,7 +12472,8 @@ export interface CreateGlobalClusterResult { } /** - *

The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique name) to create a new global database cluster.

+ *

The GlobalClusterIdentifier already exists. Specify a new global database identifier + * (unique name) to create a new global database cluster or to rename an existing one.

* @public */ export class GlobalClusterAlreadyExistsFault extends __BaseException { diff --git a/clients/client-rds/src/protocols/Aws_query.ts b/clients/client-rds/src/protocols/Aws_query.ts index 1e4e9f6a3570..3f1c6611328c 100644 --- a/clients/client-rds/src/protocols/Aws_query.ts +++ b/clients/client-rds/src/protocols/Aws_query.ts @@ -21306,6 +21306,9 @@ const de_GlobalCluster = (output: any, context: __SerdeContext): GlobalCluster = } else if (output[_GCM] != null && output[_GCM][_GCMl] != null) { contents[_GCM] = de_GlobalClusterMemberList(__getArrayIfSingleItem(output[_GCM][_GCMl]), context); } + if (output[_End] != null) { + contents[_End] = __expectString(output[_End]); + } if (output[_FSa] != null) { contents[_FSa] = de_FailoverState(output[_FSa], context); } diff --git a/codegen/sdk-codegen/aws-models/rds.json b/codegen/sdk-codegen/aws-models/rds.json index e0c1571dc0c7..7e0083400c8b 100644 --- a/codegen/sdk-codegen/aws-models/rds.json +++ b/codegen/sdk-codegen/aws-models/rds.json @@ -19418,6 +19418,12 @@ "smithy.api#documentation": "

The list of primary and secondary clusters within the global database cluster.

" } }, + "Endpoint": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "

\n The writer endpoint for the new global database cluster. This endpoint always \n points to the writer DB instance in the current primary cluster.\n

" + } + }, "FailoverState": { "target": "com.amazonaws.rds#FailoverState", "traits": { @@ -19444,7 +19450,7 @@ "code": "GlobalClusterAlreadyExistsFault", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique name) to create a new global database cluster.

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

The GlobalClusterIdentifier already exists. Specify a new global database identifier \n (unique name) to create a new global database cluster or to rename an existing one.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -23264,6 +23270,9 @@ "target": "com.amazonaws.rds#ModifyGlobalClusterResult" }, "errors": [ + { + "target": "com.amazonaws.rds#GlobalClusterAlreadyExistsFault" + }, { "target": "com.amazonaws.rds#GlobalClusterNotFoundFault" },