Skip to content

RDS  >  Operations  >  create_db_snapshot

create_db_snapshot

Operation

create_db_snapshot async

create_db_snapshot(input: CreateDBSnapshotInput, plugins: list[Plugin] | None = None) -> CreateDBSnapshotOutput

Creates a snapshot of a DB instance. The source DB instance must be in the available or storage-optimization state.

Parameters:

Name Type Description Default
input CreateDBSnapshotInput

An instance of CreateDBSnapshotInput.

required
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
CreateDBSnapshotOutput

An instance of CreateDBSnapshotOutput.

Input

CreateDBSnapshotInput dataclass

Bases: _SerdeShape

Attributes

db_instance_identifier class-attribute instance-attribute
db_instance_identifier: str | None = ...

The identifier of the DB instance that you want to create the snapshot of.

Constraints:

  • Must match the identifier of an existing DBInstance.
db_snapshot_identifier class-attribute instance-attribute
db_snapshot_identifier: str | 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

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

A list of tags.

For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Output

CreateDBSnapshotOutput dataclass

Bases: _SerdeShape

Dataclass for CreateDBSnapshotOutput structure.

Attributes

db_snapshot class-attribute instance-attribute
db_snapshot: DBSnapshot | None = ...

Contains the details of an Amazon RDS DB snapshot.

This data type is used as a response element in the DescribeDBSnapshots action.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

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.