create_blue_green_deployment
async
¶
create_blue_green_deployment(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
blue_green_deployment_name: Optional[BlueGreenDeploymentName] = None,
source: Optional[DatabaseArn] = None,
target_engine_version: Optional[TargetEngineVersion] = None,
target_db_parameter_group_name: Optional[TargetDBParameterGroupName] = None,
target_db_cluster_parameter_group_name: Optional[
TargetDBClusterParameterGroupName
] = None,
tags: Optional[TagList] = None,
target_db_instance_class: Optional[TargetDBInstanceClass] = None,
upgrade_target_storage_config: Optional[BooleanOptional] = None,
target_iops: Optional[IntegerOptional] = None,
target_storage_type: Optional[TargetStorageType] = None,
target_allocated_storage: Optional[IntegerOptional] = None,
target_storage_throughput: Optional[IntegerOptional] = None,
target_resource_configurations: Optional[TargetResourceConfigurationList] = None,
) -> CreateBlueGreenDeploymentResponse
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.
Parameters:
-
blue_green_deployment_name(Optional[BlueGreenDeploymentName], default:None) –The name of the blue/green deployment.
Constraints:
-
Can't be the same as an existing blue/green deployment name in the same account and Amazon Web Services Region.
-
-
source(Optional[DatabaseArn], default:None) –The Amazon Resource Name (ARN) of the source production database.
Specify the database that you want to clone. The blue/green deployment creates this database in the green environment. You can make updates to the database in the green environment, such as an engine version upgrade. When you are ready, you can switch the database in the green environment to be the production database.
-
target_engine_version(Optional[TargetEngineVersion], default:None) –The engine version of the database in the green environment.
Specify the engine version to upgrade to in the green environment.
-
target_db_parameter_group_name(Optional[TargetDBParameterGroupName], default:None) –The DB parameter group associated with the DB instance in the green environment.
To test parameter changes, specify a DB parameter group that is different from the one associated with the source DB instance.
-
target_db_cluster_parameter_group_name(Optional[TargetDBClusterParameterGroupName], default:None) –The DB cluster parameter group associated with the Aurora DB cluster in the green environment.
To test parameter changes, specify a DB cluster parameter group that is different from the one associated with the source DB cluster.
-
tags(Optional[TagList], default:None) –Tags to assign to the blue/green deployment.
-
target_db_instance_class(Optional[TargetDBInstanceClass], default:None) –Specify the DB instance class for the databases in the green environment.
This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can have multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB cluster, don't specify this parameter. After the green environment is created, you can individually modify the instance classes of the DB instances within the green DB cluster.
-
upgrade_target_storage_config(Optional[BooleanOptional], default:None) –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 Upgrading the storage file system for a DB instance.
-
target_iops(Optional[IntegerOptional], default:None) –The amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB instance. For information about valid IOPS values, see Amazon RDS DB instance storage in the Amazon RDS User Guide.
This setting doesn't apply to Amazon Aurora blue/green deployments.
-
target_storage_type(Optional[TargetStorageType], default:None) –The storage type to associate with the green DB instance.
Valid Values:
gp2 | gp3 | io1 | io2This setting doesn't apply to Amazon Aurora blue/green deployments.
-
target_allocated_storage(Optional[IntegerOptional], default:None) –The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to increase or decrease the allocated storage on the green DB instance.
This setting doesn't apply to Amazon Aurora blue/green deployments.
-
target_storage_throughput(Optional[IntegerOptional], default:None) –The storage throughput value for the green DB instance.
This setting applies only to the
gp3storage type.This setting doesn't apply to Amazon Aurora blue/green deployments.
-
target_resource_configurations(Optional[TargetResourceConfigurationList], default:None) –Specifies resource-level configuration overrides for the green environment.
Each entry identifies a resource in the blue environment by its Amazon Resource Name (ARN). It defines the desired configuration for the corresponding resource in the green environment. Any resource that you don't include in this parameter retains the same configuration as its counterpart in the blue environment.
Use this parameter when one or more resources in the green environment require a different configuration than what they have in the blue environment.
Constraints:
-
You can't specify the same
SourceArnin more than one entry.
-
Raises:
-
BlueGreenDeploymentAlreadyExistsFault–A blue/green deployment with the specified name already exists.
-
DBClusterNotFoundFault–DBClusterIdentifierdoesn't refer to an existing DB cluster. -
DBClusterParameterGroupNotFoundFault–DBClusterParameterGroupNamedoesn't refer to an existing DB cluster parameter group. -
DBClusterQuotaExceededFault–The user attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster quota.
-
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
DBParameterGroupNotFoundFault–DBParameterGroupNamedoesn't refer to an existing DB parameter group. -
InstanceQuotaExceededFault–The request would result in the user exceeding the allowed number of DB instances.
-
InvalidDBClusterStateFault–The requested operation can't be performed while the cluster is in this state.
-
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
SourceClusterNotSupportedFault–The source DB cluster isn't supported for a blue/green deployment.
-
SourceDatabaseNotSupportedFault–The source DB instance isn't supported for a blue/green deployment.
-
StorageQuotaExceededFault–The request would result in the user exceeding the allowed amount of storage available across all DB instances.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a blue/green deployment for an RDS for MySQL DB instance The following example creates a blue/green deployment for a MySQL DB instance.
>>> await client.create_blue_green_deployment(blue_green_deployment_name='bgd-test-instance', source='arn:aws:rds:us-east-1:123456789012:db:my-db-instance', target_engine_version='8.0', target_db_parameter_group_name='mysql-80-group')
To create a blue/green deployment for an Aurora MySQL DB cluster
The following example creates a blue/green deployment for an Aurora MySQL DB cluster.
>>> await client.create_blue_green_deployment(blue_green_deployment_name='my-blue-green-deployment', source='arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster', target_engine_version='8.0', target_db_parameter_group_name='ams-80-binlog-enabled', target_db_cluster_parameter_group_name='mysql-80-cluster-group')
Source code in docs_src/capo_rds/_services/async_rds.py
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 | |