import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateBlueGreenDeploymentRequest, CreateBlueGreenDeploymentResponse } from "../models/models_0"; import type { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateBlueGreenDeploymentCommand}. */ export interface CreateBlueGreenDeploymentCommandInput extends CreateBlueGreenDeploymentRequest { } /** * @public * * The output of {@link CreateBlueGreenDeploymentCommand}. */ export interface CreateBlueGreenDeploymentCommandOutput extends CreateBlueGreenDeploymentResponse, __MetadataBearer { } declare const CreateBlueGreenDeploymentCommand_base: { new (input: CreateBlueGreenDeploymentCommandInput): import("@smithy/core/client").CommandImpl; new (input: CreateBlueGreenDeploymentCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Creates a blue/green deployment.

A blue/green deployment creates a staging environment that copies the production environment. In a blue/green deployment, the blue environment is the current production environment. The green environment is the staging environment, and it stays in sync with the current production environment.

You can make changes to the databases in the green environment without affecting production workloads. For example, you can upgrade the major or minor DB engine version, change database parameters, or make schema changes in the staging environment. You can thoroughly test changes in the green environment. When ready, you can switch over the environments to promote the green environment to be the new production environment. The switchover typically takes under a minute.

For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RDSClient, CreateBlueGreenDeploymentCommand } from "@aws-sdk/client-rds"; // ES Modules import * // const { RDSClient, CreateBlueGreenDeploymentCommand } = require("@aws-sdk/client-rds"); // CommonJS import * // import type { RDSClientConfig } from "@aws-sdk/client-rds"; * const config = {}; // type is RDSClientConfig * const client = new RDSClient(config); * const input = { // CreateBlueGreenDeploymentRequest * BlueGreenDeploymentName: "STRING_VALUE", // required * Source: "STRING_VALUE", // required * TargetEngineVersion: "STRING_VALUE", * TargetDBParameterGroupName: "STRING_VALUE", * TargetDBClusterParameterGroupName: "STRING_VALUE", * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * TargetDBInstanceClass: "STRING_VALUE", * UpgradeTargetStorageConfig: true || false, * TargetIops: Number("int"), * TargetStorageType: "STRING_VALUE", * TargetAllocatedStorage: Number("int"), * TargetStorageThroughput: Number("int"), * }; * const command = new CreateBlueGreenDeploymentCommand(input); * const response = await client.send(command); * // { // CreateBlueGreenDeploymentResponse * // BlueGreenDeployment: { // BlueGreenDeployment * // BlueGreenDeploymentIdentifier: "STRING_VALUE", * // BlueGreenDeploymentName: "STRING_VALUE", * // Source: "STRING_VALUE", * // Target: "STRING_VALUE", * // SwitchoverDetails: [ // SwitchoverDetailList * // { // SwitchoverDetail * // SourceMember: "STRING_VALUE", * // TargetMember: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // Tasks: [ // BlueGreenDeploymentTaskList * // { // BlueGreenDeploymentTask * // Name: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // Status: "STRING_VALUE", * // StatusDetails: "STRING_VALUE", * // CreateTime: new Date("TIMESTAMP"), * // DeleteTime: new Date("TIMESTAMP"), * // TagList: [ // TagList * // { // Tag * // Key: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // }, * // }; * * ``` * * @param CreateBlueGreenDeploymentCommandInput - {@link CreateBlueGreenDeploymentCommandInput} * @returns {@link CreateBlueGreenDeploymentCommandOutput} * @see {@link CreateBlueGreenDeploymentCommandInput} for command's `input` shape. * @see {@link CreateBlueGreenDeploymentCommandOutput} for command's `response` shape. * @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape. * * @throws {@link BlueGreenDeploymentAlreadyExistsFault} (client fault) *

A blue/green deployment with the specified name already exists.

* * @throws {@link DBClusterNotFoundFault} (client fault) *

DBClusterIdentifier doesn't refer to an existing DB cluster.

* * @throws {@link DBClusterParameterGroupNotFoundFault} (client fault) *

DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter group.

* * @throws {@link DBClusterQuotaExceededFault} (client fault) *

The user attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster quota.

* * @throws {@link DBInstanceNotFoundFault} (client fault) *

DBInstanceIdentifier doesn't refer to an existing DB instance.

* * @throws {@link DBParameterGroupNotFoundFault} (client fault) *

DBParameterGroupName doesn't refer to an existing DB parameter group.

* * @throws {@link InstanceQuotaExceededFault} (client fault) *

The request would result in the user exceeding the allowed number of DB instances.

* * @throws {@link InvalidDBClusterStateFault} (client fault) *

The requested operation can't be performed while the cluster is in this state.

* * @throws {@link InvalidDBInstanceStateFault} (client fault) *

The DB instance isn't in a valid state.

* * @throws {@link SourceClusterNotSupportedFault} (client fault) *

The source DB cluster isn't supported for a blue/green deployment.

* * @throws {@link SourceDatabaseNotSupportedFault} (client fault) *

The source DB instance isn't supported for a blue/green deployment.

* * @throws {@link StorageQuotaExceededFault} (client fault) *

The request would result in the user exceeding the allowed amount of storage available across all DB instances.

* * @throws {@link RDSServiceException} *

Base exception class for all service exceptions from RDS service.

* * * @example To create a blue/green deployment for an RDS for MySQL DB instance * ```javascript * // The following example creates a blue/green deployment for a MySQL DB instance. * const input = { * BlueGreenDeploymentName: "bgd-test-instance", * Source: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance", * TargetDBParameterGroupName: "mysql-80-group", * TargetEngineVersion: "8.0" * }; * const command = new CreateBlueGreenDeploymentCommand(input); * const response = await client.send(command); * /* response is * { * BlueGreenDeployment: { * BlueGreenDeploymentIdentifier: "bgd-v53303651eexfake", * BlueGreenDeploymentName: "bgd-cli-test-instance", * CreateTime: "2022-02-25T21:18:51.183Z", * Source: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance", * Status: "PROVISIONING", * SwitchoverDetails: [ * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-1" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-2" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-3" * } * ], * Tasks: [ * { * Name: "CREATING_READ_REPLICA_OF_SOURCE", * Status: "PENDING" * }, * { * Name: "DB_ENGINE_VERSION_UPGRADE", * Status: "PENDING" * }, * { * Name: "CONFIGURE_BACKUPS", * Status: "PENDING" * }, * { * Name: "CREATING_TOPOLOGY_OF_SOURCE", * Status: "PENDING" * } * ] * } * } * *\/ * ``` * * @example To create a blue/green deployment for an Aurora MySQL DB cluster * ```javascript * // The following example creates a blue/green deployment for an Aurora MySQL DB cluster. * const input = { * BlueGreenDeploymentName: "my-blue-green-deployment", * Source: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", * TargetDBClusterParameterGroupName: "mysql-80-cluster-group", * TargetDBParameterGroupName: "ams-80-binlog-enabled", * TargetEngineVersion: "8.0" * }; * const command = new CreateBlueGreenDeploymentCommand(input); * const response = await client.send(command); * /* response is * { * BlueGreenDeployment: { * BlueGreenDeploymentIdentifier: "bgd-wi89nwzglccsfake", * BlueGreenDeploymentName: "my-blue-green-deployment", * CreateTime: "2022-02-25T21:12:00.288Z", * Source: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", * Status: "PROVISIONING", * SwitchoverDetails: [ * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", * Status: "PROVISIONING" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-1", * Status: "PROVISIONING" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-2", * Status: "PROVISIONING" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-3", * Status: "PROVISIONING" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:cluster-endpoint:my-excluded-member-endpoint", * Status: "PROVISIONING" * }, * { * SourceMember: "arn:aws:rds:us-east-1:123456789012:cluster-endpoint:my-reader-endpoint", * Status: "PROVISIONING" * } * ], * Tasks: [ * { * Name: "CREATING_READ_REPLICA_OF_SOURCE", * Status: "PENDING" * }, * { * Name: "DB_ENGINE_VERSION_UPGRADE", * Status: "PENDING" * }, * { * Name: "CREATE_DB_INSTANCES_FOR_CLUSTER", * Status: "PENDING" * }, * { * Name: "CREATE_CUSTOM_ENDPOINTS", * Status: "PENDING" * } * ] * } * } * *\/ * ``` * * @public */ export declare class CreateBlueGreenDeploymentCommand extends CreateBlueGreenDeploymentCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateBlueGreenDeploymentRequest; output: CreateBlueGreenDeploymentResponse; }; sdk: { input: CreateBlueGreenDeploymentCommandInput; output: CreateBlueGreenDeploymentCommandOutput; }; }; }