DocDB / Client / create_db_cluster_snapshot

create_db_cluster_snapshot#

DocDB.Client.create_db_cluster_snapshot(**kwargs)#

Creates a snapshot of a cluster.

See also: AWS API Documentation

Request Syntax

response = client.create_db_cluster_snapshot(
    DBClusterSnapshotIdentifier='string',
    DBClusterIdentifier='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • DBClusterSnapshotIdentifier (string) –

    [REQUIRED]

    The identifier of the cluster snapshot. This parameter is stored as a lowercase string.

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens.

    • The first character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    Example: my-cluster-snapshot1

  • DBClusterIdentifier (string) –

    [REQUIRED]

    The identifier of the cluster to create a snapshot for. This parameter is not case sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    Example: my-cluster

  • Tags (list) –

    The tags to be assigned to the cluster snapshot.

    • (dict) –

      Metadata assigned to an Amazon DocumentDB resource consisting of a key-value pair.

      • Key (string) –

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can’t be prefixed with “ aws:” or “ rds:”. The string can contain only the set of Unicode letters, digits, white space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

      • Value (string) –

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can’t be prefixed with “ aws:” or “ rds:”. The string can contain only the set of Unicode letters, digits, white space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

Return type:

dict

Returns:

Response Syntax

{
    'DBClusterSnapshot': {
        'AvailabilityZones': [
            'string',
        ],
        'DBClusterSnapshotIdentifier': 'string',
        'DBClusterIdentifier': 'string',
        'SnapshotCreateTime': datetime(2015, 1, 1),
        'Engine': 'string',
        'Status': 'string',
        'Port': 123,
        'VpcId': 'string',
        'ClusterCreateTime': datetime(2015, 1, 1),
        'MasterUsername': 'string',
        'EngineVersion': 'string',
        'SnapshotType': 'string',
        'PercentProgress': 123,
        'StorageEncrypted': True|False,
        'KmsKeyId': 'string',
        'DBClusterSnapshotArn': 'string',
        'SourceDBClusterSnapshotArn': 'string',
        'StorageType': 'string'
    }
}

Response Structure

  • (dict) –

    • DBClusterSnapshot (dict) –

      Detailed information about a cluster snapshot.

      • AvailabilityZones (list) –

        Provides the list of Amazon EC2 Availability Zones that instances in the cluster snapshot can be restored in.

        • (string) –

      • DBClusterSnapshotIdentifier (string) –

        Specifies the identifier for the cluster snapshot.

      • DBClusterIdentifier (string) –

        Specifies the cluster identifier of the cluster that this cluster snapshot was created from.

      • SnapshotCreateTime (datetime) –

        Provides the time when the snapshot was taken, in UTC.

      • Engine (string) –

        Specifies the name of the database engine.

      • Status (string) –

        Specifies the status of this cluster snapshot.

      • Port (integer) –

        Specifies the port that the cluster was listening on at the time of the snapshot.

      • VpcId (string) –

        Provides the virtual private cloud (VPC) ID that is associated with the cluster snapshot.

      • ClusterCreateTime (datetime) –

        Specifies the time when the cluster was created, in Universal Coordinated Time (UTC).

      • MasterUsername (string) –

        Provides the master user name for the cluster snapshot.

      • EngineVersion (string) –

        Provides the version of the database engine for this cluster snapshot.

      • SnapshotType (string) –

        Provides the type of the cluster snapshot.

      • PercentProgress (integer) –

        Specifies the percentage of the estimated data that has been transferred.

      • StorageEncrypted (boolean) –

        Specifies whether the cluster snapshot is encrypted.

      • KmsKeyId (string) –

        If StorageEncrypted is true, the KMS key identifier for the encrypted cluster snapshot.

      • DBClusterSnapshotArn (string) –

        The Amazon Resource Name (ARN) for the cluster snapshot.

      • SourceDBClusterSnapshotArn (string) –

        If the cluster snapshot was copied from a source cluster snapshot, the ARN for the source cluster snapshot; otherwise, a null value.

      • StorageType (string) –

        Storage type associated with your cluster snapshot

        For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.

        Valid values for storage type - standard | iopt1

        Default value is standard

Exceptions

  • DocDB.Client.exceptions.DBClusterSnapshotAlreadyExistsFault

  • DocDB.Client.exceptions.InvalidDBClusterStateFault

  • DocDB.Client.exceptions.DBClusterNotFoundFault

  • DocDB.Client.exceptions.SnapshotQuotaExceededFault

  • DocDB.Client.exceptions.InvalidDBClusterSnapshotStateFault