将一份标准快照或加密快照从一个地域复制到另一个地域。
接口说明
调用该接口时,您需要注意:
- 复制后的新快照不能回滚源快照对应的云盘。
- 不支持复制本地快照。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用全部资源表示。
 
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| ecs:CopySnapshot | create | *Snapshot acs:ecs:{#regionId}:{#accountId}:snapshot/{#snapshotId} | 
 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| 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 | long | 否 | 说明 
该参数暂未开放使用。
 | 0 | 
| DestinationStorageLocationArn | string | 否 | 说明 
该参数暂未开放使用。
 | null | 
| ClientToken | string | 否 | 保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性。 | 123e4567-e89b-12d3-a456-426655440000 | 
返回参数
示例
正常返回示例
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参数无效,请检查后重新传递。 | 
| 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 wrongly formed. | 快照名称格式不合法。 | 
| 403 | InvalidDescription.Malformed | The specified description is wrongly formed. | 指定的资源描述格式不合法。长度为 2-256 个字符,不能以 http:// 和 https:// 开头。 | 
| 403 | InvalidRetentionDays.Malformed | The specified RetentionDays is not valid. | 指定的保留天数无效。请检查 RetentionDays 参数值是否正确。 | 
| 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 is not support cross region copy. | - | 
| 403 | InvalidSnapshotCategory.NotSupportEncryptedCopy | The specified snapshot is not support encrypted copy. | - | 
| 403 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | 当前操作需要开启KMS。 | 
| 403 | InvalidParameter.DataEncryptedKeyCreateFailed | Create kms data encrypted key fail. If you need further assistance, you can contact the KMS Technical Support. | 使用KMS主密钥创建数据密钥失败,请联系KMS值班同学进一步排查。 | 
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | 指定的参数 KMSKeyId 不存在。 | 
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | ECS 服务无权访问您的 KMS。 | 
| 403 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | 加密使用的KMSKey必须为对称加密密钥。 | 
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when kmsKeyId is not null. | - | 
| 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 wrongly formed. | - | 
| 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. | 请求操作的资源与之前的请求冲突 | 
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误,请重试。 | 
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|---|---|
| 2025-03-21 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2025-03-19 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2025-01-21 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2024-12-10 | OpenAPI 描述信息更新、OpenAPI 去除了 deprecated 标记、OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2024-11-27 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2024-06-27 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2023-12-18 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2023-08-02 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 查看变更详情 | 
| 2023-06-19 | OpenAPI 错误码发生变更 | 查看变更详情 | 
| 2023-03-01 | OpenAPI 错误码发生变更 | 查看变更详情 | 
