Skip to content

Commit

Permalink
feat(client-rds): Global clusters now expose the Endpoint attribute a…
Browse files Browse the repository at this point in the history
…s one of its fields. It is a Read/Write endpoint for the global cluster which resolves to the Global Cluster writer instance.
  • Loading branch information
awstools committed Oct 22, 2024
1 parent e2fcaab commit 0341681
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clients/client-rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ from the user guide.</p>

## 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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -116,7 +117,8 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes
* <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
*
* @throws {@link GlobalClusterAlreadyExistsFault} (client fault)
* <p>The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database identifier (unique name) to create a new global database cluster.</p>
* <p>The <code>GlobalClusterIdentifier</code> already exists. Specify a new global database identifier
* (unique name) to create a new global database cluster or to rename an existing one.</p>
*
* @throws {@link GlobalClusterQuotaExceededFault} (client fault)
* <p>The number of global database clusters for this account is already at the maximum allowed.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
* <p>The <code>GlobalClusterIdentifier</code> already exists. Specify a new global database identifier
* (unique name) to create a new global database cluster or to rename an existing one.</p>
*
* @throws {@link GlobalClusterNotFoundFault} (client fault)
* <p>The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database cluster.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 11 additions & 1 deletion clients/client-rds/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12433,6 +12433,15 @@ export interface GlobalCluster {
*/
GlobalClusterMembers?: GlobalClusterMember[];

/**
* <p>
* The writer endpoint for the new global database cluster. This endpoint always
* points to the writer DB instance in the current primary cluster.
* </p>
* @public
*/
Endpoint?: string;

/**
* <p>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 <code>SwitchoverGlobalCluster</code> or <code>FailoverGlobalCluster</code> operation was called on this global cluster.</p>
Expand Down Expand Up @@ -12463,7 +12472,8 @@ export interface CreateGlobalClusterResult {
}

/**
* <p>The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database identifier (unique name) to create a new global database cluster.</p>
* <p>The <code>GlobalClusterIdentifier</code> already exists. Specify a new global database identifier
* (unique name) to create a new global database cluster or to rename an existing one.</p>
* @public
*/
export class GlobalClusterAlreadyExistsFault extends __BaseException {
Expand Down
3 changes: 3 additions & 0 deletions clients/client-rds/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
11 changes: 10 additions & 1 deletion codegen/sdk-codegen/aws-models/rds.json
Original file line number Diff line number Diff line change
Expand Up @@ -19418,6 +19418,12 @@
"smithy.api#documentation": "<p>The list of primary and secondary clusters within the global database cluster.</p>"
}
},
"Endpoint": {
"target": "com.amazonaws.rds#String",
"traits": {
"smithy.api#documentation": "<p>\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 </p>"
}
},
"FailoverState": {
"target": "com.amazonaws.rds#FailoverState",
"traits": {
Expand All @@ -19444,7 +19450,7 @@
"code": "GlobalClusterAlreadyExistsFault",
"httpResponseCode": 400
},
"smithy.api#documentation": "<p>The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database identifier (unique name) to create a new global database cluster.</p>",
"smithy.api#documentation": "<p>The <code>GlobalClusterIdentifier</code> already exists. Specify a new global database identifier \n (unique name) to create a new global database cluster or to rename an existing one.</p>",
"smithy.api#error": "client",
"smithy.api#httpError": 400
}
Expand Down Expand Up @@ -23264,6 +23270,9 @@
"target": "com.amazonaws.rds#ModifyGlobalClusterResult"
},
"errors": [
{
"target": "com.amazonaws.rds#GlobalClusterAlreadyExistsFault"
},
{
"target": "com.amazonaws.rds#GlobalClusterNotFoundFault"
},
Expand Down

0 comments on commit 0341681

Please sign in to comment.