Copies a standard snapshot or an encrypted snapshot from one region to another.
Operation description
When you call this operation, note the following items:
You cannot use the new snapshot to roll back the cloud disk from which the source snapshot was created.
You cannot copy local snapshots.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:CopySnapshot |
create |
*Snapshot
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupId |
string |
No |
This parameter is not available. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
The tags of the new snapshot. |
|
|
object |
No |
The tags of the new snapshot. |
||
| Key |
string |
No |
The tag key of the new snapshot. If you specify this parameter, it cannot be an empty string. The tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
TestKey |
| Value |
string |
No |
The tag value of the new snapshot. If you specify this parameter, it can be an empty string. The tag value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
TestValue |
| RegionId |
string |
Yes |
The region ID of the source snapshot. You can call the DescribeRegions operation to query the most recent region list. |
cn-chengdu |
| DestinationRegionId |
string |
Yes |
The ID of the destination region for the new snapshot. |
us-east-1 |
| SnapshotId |
string |
Yes |
The ID of the source snapshot. |
s-bp67acfmxazb4p**** |
| DestinationSnapshotName |
string |
Yes |
The name of the new snapshot. The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character and cannot start with http:// or https://. It can contain Unicode letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). Default value: empty. |
CopySnapshotDemo |
| DestinationSnapshotDescription |
string |
Yes |
The description of the new snapshot. The description must be 2 to 256 characters in length and cannot start with http:// or https://. Default value: empty. |
CopySnapshotDemo |
| RetentionDays |
integer |
No |
The retention period of the new snapshot. Unit: days. The snapshot is subject to automatic release when the retention period expires. Valid values: 1 to 65536. Default value: empty, which indicates that the snapshot is not subject to automatic release. |
60 |
| Encrypted |
boolean |
No |
Specifies whether to encrypt the cloud disk. Valid values:
Default value: false. |
false |
| KMSKeyId |
string |
No |
The customer master key (CMK) in the destination region. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| Arn |
array<object> |
No |
Note
This parameter is in invitational preview and is not supported. |
|
|
object |
No |
|||
| AssumeRoleFor |
integer |
No |
Note
This parameter is not available. |
0 |
| RoleType |
string |
No |
Note
This parameter is not available. |
null |
| Rolearn |
string |
No |
Note
This parameter is not available. |
null |
| DestinationStorageLocationArn |
string |
No |
Note
This parameter is not available. |
null |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
123e4567-e89b-12d3-a456-426655440000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
C8B26B44-0189-443E-9816-D951F596**** |
| SnapshotId |
string |
The ID of the new snapshot. |
s-bp17441ohwka0yui**** |
Examples
Success response
JSON format
{
"RequestId": "C8B26B44-0189-443E-9816-D951F596****",
"SnapshotId": "s-bp17441ohwka0yui****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Duplicate.TagKey | The parameter Tag.N.Key contains duplicate values. Please remove the duplicate tag keys and try again. | |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidParameter.Arns | The specified Arns is not valid. | The Arns parameter is invalid. Please check and pass it again. |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | InvalidSnapshotId.EncryptedNotSupport | The specified snapshot with encrypted does not support copy. | |
| 403 | InvalidSnapshotId.NotFound | The specified snapshot is not exists. | The specified source snapshot does not exist. |
| 403 | InvalidSnapshotCategory.NotSupportCopy | The specified snapshot's category does not support copy. | |
| 403 | InvalidUser.NotInWhiteList | The user is not in the white list of copying snapshot. | You are not authorized to perform the operation. |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | The snapshot service has not been activated. Please activate it and try again. | |
| 403 | InvalidSnapshotId.NotReady | The creation of the specified snapshot is still in progress. Please wait for it to complete and try again. | |
| 403 | InvalidOperation.Unauthorized | The specified operation is unauthorized. | |
| 403 | InvalidOperation.UnfinishedCrossRegionCopy | This disk has unfinished cross-region copy snapshots in the target region. | The disk also has unfinished cross-region snapshot copies. |
| 403 | InvalidOperation.NotSupportCopyInSameRegion | Copying snapshot in the same region is not supported. | the source and destination regions of the snapshot cannot be the same. |
| 403 | InvalidSnapshotName.Malformed | The specified SnapshotName is malformed. | |
| 403 | InvalidDescription.Malformed | The specified parameter DestinationSnapshotDescription is not valid. Please ensure that the description is 2 to 256 characters long and does not start with "http://" or "https://" and try again. | |
| 403 | InvalidRetentionDays.Malformed | The specified RetentionDays is not valid. | |
| 403 | InvalidRegionId.NotSupportedEncryptedSnapshotCopy | The specified region not support copy encrypted snapshot. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support customer master keys. Please choose another region or use a default KMS key and try again. | |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The encryption algorithm of the source snapshot does not support copying. Please choose another snapshot and try again. | |
| 403 | InvalidRegionId.NotExists | Region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified EncryptAlgorithm is not valid. Ensure the value is a supported encryption algorithm such as AES-256. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The Encrypted parameter must be set to true when KMSKeyId is specified. Please adjust the parameters and try again. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The Encrypted parameter must be set to true when EncryptAlgorithm is specified. Please adjust the parameters and try again. | |
| 403 | InvalidEncrypted.NotSupportDecrypt | Encrypted snapshot not support copy to decrypt snapshot. | |
| 403 | InvalidSnapshotCategory.NotSupportCrossRegionCopy | The specified snapshot does not support cross-region copy. | |
| 403 | InvalidSnapshotCategory.NotSupportEncryptedCopy | The specified snapshot does not support encrypted copy. | |
| 403 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | The ECS service is not authorized to access your KMS key. Please grant the ECS service permission to use the key and try again. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. | |
| 403 | InvalidKMSKeyId.NotSymmetric | The specified KMSKeyId must be a symmetric key. Please use a symmetric KMS key such as an AES-256 key. | |
| 403 | QuotaExceed.SnapshotQuota | The quota is insufficient. Please contact your channel partner to increase the quota. | |
| 403 | InvalidOperation.UnfinishedEncryptedSnapshotCopy | This disk has unfinished encrypted copy snapshots in the target region. | The cloud disk has unfinished encrypted snapshot copy tasks. |
| 403 | InvalidParameterDestinationStorageLocationArn.Unauthorized | The operation has failed due to lack of permission for the specified "DestinationStorageLocationArn". Please use a resource with appropriate permission for the operation. | |
| 403 | InvalidParameterDestinationStorageLocationArn.RegionNotMatch | The region information in the specified parameter "DestinationStorageLocationArn" is inconsistent with "DestinationRegionId". Please use the correct information for the operation. | |
| 403 | InvalidSnapshot.StorageLocationNotSupported | The storage location of the current snapshot does not support this operation. | |
| 403 | InvalidSnapshot.EncryptedNotSupported | The current operation does not support the use of encrypted snapshots. | This operation is not supported for encrypted snapshots. |
| 403 | InvalidParameterDestinationStorageLocationArn.Malformed | The specified DestinationStorageLocationArn is malformed. | |
| 403 | OperationDenied.NonCompliantDestinationRegion | The copy operation to the destination region is not in compliance with regulations. | The target region does not meet the security compliance requirements. |
| 403 | OperationDenied.SnapshotCategoryNotSupportCopy | The specified category of snapshot not support copy. | The specified snapshot type does not support copying. |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The specified KMS key is not authorized for the ECS service. Please grant the ECS service permission to use the key in the KMS console and try again. | |
| 403 | OperationDenied.NotInArnsWhitelist | The current account is not authorized for this operation. Please check the ARNS whitelist configuration. | |
| 403 | OperationDenied.KMSKeyUnauthorized | The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation. | |
| 403 | InvalidOperation.CopyingDataToThisRegionUnsupported | Data transfer to the current region from other regions is not supported. | Data transfer to the current region from other regions is not supported. |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request. Please try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.