DocDBElastic / Client / copy_cluster_snapshot

copy_cluster_snapshot#

DocDBElastic.Client.copy_cluster_snapshot(**kwargs)#

Copies a snapshot of an elastic cluster.

See also: AWS API Documentation

Request Syntax

response = client.copy_cluster_snapshot(
    copyTags=True|False,
    kmsKeyId='string',
    snapshotArn='string',
    tags={
        'string': 'string'
    },
    targetSnapshotName='string'
)
Parameters:
  • copyTags (boolean) – Set to true to copy all tags from the source cluster snapshot to the target elastic cluster snapshot. The default is false.

  • kmsKeyId (string) –

    The Amazon Web Services KMS key ID for an encrypted elastic cluster snapshot. The Amazon Web Services KMS key ID is the Amazon Resource Name (ARN), Amazon Web Services KMS key identifier, or the Amazon Web Services KMS key alias for the Amazon Web Services KMS encryption key.

    If you copy an encrypted elastic cluster snapshot from your Amazon Web Services account, you can specify a value for KmsKeyId to encrypt the copy with a new Amazon Web ServicesS KMS encryption key. If you don’t specify a value for KmsKeyId, then the copy of the elastic cluster snapshot is encrypted with the same AWS KMS key as the source elastic cluster snapshot.

    To copy an encrypted elastic cluster snapshot to another Amazon Web Services region, set KmsKeyId to the Amazon Web Services KMS key ID that you want to use to encrypt the copy of the elastic cluster snapshot in the destination region. Amazon Web Services KMS encryption keys are specific to the Amazon Web Services region that they are created in, and you can’t use encryption keys from one Amazon Web Services region in another Amazon Web Services region.

    If you copy an unencrypted elastic cluster snapshot and specify a value for the KmsKeyId parameter, an error is returned.

  • snapshotArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) identifier of the elastic cluster snapshot.

  • tags (dict) –

    The tags to be assigned to the elastic cluster snapshot.

    • (string) –

      • (string) –

  • targetSnapshotName (string) –

    [REQUIRED]

    The identifier of the new elastic cluster snapshot to create from the source cluster snapshot. This parameter is not case sensitive.

    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: elastic-cluster-snapshot-5

Return type:

dict

Returns:

Response Syntax

{
    'snapshot': {
        'adminUserName': 'string',
        'clusterArn': 'string',
        'clusterCreationTime': 'string',
        'kmsKeyId': 'string',
        'snapshotArn': 'string',
        'snapshotCreationTime': 'string',
        'snapshotName': 'string',
        'snapshotType': 'MANUAL'|'AUTOMATED',
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS'|'INACCESSIBLE_SECRET_ARN'|'INACCESSIBLE_VPC_ENDPOINT'|'INCOMPATIBLE_NETWORK'|'MERGING'|'MODIFYING'|'SPLITTING'|'COPYING'|'STARTING'|'STOPPING'|'STOPPED',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) –

    • snapshot (dict) –

      Returns information about a specific elastic cluster snapshot.

      • adminUserName (string) –

        The name of the elastic cluster administrator.

      • clusterArn (string) –

        The ARN identifier of the elastic cluster.

      • clusterCreationTime (string) –

        The time when the elastic cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) –

        The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

      • snapshotArn (string) –

        The ARN identifier of the elastic cluster snapshot.

      • snapshotCreationTime (string) –

        The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).

      • snapshotName (string) –

        The name of the elastic cluster snapshot.

      • snapshotType (string) –

        The type of cluster snapshots to be returned. You can specify one of the following values:

        • automated - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account.

        • manual - Return all cluster snapshots that you have manually created for your Amazon Web Services account.

      • status (string) –

        The status of the elastic cluster snapshot.

      • subnetIds (list) –

        The Amazon EC2 subnet IDs for the elastic cluster.

        • (string) –

      • vpcSecurityGroupIds (list) –

        A list of EC2 VPC security groups to associate with the elastic cluster.

        • (string) –

Exceptions

  • DocDBElastic.Client.exceptions.ThrottlingException

  • DocDBElastic.Client.exceptions.ValidationException

  • DocDBElastic.Client.exceptions.ServiceQuotaExceededException

  • DocDBElastic.Client.exceptions.ConflictException

  • DocDBElastic.Client.exceptions.InternalServerException

  • DocDBElastic.Client.exceptions.ResourceNotFoundException

  • DocDBElastic.Client.exceptions.AccessDeniedException