Amazon.RDS.AmazonRDSClient.CopyDBSnapshot C# (CSharp) Method

CopyDBSnapshot() public method

Copies the specified DB snapshot. The source DB snapshot must be in the "available" state.

To copy a DB snapshot from a shared manual DB snapshot, SourceDBSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB snapshot.

You can not copy an encrypted DB snapshot from another AWS region.

You can copy an encrypted DB snapshot from another AWS region. In that case, the region where you call the CopyDBSnapshot action is the destination region for the encrypted DB snapshot to be copied to. To copy an encrypted DB snapshot from another region, you must provide the following values:

  • KmsKeyId - the AWS Key Management System (KMS) key identifier for the key to use to encrypt the copy of the DB snapshot in the destination region.

  • PreSignedUrl - a URL that contains a Signature Version 4 signed request for the CopyDBSnapshot action to be called in the source region where the DB snapshot will be copied from. The pre-signed URL must be a valid request for the CopyDBSnapshot API action that can be executed in the source region that contains the encrypted DB snapshot to be copied.

    The pre-signed URL request must contain the following parameter values:

    • KmsKeyId - The KMS key identifier for the key to use to encrypt the copy of the DB snapshot in the destination region. This is the same identifier for both the CopyDBSnapshot action that is called in the destination region, and the action contained in the pre-signed URL.

    • SourceDBSnapshotIdentifier - the DB snapshot identifier for the encrypted snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source region. For example, if you are copying an encrypted DB snapshot from the us-west-2 region, then your SourceDBSnapshotIdentifier would look like Example: arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20161115.

    To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process.

  • TargetDBSnapshotIdentifier - the identifier for the new copy of the DB snapshot in the destination region.

  • SourceDBSnapshotIdentifier - the DB snapshot identifier for the encrypted snapshot to be copied. This identifier must be in the ARN format for the source region and is the same value as the SourceDBSnapshotIdentifier in the pre-signed URL.

For more information on copying encrypted snapshots from one region to another, see Copying an Encrypted DB Snapshot to Another Region in the Amazon RDS User Guide.

/// DBSnapshotIdentifier is already used by an existing snapshot. /// /// DBSnapshotIdentifier does not refer to an existing DB snapshot. /// /// The state of the DB snapshot does not allow deletion. /// /// Error accessing KMS key. /// /// Request would result in user exceeding the allowed number of DB snapshots. ///
public CopyDBSnapshot ( CopyDBSnapshotRequest request ) : CopyDBSnapshotResponse
request Amazon.RDS.Model.CopyDBSnapshotRequest Container for the necessary parameters to execute the CopyDBSnapshot service method.
return Amazon.RDS.Model.CopyDBSnapshotResponse
        public CopyDBSnapshotResponse CopyDBSnapshot(CopyDBSnapshotRequest request)
        {
            var marshaller = new CopyDBSnapshotRequestMarshaller();
            var unmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance;

            return Invoke<CopyDBSnapshotRequest,CopyDBSnapshotResponse>(request, marshaller, unmarshaller);
        }
AmazonRDSClient