Skip to content

Commit

Permalink
feat(client-rds): Launching Global Cluster tagging.
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Sep 16, 2024
1 parent d16db8c commit c35b721
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 71 deletions.
12 changes: 12 additions & 0 deletions clients/client-rds/src/commands/CreateGlobalClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes
* DeletionProtection: true || false,
* DatabaseName: "STRING_VALUE",
* StorageEncrypted: true || false,
* Tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE",
* Value: "STRING_VALUE",
* },
* ],
* };
* const command = new CreateGlobalClusterCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -88,6 +94,12 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
6 changes: 6 additions & 0 deletions clients/client-rds/src/commands/DeleteGlobalClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export interface DeleteGlobalClusterCommandOutput extends DeleteGlobalClusterRes
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ export interface DescribeGlobalClustersCommandOutput extends GlobalClustersMessa
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ export interface FailoverGlobalClusterCommandOutput extends FailoverGlobalCluste
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
4 changes: 2 additions & 2 deletions clients/client-rds/src/commands/ListTagsForResourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface ListTagsForResourceCommandOutput extends TagListMessage, __Meta
/**
* <p>Lists all tags on an Amazon RDS resource.</p>
* <p>For an overview on tagging an Amazon RDS resource,
* see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging Amazon RDS Resources</a>
* in the <i>Amazon RDS User Guide</i>.</p>
* see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>
* or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS Resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
6 changes: 6 additions & 0 deletions clients/client-rds/src/commands/ModifyGlobalClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export interface ModifyGlobalClusterCommandOutput extends ModifyGlobalClusterRes
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ export interface RemoveFromGlobalClusterCommandOutput extends RemoveFromGlobalCl
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export interface RemoveTagsFromResourceCommandOutput extends __MetadataBearer {}
/**
* <p>Removes metadata tags from an Amazon RDS resource.</p>
* <p>For an overview on tagging an Amazon RDS resource,
* see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging Amazon RDS Resources</a>
* in the <i>Amazon RDS User Guide.</i>
* </p>
* see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>
* or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS Resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export interface SwitchoverGlobalClusterCommandOutput extends SwitchoverGlobalCl
* // ToDbClusterArn: "STRING_VALUE",
* // IsDataLossAllowed: true || false,
* // },
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
Expand Down
83 changes: 21 additions & 62 deletions clients/client-rds/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,37 +771,9 @@ export interface ApplyPendingMaintenanceActionMessage {

/**
* <p>The pending maintenance action to apply to this resource.</p>
* <p>Valid Values:</p>
* <ul>
* <li>
* <p>
* <code>ca-certificate-rotation</code>
* </p>
* </li>
* <li>
* <p>
* <code>db-upgrade</code>
* </p>
* </li>
* <li>
* <p>
* <code>hardware-maintenance</code>
* </p>
* </li>
* <li>
* <p>
* <code>os-upgrade</code>
* </p>
* </li>
* <li>
* <p>
* <code>system-update</code>
* </p>
* </li>
* </ul>
* <p>For more information about these actions, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
* <p>Valid Values: <code>system-update</code>, <code>db-upgrade</code>,
* <code>hardware-maintenance</code>, <code>ca-certificate-rotation</code>
* </p>
* @public
*/
ApplyAction: string | undefined;
Expand Down Expand Up @@ -839,37 +811,8 @@ export interface PendingMaintenanceAction {
/**
* <p>The type of pending maintenance action that is available for the resource. </p>
* <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
* <p>Valid Values:</p>
* <ul>
* <li>
* <p>
* <code>ca-certificate-rotation</code>
* </p>
* </li>
* <li>
* <p>
* <code>db-upgrade</code>
* </p>
* </li>
* <li>
* <p>
* <code>hardware-maintenance</code>
* </p>
* </li>
* <li>
* <p>
* <code>os-upgrade</code>
* </p>
* </li>
* <li>
* <p>
* <code>system-update</code>
* </p>
* </li>
* </ul>
* <p>For more information about these actions, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
* <p>Valid Values:<code> system-update | db-upgrade | hardware-maintenance | ca-certificate-rotation</code>
* </p>
* @public
*/
Action?: string;
Expand Down Expand Up @@ -12237,6 +12180,12 @@ export interface CreateGlobalClusterMessage {
* @public
*/
StorageEncrypted?: boolean;

/**
* <p>Tags to assign to the global cluster.</p>
* @public
*/
Tags?: Tag[];
}

/**
Expand Down Expand Up @@ -12442,6 +12391,16 @@ export interface GlobalCluster {
* @public
*/
FailoverState?: FailoverState;

/**
* <p>A list of tags.</p>
* <p>For more information, see
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.
* </p>
* @public
*/
TagList?: Tag[];
}

/**
Expand Down
15 changes: 15 additions & 0 deletions clients/client-rds/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11385,6 +11385,16 @@ const se_CreateGlobalClusterMessage = (input: CreateGlobalClusterMessage, contex
if (input[_SE] != null) {
entries[_SE] = input[_SE];
}
if (input[_T] != null) {
const memberEntries = se_TagList(input[_T], context);
if (input[_T]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
return entries;
};

Expand Down Expand Up @@ -21289,6 +21299,11 @@ const de_GlobalCluster = (output: any, context: __SerdeContext): GlobalCluster =
if (output[_FSa] != null) {
contents[_FSa] = de_FailoverState(output[_FSa], context);
}
if (output.TagList === "") {
contents[_TL] = [];
} else if (output[_TL] != null && output[_TL][_Tag] != null) {
contents[_TL] = de_TagList(__getArrayIfSingleItem(output[_TL][_Tag]), context);
}
return contents;
};

Expand Down
17 changes: 13 additions & 4 deletions codegen/sdk-codegen/aws-models/rds.json
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,7 @@
"target": "com.amazonaws.rds#String",
"traits": {
"smithy.api#clientOptional": {},
"smithy.api#documentation": "<p>The pending maintenance action to apply to this resource.</p>\n <p>Valid Values:</p>\n <ul>\n <li>\n <p>\n <code>ca-certificate-rotation</code>\n </p>\n </li>\n <li>\n <p>\n <code>db-upgrade</code>\n </p>\n </li>\n <li>\n <p>\n <code>hardware-maintenance</code>\n </p>\n </li>\n <li>\n <p>\n <code>os-upgrade</code>\n </p>\n </li>\n <li>\n <p>\n <code>system-update</code>\n </p>\n </li>\n </ul>\n <p>For more information about these actions, see \n <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora\">Maintenance actions for Amazon Aurora</a> or \n <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds\">Maintenance actions for Amazon RDS</a>.</p>",
"smithy.api#documentation": "<p>The pending maintenance action to apply to this resource.</p>\n <p>Valid Values: <code>system-update</code>, <code>db-upgrade</code>, \n <code>hardware-maintenance</code>, <code>ca-certificate-rotation</code>\n </p>",
"smithy.api#required": {}
}
},
Expand Down Expand Up @@ -6565,6 +6565,12 @@
"traits": {
"smithy.api#documentation": "<p>Specifies whether to enable storage encryption for the new global database cluster.</p>\n <p>Constraints:</p>\n <ul>\n <li>\n <p>Can't be specified if <code>SourceDBClusterIdentifier</code> is specified. In this case, Amazon Aurora uses the setting from the source DB cluster.</p>\n </li>\n </ul>"
}
},
"Tags": {
"target": "com.amazonaws.rds#TagList",
"traits": {
"smithy.api#documentation": "<p>Tags to assign to the global cluster.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -19376,6 +19382,9 @@
"traits": {
"smithy.api#documentation": "<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).\n This object is empty unless the <code>SwitchoverGlobalCluster</code> or <code>FailoverGlobalCluster</code> operation was called on this global cluster.</p>"
}
},
"TagList": {
"target": "com.amazonaws.rds#TagList"
}
},
"traits": {
Expand Down Expand Up @@ -20670,7 +20679,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Lists all tags on an Amazon RDS resource.</p>\n <p>For an overview on tagging an Amazon RDS resource, \n see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html\">Tagging Amazon RDS Resources</a> \n in the <i>Amazon RDS User Guide</i>.</p>",
"smithy.api#documentation": "<p>Lists all tags on an Amazon RDS resource.</p>\n <p>For an overview on tagging an Amazon RDS resource, \n see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html\">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>\n or <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html\">Tagging Amazon Aurora and Amazon RDS Resources</a> in the <i>Amazon Aurora User Guide</i>.</p>",
"smithy.api#examples": [
{
"title": "To list tags on an Amazon RDS resource",
Expand Down Expand Up @@ -24594,7 +24603,7 @@
"Action": {
"target": "com.amazonaws.rds#String",
"traits": {
"smithy.api#documentation": "<p>The type of pending maintenance action that is available for the resource. </p>\n <p>For more information about maintenance actions, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html\">Maintaining a DB instance</a>.</p>\n <p>Valid Values:</p>\n <ul>\n <li>\n <p>\n <code>ca-certificate-rotation</code>\n </p>\n </li>\n <li>\n <p>\n <code>db-upgrade</code>\n </p>\n </li>\n <li>\n <p>\n <code>hardware-maintenance</code>\n </p>\n </li>\n <li>\n <p>\n <code>os-upgrade</code>\n </p>\n </li>\n <li>\n <p>\n <code>system-update</code>\n </p>\n </li>\n </ul>\n <p>For more information about these actions, see \n <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora\">Maintenance actions for Amazon Aurora</a> or \n <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds\">Maintenance actions for Amazon RDS</a>.</p>"
"smithy.api#documentation": "<p>The type of pending maintenance action that is available for the resource. </p>\n <p>For more information about maintenance actions, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html\">Maintaining a DB instance</a>.</p>\n <p>Valid Values:<code> system-update | db-upgrade | hardware-maintenance | ca-certificate-rotation</code>\n </p>"
}
},
"AutoAppliedAfterDate": {
Expand Down Expand Up @@ -26012,7 +26021,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Removes metadata tags from an Amazon RDS resource.</p>\n <p>For an overview on tagging an Amazon RDS resource, \n see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html\">Tagging Amazon RDS Resources</a> \n in the <i>Amazon RDS User Guide.</i>\n </p>",
"smithy.api#documentation": "<p>Removes metadata tags from an Amazon RDS resource.</p>\n <p>For an overview on tagging an Amazon RDS resource, \n see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html\">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>\n or <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html\">Tagging Amazon Aurora and Amazon RDS Resources</a> in the <i>Amazon Aurora User Guide</i>.</p>",
"smithy.api#examples": [
{
"title": "To remove tags from a resource",
Expand Down

0 comments on commit c35b721

Please sign in to comment.