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
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 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 | |