Copies a standard snapshot or encrypted snapshot from one region to another.
Operation description
When you call this operation, take note of the following items:
The new snapshot cannot be used to roll back the cloud disk that is associated with the source snapshot.
Local snapshots cannot be copied.
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 publicly available. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
The tag information of the new snapshot. |
|
|
object |
No |
The tag information of the new snapshot. |
||
| Key |
string |
No |
The tag key of the new snapshot. Once specified, the tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://. |
TestKey |
| Value |
string |
No |
The tag value of the new snapshot. Once specified, the tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://. |
TestValue |
| RegionId |
string |
Yes |
The region ID of the source snapshot. You can call DescribeRegions to query the most recent region list. |
cn-chengdu |
| DestinationRegionId |
string |
Yes |
The ID of the destination region to which to copy the 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 and must start with a letter or a Chinese character. It cannot start with http:// or https://. The name can contain letters, digits, and Unicode characters that are categorized under the letter classification. It can also contain colons (:), underscores (_), periods (.), or hyphens (-). Default value: null. |
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: null. |
CopySnapshotDemo |
| RetentionDays |
integer |
No |
The retention period of the new snapshot, in days. The snapshot undergoes automatic release when the retention period expires. Valid values: 1 to 65536. Default value: null, which indicates that the snapshot does not undergo 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 publicly available. |
|
|
object |
No |
|||
| RoleType |
string |
No |
Note
This parameter is not publicly available. |
null |
| Rolearn |
string |
No |
Note
This parameter is not publicly available. |
null |
| AssumeRoleFor |
integer |
No |
Note
This parameter is not publicly available. |
0 |
| DestinationStorageLocationArn |
string |
No |
Note
This parameter is not publicly available. |
null |
| ClientToken |
string |
No |
Ensures the idempotence of the request. The value is generated from your client and must be unique among different requests. The value of ClientToken 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 |
|||
| SnapshotId |
string |
The ID of the new snapshot. |
s-bp17441ohwka0yui**** |
| RequestId |
string |
The request ID. |
C8B26B44-0189-443E-9816-D951F596**** |
Examples
Success response
JSON format
{
"SnapshotId": "s-bp17441ohwka0yui****",
"RequestId": "C8B26B44-0189-443E-9816-D951F596****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The specified tag key already exists. Tag keys must be unique. |
| 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 | Snapshot service has not been opened yet. | The operation is not supported while the snapshot service is not activated. |
| 403 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | |
| 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 description is malformed. | |
| 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 byok. | The bring your own key (BYOK) feature is not supported in the region. |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | |
| 403 | InvalidRegionId.NotExists | Region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified parameter EncryptAlgorithm is not valid. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when KmsKeyId is not empty. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The specified parameter Encrypted must be true when EncryptAlgorithm is not empty. | |
| 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.DataEncryptedKeyCreateFailed | Failed to create the KMS data encryption key. Please verify that the current KMS key has authorized the ECS service to use it. If the issue persists; contact KMS Technical Support. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | |
| 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 CMK (Customer Master Key) must be in an active state. | The CMK (Customer Master Key) must be in an active state. |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. |
| 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.