Skip to content

Commit 92c3eef

Browse files
author
awstools
committed
feat(client-rds): This release enables new Aurora and RDS feature called Blue/Green Deployments that makes updates to databases safer, simpler and faster.
1 parent 95ff1b2 commit 92c3eef

18 files changed

+26343
-23733
lines changed

clients/client-rds/src/RDS.ts

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ import {
6666
CopyOptionGroupCommandInput,
6767
CopyOptionGroupCommandOutput,
6868
} from "./commands/CopyOptionGroupCommand";
69+
import {
70+
CreateBlueGreenDeploymentCommand,
71+
CreateBlueGreenDeploymentCommandInput,
72+
CreateBlueGreenDeploymentCommandOutput,
73+
} from "./commands/CreateBlueGreenDeploymentCommand";
6974
import {
7075
CreateCustomDBEngineVersionCommand,
7176
CreateCustomDBEngineVersionCommandInput,
@@ -146,6 +151,11 @@ import {
146151
CreateOptionGroupCommandInput,
147152
CreateOptionGroupCommandOutput,
148153
} from "./commands/CreateOptionGroupCommand";
154+
import {
155+
DeleteBlueGreenDeploymentCommand,
156+
DeleteBlueGreenDeploymentCommandInput,
157+
DeleteBlueGreenDeploymentCommandOutput,
158+
} from "./commands/DeleteBlueGreenDeploymentCommand";
149159
import {
150160
DeleteCustomDBEngineVersionCommand,
151161
DeleteCustomDBEngineVersionCommandInput,
@@ -236,6 +246,11 @@ import {
236246
DescribeAccountAttributesCommandInput,
237247
DescribeAccountAttributesCommandOutput,
238248
} from "./commands/DescribeAccountAttributesCommand";
249+
import {
250+
DescribeBlueGreenDeploymentsCommand,
251+
DescribeBlueGreenDeploymentsCommandInput,
252+
DescribeBlueGreenDeploymentsCommandOutput,
253+
} from "./commands/DescribeBlueGreenDeploymentsCommand";
239254
import {
240255
DescribeCertificatesCommand,
241256
DescribeCertificatesCommandInput,
@@ -681,6 +696,11 @@ import {
681696
StopDBInstanceCommandInput,
682697
StopDBInstanceCommandOutput,
683698
} from "./commands/StopDBInstanceCommand";
699+
import {
700+
SwitchoverBlueGreenDeploymentCommand,
701+
SwitchoverBlueGreenDeploymentCommandInput,
702+
SwitchoverBlueGreenDeploymentCommandOutput,
703+
} from "./commands/SwitchoverBlueGreenDeploymentCommand";
684704
import {
685705
SwitchoverReadReplicaCommand,
686706
SwitchoverReadReplicaCommandInput,
@@ -1232,6 +1252,52 @@ export class RDS extends RDSClient {
12321252
}
12331253
}
12341254

1255+
/**
1256+
* <p>Creates a blue/green deployment.</p>
1257+
* <p>A blue/green deployment creates a staging environment that copies the production environment.
1258+
* In a blue/green deployment, the blue environment is the current production environment.
1259+
* The green environment is the staging environment. The staging environment stays in sync
1260+
* with the current production environment using logical replication.</p>
1261+
* <p>You can make changes to the databases in the green environment without affecting
1262+
* production workloads. For example, you can upgrade the major or minor DB engine version, change
1263+
* database parameters, or make schema changes in the staging environment. You can thoroughly test
1264+
* changes in the green environment. When ready, you can switch over the environments to promote the
1265+
* green environment to be the new production environment. The switchover typically takes under a minute.</p>
1266+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html">Using Amazon RDS Blue/Green Deployments
1267+
* for database updates</a> in the <i>Amazon RDS User Guide</i> and
1268+
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html">
1269+
* Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon Aurora
1270+
* User Guide</i>.</p>
1271+
*/
1272+
public createBlueGreenDeployment(
1273+
args: CreateBlueGreenDeploymentCommandInput,
1274+
options?: __HttpHandlerOptions
1275+
): Promise<CreateBlueGreenDeploymentCommandOutput>;
1276+
public createBlueGreenDeployment(
1277+
args: CreateBlueGreenDeploymentCommandInput,
1278+
cb: (err: any, data?: CreateBlueGreenDeploymentCommandOutput) => void
1279+
): void;
1280+
public createBlueGreenDeployment(
1281+
args: CreateBlueGreenDeploymentCommandInput,
1282+
options: __HttpHandlerOptions,
1283+
cb: (err: any, data?: CreateBlueGreenDeploymentCommandOutput) => void
1284+
): void;
1285+
public createBlueGreenDeployment(
1286+
args: CreateBlueGreenDeploymentCommandInput,
1287+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateBlueGreenDeploymentCommandOutput) => void),
1288+
cb?: (err: any, data?: CreateBlueGreenDeploymentCommandOutput) => void
1289+
): Promise<CreateBlueGreenDeploymentCommandOutput> | void {
1290+
const command = new CreateBlueGreenDeploymentCommand(args);
1291+
if (typeof optionsOrCb === "function") {
1292+
this.send(command, optionsOrCb);
1293+
} else if (typeof cb === "function") {
1294+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1295+
this.send(command, optionsOrCb || {}, cb);
1296+
} else {
1297+
return this.send(command, optionsOrCb);
1298+
}
1299+
}
1300+
12351301
/**
12361302
* <p>Creates a custom DB engine version (CEV). A CEV is a binary volume snapshot of a database engine and specific
12371303
* AMI. The supported engines are the following:</p>
@@ -1905,6 +1971,43 @@ export class RDS extends RDSClient {
19051971
}
19061972
}
19071973

1974+
/**
1975+
* <p>Deletes a blue/green deployment.</p>
1976+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html">Using Amazon RDS Blue/Green Deployments
1977+
* for database updates</a> in the <i>Amazon RDS User Guide</i> and
1978+
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html">
1979+
* Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon Aurora
1980+
* User Guide</i>.</p>
1981+
*/
1982+
public deleteBlueGreenDeployment(
1983+
args: DeleteBlueGreenDeploymentCommandInput,
1984+
options?: __HttpHandlerOptions
1985+
): Promise<DeleteBlueGreenDeploymentCommandOutput>;
1986+
public deleteBlueGreenDeployment(
1987+
args: DeleteBlueGreenDeploymentCommandInput,
1988+
cb: (err: any, data?: DeleteBlueGreenDeploymentCommandOutput) => void
1989+
): void;
1990+
public deleteBlueGreenDeployment(
1991+
args: DeleteBlueGreenDeploymentCommandInput,
1992+
options: __HttpHandlerOptions,
1993+
cb: (err: any, data?: DeleteBlueGreenDeploymentCommandOutput) => void
1994+
): void;
1995+
public deleteBlueGreenDeployment(
1996+
args: DeleteBlueGreenDeploymentCommandInput,
1997+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteBlueGreenDeploymentCommandOutput) => void),
1998+
cb?: (err: any, data?: DeleteBlueGreenDeploymentCommandOutput) => void
1999+
): Promise<DeleteBlueGreenDeploymentCommandOutput> | void {
2000+
const command = new DeleteBlueGreenDeploymentCommand(args);
2001+
if (typeof optionsOrCb === "function") {
2002+
this.send(command, optionsOrCb);
2003+
} else if (typeof cb === "function") {
2004+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2005+
this.send(command, optionsOrCb || {}, cb);
2006+
} else {
2007+
return this.send(command, optionsOrCb);
2008+
}
2009+
}
2010+
19082011
/**
19092012
* <p>Deletes a custom engine version. To run this command, make sure you meet the following prerequisites:</p>
19102013
* <ul>
@@ -2572,6 +2675,43 @@ export class RDS extends RDSClient {
25722675
}
25732676
}
25742677

2678+
/**
2679+
* <p>Returns information about blue/green deployments.</p>
2680+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html">Using Amazon RDS Blue/Green Deployments
2681+
* for database updates</a> in the <i>Amazon RDS User Guide</i> and
2682+
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html">
2683+
* Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon Aurora
2684+
* User Guide</i>.</p>
2685+
*/
2686+
public describeBlueGreenDeployments(
2687+
args: DescribeBlueGreenDeploymentsCommandInput,
2688+
options?: __HttpHandlerOptions
2689+
): Promise<DescribeBlueGreenDeploymentsCommandOutput>;
2690+
public describeBlueGreenDeployments(
2691+
args: DescribeBlueGreenDeploymentsCommandInput,
2692+
cb: (err: any, data?: DescribeBlueGreenDeploymentsCommandOutput) => void
2693+
): void;
2694+
public describeBlueGreenDeployments(
2695+
args: DescribeBlueGreenDeploymentsCommandInput,
2696+
options: __HttpHandlerOptions,
2697+
cb: (err: any, data?: DescribeBlueGreenDeploymentsCommandOutput) => void
2698+
): void;
2699+
public describeBlueGreenDeployments(
2700+
args: DescribeBlueGreenDeploymentsCommandInput,
2701+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeBlueGreenDeploymentsCommandOutput) => void),
2702+
cb?: (err: any, data?: DescribeBlueGreenDeploymentsCommandOutput) => void
2703+
): Promise<DescribeBlueGreenDeploymentsCommandOutput> | void {
2704+
const command = new DescribeBlueGreenDeploymentsCommand(args);
2705+
if (typeof optionsOrCb === "function") {
2706+
this.send(command, optionsOrCb);
2707+
} else if (typeof cb === "function") {
2708+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2709+
this.send(command, optionsOrCb || {}, cb);
2710+
} else {
2711+
return this.send(command, optionsOrCb);
2712+
}
2713+
}
2714+
25752715
/**
25762716
* <p>Lists the set of CA certificates provided by Amazon RDS for this Amazon Web Services account.</p>
25772717
*/
@@ -5942,6 +6082,45 @@ export class RDS extends RDSClient {
59426082
}
59436083
}
59446084

6085+
/**
6086+
* <p>Switches over a blue/green deployment.</p>
6087+
* <p>Before you switch over, production traffic is routed to the databases in the blue environment.
6088+
* After you switch over, production traffic is routed to the databases in the green environment.</p>
6089+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html">Using Amazon RDS Blue/Green Deployments
6090+
* for database updates</a> in the <i>Amazon RDS User Guide</i> and
6091+
* <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html">
6092+
* Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon Aurora
6093+
* User Guide</i>.</p>
6094+
*/
6095+
public switchoverBlueGreenDeployment(
6096+
args: SwitchoverBlueGreenDeploymentCommandInput,
6097+
options?: __HttpHandlerOptions
6098+
): Promise<SwitchoverBlueGreenDeploymentCommandOutput>;
6099+
public switchoverBlueGreenDeployment(
6100+
args: SwitchoverBlueGreenDeploymentCommandInput,
6101+
cb: (err: any, data?: SwitchoverBlueGreenDeploymentCommandOutput) => void
6102+
): void;
6103+
public switchoverBlueGreenDeployment(
6104+
args: SwitchoverBlueGreenDeploymentCommandInput,
6105+
options: __HttpHandlerOptions,
6106+
cb: (err: any, data?: SwitchoverBlueGreenDeploymentCommandOutput) => void
6107+
): void;
6108+
public switchoverBlueGreenDeployment(
6109+
args: SwitchoverBlueGreenDeploymentCommandInput,
6110+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SwitchoverBlueGreenDeploymentCommandOutput) => void),
6111+
cb?: (err: any, data?: SwitchoverBlueGreenDeploymentCommandOutput) => void
6112+
): Promise<SwitchoverBlueGreenDeploymentCommandOutput> | void {
6113+
const command = new SwitchoverBlueGreenDeploymentCommand(args);
6114+
if (typeof optionsOrCb === "function") {
6115+
this.send(command, optionsOrCb);
6116+
} else if (typeof cb === "function") {
6117+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
6118+
this.send(command, optionsOrCb || {}, cb);
6119+
} else {
6120+
return this.send(command, optionsOrCb);
6121+
}
6122+
}
6123+
59456124
/**
59466125
* <p>Switches over an Oracle standby database in an Oracle Data Guard environment, making it the new
59476126
* primary database. Issue this command in the Region that hosts the current standby database.</p>

clients/client-rds/src/RDSClient.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ import {
8181
} from "./commands/CopyDBParameterGroupCommand";
8282
import { CopyDBSnapshotCommandInput, CopyDBSnapshotCommandOutput } from "./commands/CopyDBSnapshotCommand";
8383
import { CopyOptionGroupCommandInput, CopyOptionGroupCommandOutput } from "./commands/CopyOptionGroupCommand";
84+
import {
85+
CreateBlueGreenDeploymentCommandInput,
86+
CreateBlueGreenDeploymentCommandOutput,
87+
} from "./commands/CreateBlueGreenDeploymentCommand";
8488
import {
8589
CreateCustomDBEngineVersionCommandInput,
8690
CreateCustomDBEngineVersionCommandOutput,
@@ -130,6 +134,10 @@ import {
130134
CreateGlobalClusterCommandOutput,
131135
} from "./commands/CreateGlobalClusterCommand";
132136
import { CreateOptionGroupCommandInput, CreateOptionGroupCommandOutput } from "./commands/CreateOptionGroupCommand";
137+
import {
138+
DeleteBlueGreenDeploymentCommandInput,
139+
DeleteBlueGreenDeploymentCommandOutput,
140+
} from "./commands/DeleteBlueGreenDeploymentCommand";
133141
import {
134142
DeleteCustomDBEngineVersionCommandInput,
135143
DeleteCustomDBEngineVersionCommandOutput,
@@ -187,6 +195,10 @@ import {
187195
DescribeAccountAttributesCommandInput,
188196
DescribeAccountAttributesCommandOutput,
189197
} from "./commands/DescribeAccountAttributesCommand";
198+
import {
199+
DescribeBlueGreenDeploymentsCommandInput,
200+
DescribeBlueGreenDeploymentsCommandOutput,
201+
} from "./commands/DescribeBlueGreenDeploymentsCommand";
190202
import {
191203
DescribeCertificatesCommandInput,
192204
DescribeCertificatesCommandOutput,
@@ -483,6 +495,10 @@ import {
483495
StopDBInstanceAutomatedBackupsReplicationCommandOutput,
484496
} from "./commands/StopDBInstanceAutomatedBackupsReplicationCommand";
485497
import { StopDBInstanceCommandInput, StopDBInstanceCommandOutput } from "./commands/StopDBInstanceCommand";
498+
import {
499+
SwitchoverBlueGreenDeploymentCommandInput,
500+
SwitchoverBlueGreenDeploymentCommandOutput,
501+
} from "./commands/SwitchoverBlueGreenDeploymentCommand";
486502
import {
487503
SwitchoverReadReplicaCommandInput,
488504
SwitchoverReadReplicaCommandOutput,
@@ -509,6 +525,7 @@ export type ServiceInputTypes =
509525
| CopyDBParameterGroupCommandInput
510526
| CopyDBSnapshotCommandInput
511527
| CopyOptionGroupCommandInput
528+
| CreateBlueGreenDeploymentCommandInput
512529
| CreateCustomDBEngineVersionCommandInput
513530
| CreateDBClusterCommandInput
514531
| CreateDBClusterEndpointCommandInput
@@ -525,6 +542,7 @@ export type ServiceInputTypes =
525542
| CreateEventSubscriptionCommandInput
526543
| CreateGlobalClusterCommandInput
527544
| CreateOptionGroupCommandInput
545+
| DeleteBlueGreenDeploymentCommandInput
528546
| DeleteCustomDBEngineVersionCommandInput
529547
| DeleteDBClusterCommandInput
530548
| DeleteDBClusterEndpointCommandInput
@@ -543,6 +561,7 @@ export type ServiceInputTypes =
543561
| DeleteOptionGroupCommandInput
544562
| DeregisterDBProxyTargetsCommandInput
545563
| DescribeAccountAttributesCommandInput
564+
| DescribeBlueGreenDeploymentsCommandInput
546565
| DescribeCertificatesCommandInput
547566
| DescribeDBClusterBacktracksCommandInput
548567
| DescribeDBClusterEndpointsCommandInput
@@ -632,6 +651,7 @@ export type ServiceInputTypes =
632651
| StopDBClusterCommandInput
633652
| StopDBInstanceAutomatedBackupsReplicationCommandInput
634653
| StopDBInstanceCommandInput
654+
| SwitchoverBlueGreenDeploymentCommandInput
635655
| SwitchoverReadReplicaCommandInput;
636656

637657
export type ServiceOutputTypes =
@@ -648,6 +668,7 @@ export type ServiceOutputTypes =
648668
| CopyDBParameterGroupCommandOutput
649669
| CopyDBSnapshotCommandOutput
650670
| CopyOptionGroupCommandOutput
671+
| CreateBlueGreenDeploymentCommandOutput
651672
| CreateCustomDBEngineVersionCommandOutput
652673
| CreateDBClusterCommandOutput
653674
| CreateDBClusterEndpointCommandOutput
@@ -664,6 +685,7 @@ export type ServiceOutputTypes =
664685
| CreateEventSubscriptionCommandOutput
665686
| CreateGlobalClusterCommandOutput
666687
| CreateOptionGroupCommandOutput
688+
| DeleteBlueGreenDeploymentCommandOutput
667689
| DeleteCustomDBEngineVersionCommandOutput
668690
| DeleteDBClusterCommandOutput
669691
| DeleteDBClusterEndpointCommandOutput
@@ -682,6 +704,7 @@ export type ServiceOutputTypes =
682704
| DeleteOptionGroupCommandOutput
683705
| DeregisterDBProxyTargetsCommandOutput
684706
| DescribeAccountAttributesCommandOutput
707+
| DescribeBlueGreenDeploymentsCommandOutput
685708
| DescribeCertificatesCommandOutput
686709
| DescribeDBClusterBacktracksCommandOutput
687710
| DescribeDBClusterEndpointsCommandOutput
@@ -771,6 +794,7 @@ export type ServiceOutputTypes =
771794
| StopDBClusterCommandOutput
772795
| StopDBInstanceAutomatedBackupsReplicationCommandOutput
773796
| StopDBInstanceCommandOutput
797+
| SwitchoverBlueGreenDeploymentCommandOutput
774798
| SwitchoverReadReplicaCommandOutput;
775799

776800
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {

0 commit comments

Comments
 (0)