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
3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 | |