promote_read_replica
¶
promote_read_replica(
*,
config_overrides: Optional[RDSClientConfig] = 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/rds.py
12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 | |