promote_read_replica
async
¶
promote_read_replica(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_instance_identifier: Optional[String] = None,
backup_retention_period: Optional[IntegerOptional] = None,
preferred_backup_window: Optional[String] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> PromoteReadReplicaResult
Promotes a read replica DB instance to a standalone DB instance.
-
Backup duration is a function of the amount of changes to the database since the previous backup. If you plan to promote a read replica to a standalone instance, we recommend that you enable backups and complete at least one backup prior to promotion. In addition, a read replica cannot be promoted to a standalone instance when it is in the
backing-upstatus. If you have enabled backups on your read replica, configure the automated backup window so that daily backups do not interfere with read replica promotion. -
This command doesn't apply to Aurora MySQL, Aurora PostgreSQL, or RDS Custom.
Parameters:
-
db_instance_identifier(Optional[String], default:None) –The DB instance identifier. This value is stored as a lowercase string.
Constraints:
-
Must match the identifier of an existing read replica DB instance.
Example:
mydbinstance -
-
backup_retention_period(Optional[IntegerOptional], default:None) –The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Default: 1
Constraints:
-
Must be a value from 0 to 35.
-
Can't be set to 0 if the DB instance is a source to read replicas.
-
-
preferred_backup_window(Optional[String], default:None) –The daily time range during which automated backups are created if automated backups are enabled, using the
BackupRetentionPeriodparameter.The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
-
Must be in the format
hh24:mi-hh24:mi. -
Must be in Universal Coordinated Time (UTC).
-
Must not conflict with the preferred maintenance window.
-
Must be at least 30 minutes.
-
-
tag_specifications(Optional[TagSpecificationList], default:None) –Tags to assign to resources associated with the DB instance.
Valid Values:
-
auto-backup- The DB instance's automated backup.
-
Raises:
-
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To promote a read replica The following example promotes the specified read replica to become a standalone DB instance.
Source code in docs_src/capo_rds/_services/async_rds.py
12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 | |