将一份标准快照或加密快照从一个地域复制到另一个地域。
接口说明
调用该接口时,您需要注意:
复制后的新快照不能回滚源快照对应的云盘。
不支持复制本地快照。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:CopySnapshot |
create |
*Snapshot
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ResourceGroupId |
string |
否 |
该参数暂未开放使用。 |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
否 |
新快照的标签信息。 |
|
|
object |
否 |
新快照的标签信息。 |
||
| Key |
string |
否 |
新快照的标签键。一旦传入该值,则不允许为空字符串。最多支持 128 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。 |
TestKey |
| Value |
string |
否 |
新快照的标签值。一旦传入该值,允许为空字符串。最多支持 128 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。 |
TestValue |
| RegionId |
string |
是 |
源快照所在的地域。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-chengdu |
| DestinationRegionId |
string |
是 |
新快照的目标地域 ID。 |
us-east-1 |
| SnapshotId |
string |
是 |
源快照 ID。 |
s-bp67acfmxazb4p**** |
| DestinationSnapshotName |
string |
是 |
新快照的名称。长度为 2~128 个字符,必须以大小写字母或中文开头,不能以 http://和 https:// 开头。支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。 默认值:空。 |
CopySnapshotDemo |
| DestinationSnapshotDescription |
string |
是 |
新快照的描述信息。长度为 2~256 个英文或中文字符,不能以 http://或 https://开头。 默认值:空。 |
CopySnapshotDemo |
| RetentionDays |
integer |
否 |
新快照的保留时长,单位为天,到期后快照会被自动释放。取值范围:1~65536。 默认值:空,表示快照不会被自动释放。 |
60 |
| Encrypted |
boolean |
否 |
是否加密云盘。取值范围:
默认值:false。 |
false |
| KMSKeyId |
string |
否 |
目标地域的 KMS 用户主密钥。 |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| Arn |
array<object> |
否 |
说明
该参数正在邀测中,暂不支持使用。 |
|
|
object |
否 |
|||
| RoleType |
string |
否 |
说明
该参数暂未开放使用。 |
null |
| Rolearn |
string |
否 |
说明
该参数暂未开放使用。 |
null |
| AssumeRoleFor |
integer |
否 |
说明
该参数暂未开放使用。 |
0 |
| DestinationStorageLocationArn |
string |
否 |
说明
该参数暂未开放使用。 |
null |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性。 |
123e4567-e89b-12d3-a456-426655440000 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| SnapshotId |
string |
新快照的 ID。 |
s-bp17441ohwka0yui**** |
| RequestId |
string |
请求 ID。 |
C8B26B44-0189-443E-9816-D951F596**** |
示例
正常返回示例
JSON格式
{
"SnapshotId": "s-bp17441ohwka0yui****",
"RequestId": "C8B26B44-0189-443E-9816-D951F596****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 标签中存在重复的键,请保持键的唯一性。 |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | 指定的标签键参数有误。 |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | 指定的标签值参数有误。 |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidParameter.Arns | The specified Arns is not valid. | 该Arns参数无效,请检查后重新传递。 |
| 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. | 指定的源快照不存在。 |
| 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. | 您暂未授权执行该操作。 |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | 快照服务未开通,操作无法执行。 |
| 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. | 该磁盘还有未完成的跨地域快照拷贝。 |
| 403 | InvalidOperation.NotSupportCopyInSameRegion | Copying snapshot in the same region is not supported. | 拷贝快照的源和目的region不能相同。 |
| 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. | 该地域不支持BYOK。 |
| 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. | 云盘存在未完成的加密快照拷贝任务。 |
| 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. | 加密快照不支持此操作 |
| 403 | InvalidParameterDestinationStorageLocationArn.Malformed | The specified DestinationStorageLocationArn is malformed. | |
| 403 | OperationDenied.NonCompliantDestinationRegion | The copy operation to the destination region is not in compliance with regulations. | 目标地域不符合安全合规要求。 |
| 403 | OperationDenied.SnapshotCategoryNotSupportCopy | The specified category of snapshot not support copy. | 指定快照类型暂不支持拷贝 |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | 用户主密钥(CMK)需要处于活动状态。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | 用户主密钥(CMK)未授权ECS服务添加标签权限。 |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request. Please try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。