Skip to content

Commit

Permalink
feat(client-rds): This release adds support for upgrading the storage…
Browse files Browse the repository at this point in the history
… file system configuration on the DB instance using a blue/green deployment or a read replica.
  • Loading branch information
awstools committed Oct 18, 2023
1 parent 2320e50 commit dbac71a
Show file tree
Hide file tree
Showing 18 changed files with 139 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export interface CreateBlueGreenDeploymentCommandOutput extends CreateBlueGreenD
* Value: "STRING_VALUE",
* },
* ],
* TargetDBInstanceClass: "STRING_VALUE",
* UpgradeTargetStorageConfig: true || false,
* };
* const command = new CreateBlueGreenDeploymentCommand(input);
* const response = await client.send(command);
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/CreateDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ export interface CreateDBInstanceCommandOutput extends CreateDBInstanceResult, _
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export interface CreateDBInstanceReadReplicaCommandOutput extends CreateDBInstan
* AllocatedStorage: Number("int"),
* SourceDBClusterIdentifier: "STRING_VALUE",
* DedicatedLogVolume: true || false,
* UpgradeStorageConfig: true || false,
* };
* const command = new CreateDBInstanceReadReplicaCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -340,6 +341,7 @@ export interface CreateDBInstanceReadReplicaCommandOutput extends CreateDBInstan
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/DeleteDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export interface DeleteDBInstanceCommandOutput extends DeleteDBInstanceResult, _
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export interface DescribeDBInstancesCommandOutput extends DBInstanceMessage, __M
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // ],
* // };
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/ModifyDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ export interface ModifyDBInstanceCommandOutput extends ModifyDBInstanceResult, _
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export interface PromoteReadReplicaCommandOutput extends PromoteReadReplicaResul
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/RebootDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export interface RebootDBInstanceCommandOutput extends RebootDBInstanceResult, _
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ export interface RestoreDBInstanceFromDBSnapshotCommandOutput
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export interface RestoreDBInstanceFromS3CommandOutput extends RestoreDBInstanceF
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ export interface RestoreDBInstanceToPointInTimeCommandOutput
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/StartDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export interface StartDBInstanceCommandOutput extends StartDBInstanceResult, __M
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-rds/src/commands/StopDBInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export interface StopDBInstanceCommandOutput extends StopDBInstanceResult, __Met
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export interface SwitchoverReadReplicaCommandOutput extends SwitchoverReadReplic
* // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE",
* // PercentProgress: "STRING_VALUE",
* // DedicatedLogVolume: true || false,
* // IsStorageConfigUpgradeAvailable: true || false,
* // },
* // };
*
Expand Down
48 changes: 25 additions & 23 deletions clients/client-rds/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,29 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/rds.json */

const s="required",
t="fn",
u="argv",
v="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="getAttr",
g={[s]:false,"type":"String"},
h={[s]:true,"default":false,"type":"Boolean"},
i={[v]:"Endpoint"},
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
l={},
m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]},
n={[v]:e},
o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
p=[j],
q=[k],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]},{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{endpoint:{url:"https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://rds.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://rds-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{endpoint:{url:"https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://rds.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
const u="required",
v="fn",
w="argv",
x="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h="getAttr",
i={[u]:false,"type":"String"},
j={[u]:true,"default":false,"type":"Boolean"},
k={[x]:"Endpoint"},
l={[v]:c,[w]:[{[x]:"UseFIPS"},true]},
m={[v]:c,[w]:[{[x]:"UseDualStack"},true]},
n={},
o={[v]:h,[w]:[{[x]:g},"supportsFIPS"]},
p={[x]:g},
q={[v]:c,[w]:[true,{[v]:h,[w]:[p,"supportsDualStack"]}]},
r=[l],
s=[m],
t=[{[x]:"Region"}];
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[v]:b,[w]:[k]}],rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[v]:b,[w]:t}],rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[v]:c,[w]:[a,o]},q],rules:[{endpoint:{url:"https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:r,rules:[{conditions:[{[v]:c,[w]:[o,a]}],rules:[{conditions:[{[v]:"stringEquals",[w]:[{[v]:h,[w]:[p,"name"]},"aws-us-gov"]}],endpoint:{url:"https://rds.{Region}.amazonaws.com",properties:n,headers:n},type:e},{endpoint:{url:"https://rds-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:s,rules:[{conditions:[q],rules:[{endpoint:{url:"https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://rds.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
export const ruleSet: RuleSetObject = _data;
30 changes: 30 additions & 0 deletions clients/client-rds/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,20 @@ export interface CreateBlueGreenDeploymentRequest {
* <p>Tags to assign to the blue/green deployment.</p>
*/
Tags?: Tag[];

/**
* @public
* <p>Specify the DB instance class for the databases in the green environment.</p>
*/
TargetDBInstanceClass?: string;

/**
* @public
* <p>Whether to upgrade the storage file system configuration on the green database. This
* option migrates the green DB instance from the older 32-bit file system to the preferred
* configuration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.UpgradeFileSystem">Upgrading the storage file system for a DB instance</a>.</p>
*/
UpgradeTargetStorageConfig?: boolean;
}

/**
Expand Down Expand Up @@ -9076,6 +9090,15 @@ export interface DBInstance {
* <p>Indicates whether the DB instance has a dedicated log volume (DLV) enabled.</p>
*/
DedicatedLogVolume?: boolean;

/**
* @public
* <p>Indicates whether an upgrade is recommended for the storage file system configuration
* on the DB instance. To migrate to the preferred configuration, you can either create a
* blue/green deployment, or create a read replica from the DB instance. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.UpgradeFileSystem">Upgrading the storage file system for a DB instance</a>.</p>
*/
IsStorageConfigUpgradeAvailable?: boolean;
}

/**
Expand Down Expand Up @@ -9832,6 +9855,13 @@ export interface CreateDBInstanceReadReplicaMessage {
* <p>Indicates whether the DB instance has a dedicated log volume (DLV) enabled.</p>
*/
DedicatedLogVolume?: boolean;

/**
* @public
* <p>Whether to upgrade the storage file system configuration on the read replica. This option
* migrates the read replica from the old storage file system layout to the preferred layout.</p>
*/
UpgradeStorageConfig?: boolean;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions clients/client-rds/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13807,6 +13807,12 @@ const se_CreateBlueGreenDeploymentRequest = (input: CreateBlueGreenDeploymentReq
entries[loc] = value;
});
}
if (input.TargetDBInstanceClass != null) {
entries["TargetDBInstanceClass"] = input.TargetDBInstanceClass;
}
if (input.UpgradeTargetStorageConfig != null) {
entries["UpgradeTargetStorageConfig"] = input.UpgradeTargetStorageConfig;
}
return entries;
};

Expand Down Expand Up @@ -14561,6 +14567,9 @@ const se_CreateDBInstanceReadReplicaMessage = (
if (input.DedicatedLogVolume != null) {
entries["DedicatedLogVolume"] = input.DedicatedLogVolume;
}
if (input.UpgradeStorageConfig != null) {
entries["UpgradeStorageConfig"] = input.UpgradeStorageConfig;
}
return entries;
};

Expand Down Expand Up @@ -21782,6 +21791,9 @@ const de_DBInstance = (output: any, context: __SerdeContext): DBInstance => {
if (output["DedicatedLogVolume"] !== undefined) {
contents.DedicatedLogVolume = __parseBoolean(output["DedicatedLogVolume"]);
}
if (output["IsStorageConfigUpgradeAvailable"] !== undefined) {
contents.IsStorageConfigUpgradeAvailable = __parseBoolean(output["IsStorageConfigUpgradeAvailable"]);
}
return contents;
};

Expand Down
Loading

0 comments on commit dbac71a

Please sign in to comment.