Skip to content

Commit

Permalink
feat(client-rds): This release adds support of modifying the engine m…
Browse files Browse the repository at this point in the history
…ode of database clusters.
  • Loading branch information
awstools committed Apr 14, 2023
1 parent d8e4af0 commit 6902006
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
5 changes: 5 additions & 0 deletions clients/client-rds/src/commands/ModifyDBClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export interface ModifyDBClusterCommandOutput extends ModifyDBClusterResult, __M
* ManageMasterUserPassword: true || false,
* RotateMasterUserPassword: true || false,
* MasterUserSecretKmsKeyId: "STRING_VALUE",
* EngineMode: "STRING_VALUE",
* AllowEngineModeChange: true || false,
* };
* const command = new ModifyDBClusterCommand(input);
* const response = await client.send(command);
Expand All @@ -129,6 +131,9 @@ export interface ModifyDBClusterCommandOutput extends ModifyDBClusterResult, __M
* <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB
* cluster parameter group.</p>
*
* @throws {@link DBInstanceAlreadyExistsFault} (client fault)
* <p>The user already has a DB instance with the given identifier.</p>
*
* @throws {@link DBSubnetGroupNotFoundFault} (client fault)
* <p>
* <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.</p>
Expand Down
21 changes: 20 additions & 1 deletion clients/client-rds/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3983,7 +3983,6 @@ export interface ModifyDBClusterMessage {

/**
* <p>The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.</p>
* <p>Type: Integer</p>
* <p>Valid for: Multi-AZ DB clusters only</p>
*/
AllocatedStorage?: number;
Expand Down Expand Up @@ -4186,6 +4185,26 @@ export interface ModifyDBClusterMessage {
* <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
*/
MasterUserSecretKmsKeyId?: string;

/**
* <p>The DB engine mode of the DB cluster, either <code>provisioned</code> or <code>serverless</code>.</p>
* <note>
* <p>The DB engine mode can be modified only from <code>serverless</code> to <code>provisioned</code>.</p>
* </note>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html">
* CreateDBCluster</a>.</p>
* <p>Valid for: Aurora DB clusters only</p>
*/
EngineMode?: string;

/**
* <p>A value that indicates whether engine mode changes from <code>serverless</code> to <code>provisioned</code>
* are allowed.</p>
* <p>Constraints: You must allow engine mode changes when specifying a different value for the <code>EngineMode</code> parameter
* from the DB cluster's current engine mode.</p>
* <p>Valid for: Aurora Serverless v1 DB clusters only</p>
*/
AllowEngineModeChange?: boolean;
}

/**
Expand Down
9 changes: 9 additions & 0 deletions clients/client-rds/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8382,6 +8382,9 @@ const de_ModifyDBClusterCommandError = async (
case "DBClusterParameterGroupNotFound":
case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault":
throw await de_DBClusterParameterGroupNotFoundFaultRes(parsedOutput, context);
case "DBInstanceAlreadyExists":
case "com.amazonaws.rds#DBInstanceAlreadyExistsFault":
throw await de_DBInstanceAlreadyExistsFaultRes(parsedOutput, context);
case "DBSubnetGroupNotFoundFault":
case "com.amazonaws.rds#DBSubnetGroupNotFoundFault":
throw await de_DBSubnetGroupNotFoundFaultRes(parsedOutput, context);
Expand Down Expand Up @@ -16590,6 +16593,12 @@ const se_ModifyDBClusterMessage = (input: ModifyDBClusterMessage, context: __Ser
if (input.MasterUserSecretKmsKeyId != null) {
entries["MasterUserSecretKmsKeyId"] = input.MasterUserSecretKmsKeyId;
}
if (input.EngineMode != null) {
entries["EngineMode"] = input.EngineMode;
}
if (input.AllowEngineModeChange != null) {
entries["AllowEngineModeChange"] = input.AllowEngineModeChange;
}
return entries;
};

Expand Down
18 changes: 17 additions & 1 deletion codegen/sdk-codegen/aws-models/rds.json
Original file line number Diff line number Diff line change
Expand Up @@ -15642,6 +15642,9 @@
{
"target": "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault"
},
{
"target": "com.amazonaws.rds#DBInstanceAlreadyExistsFault"
},
{
"target": "com.amazonaws.rds#DBSubnetGroupNotFoundFault"
},
Expand Down Expand Up @@ -15892,7 +15895,7 @@
"AllocatedStorage": {
"target": "com.amazonaws.rds#IntegerOptional",
"traits": {
"smithy.api#documentation": "<p>The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.</p>\n <p>Type: Integer</p>\n <p>Valid for: Multi-AZ DB clusters only</p>"
"smithy.api#documentation": "<p>The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.</p>\n <p>Valid for: Multi-AZ DB clusters only</p>"
}
},
"StorageType": {
Expand Down Expand Up @@ -15969,6 +15972,19 @@
"traits": {
"smithy.api#documentation": "<p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and \n managed in Amazon Web Services Secrets Manager.</p>\n <p>This setting is valid only if both of the following conditions are met:</p>\n <ul>\n <li>\n <p>The DB cluster doesn't manage the master user password in Amazon Web Services Secrets Manager.</p>\n <p>If the DB cluster already manages the master user password in Amazon Web Services Secrets\n Manager, you can't change the KMS key that is used to encrypt the secret.</p>\n </li>\n <li>\n <p>You are turning on <code>ManageMasterUserPassword</code> to manage the master user password \n in Amazon Web Services Secrets Manager.</p>\n <p>If you are turning on <code>ManageMasterUserPassword</code> and don't specify \n <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> \n KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't \n use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a customer \n managed KMS key.</p>\n </li>\n </ul>\n <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>\n <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account\n has a different default KMS key for each Amazon Web Services Region.</p>\n <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>"
}
},
"EngineMode": {
"target": "com.amazonaws.rds#String",
"traits": {
"smithy.api#documentation": "<p>The DB engine mode of the DB cluster, either <code>provisioned</code> or <code>serverless</code>.</p>\n <note>\n <p>The DB engine mode can be modified only from <code>serverless</code> to <code>provisioned</code>.</p>\n </note>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html\">\n CreateDBCluster</a>.</p>\n <p>Valid for: Aurora DB clusters only</p>"
}
},
"AllowEngineModeChange": {
"target": "com.amazonaws.rds#Boolean",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>A value that indicates whether engine mode changes from <code>serverless</code> to <code>provisioned</code> \n are allowed.</p>\n <p>Constraints: You must allow engine mode changes when specifying a different value for the <code>EngineMode</code> parameter\n from the DB cluster's current engine mode.</p>\n <p>Valid for: Aurora Serverless v1 DB clusters only</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 6902006

Please sign in to comment.