create_db_snapshot
async
¶
create_db_snapshot(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_snapshot_identifier: Optional[String] = None,
db_instance_identifier: Optional[String] = None,
tags: Optional[TagList] = None,
) -> CreateDBSnapshotResult
Creates a snapshot of a DB instance. The source DB instance must be in the available or storage-optimization state.
Parameters:
-
db_snapshot_identifier(Optional[String], default:None) –The identifier for the DB snapshot.
Constraints:
-
Can't be null, empty, or blank
-
Must contain from 1 to 255 letters, numbers, or hyphens
-
First character must be a letter
-
Can't end with a hyphen or contain two consecutive hyphens
Example:
my-snapshot-id -
-
db_instance_identifier(Optional[String], default:None) –The identifier of the DB instance that you want to create the snapshot of.
Constraints:
-
Must match the identifier of an existing DBInstance.
-
Raises:
-
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
DBSnapshotAlreadyExistsFault–DBSnapshotIdentifieris already used by an existing snapshot. -
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
SnapshotQuotaExceededFault–The request would result in the user exceeding the allowed number of DB snapshots.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a DB snapshot The following example creates a DB snapshot.
>>> await client.create_db_snapshot(db_snapshot_identifier='database-mysql', db_instance_identifier='mydbsnapshot')
Source code in docs_src/capo_rds/_services/async_rds.py
3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 | |