promote_read_replica¶
Operation¶
promote_read_replica
async
¶
promote_read_replica(request: PromoteReadReplicaInput | PromoteReadReplicaInputDict, /, *, plugins: list[Plugin] | None = None) -> PromoteReadReplicaOutput
promote_read_replica(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[PromoteReadReplicaInputDict]) -> PromoteReadReplicaOutput
Promotes a read replica DB instance to a standalone DB instance.
Note
-
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:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
PromoteReadReplicaOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
PromoteReadReplicaInput
dataclass
¶
Bases: _SerdeShape
Attributes¶
backup_retention_period
class-attribute
instance-attribute
¶
backup_retention_period: int | 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.
db_instance_identifier
class-attribute
instance-attribute
¶
db_instance_identifier: str | 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
preferred_backup_window
class-attribute
instance-attribute
¶
preferred_backup_window: str | None = ...
The daily time range during which automated backups are created if
automated backups are enabled, using the BackupRetentionPeriod
parameter.
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
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
Tags to assign to resources associated with the DB instance.
Valid Values:
auto-backup- The DB instance's automated backup.
Dictionaries¶
PromoteReadReplicaInputDict
¶
Bases: TypedDict
Dictionary form of PromoteReadReplicaInput.
Attributes¶
backup_retention_period
instance-attribute
¶
backup_retention_period: int | 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.
db_instance_identifier
instance-attribute
¶
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
preferred_backup_window
instance-attribute
¶
preferred_backup_window: str | None
The daily time range during which automated backups are created if
automated backups are enabled, using the BackupRetentionPeriod
parameter.
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
instance-attribute
¶
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None
Tags to assign to resources associated with the DB instance.
Valid Values:
auto-backup- The DB instance's automated backup.
Output¶
PromoteReadReplicaOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for PromoteReadReplicaOutput structure.
Attributes¶
db_instance
class-attribute
instance-attribute
¶
db_instance: DBInstance | None = ...
Contains the details of an Amazon RDS DB instance.
This data type is used as a response element in the operations
CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance,
DescribeDBInstances, ModifyDBInstance, PromoteReadReplica,
RebootDBInstance, RestoreDBInstanceFromDBSnapshot,
RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime,
StartDBInstance, and StopDBInstance.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.