将一份标准快照或加密快照从一个地域复制到另一个地域。
接口说明
调用该接口时,您需要注意:
复制后的新快照不能回滚源快照对应的云盘。
不支持复制本地快照。
调试
您可以在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 specified Tag.N.Key contains duplicate keys. Please ensure that each tag key is unique and try again. | |
| 400 | InvalidTagKey.Malformed | The specified Tag.N.Key is not valid. Please ensure that the tag key is no more than 128 characters and does not start with "aliyun" or "acs:" and does not contain "http://" or "https://". | |
| 400 | InvalidTagValue.Malformed | The specified Tag.N.Value is not valid. Please ensure that the tag value is no more than 128 characters and does not contain "http://" or "https://". | |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. Please verify the format of RegionId or call DescribeRegions to query the supported regions and try again. | |
| 400 | InvalidParameter.Arns | The specified parameter Arn is not valid. Please ensure that the value of Arn.N is in the correct format and try 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 encrypted snapshot does not support copying. Please use an unencrypted snapshot and try again. | |
| 403 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. Please verify the SnapshotId and the current region and try again. | |
| 403 | InvalidSnapshotCategory.NotSupportCopy | The category of the specified snapshot does not support copying. Please use a snapshot of a supported category and try again. | |
| 403 | InvalidUser.NotInWhiteList | The current account is not in the allowlist for copying snapshots. Please submit a ticket to apply for access. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | The snapshot service has not been activated. Please activate the snapshot service and try again. | |
| 403 | InvalidSnapshotId.NotReady | The specified snapshot is still being created. Please wait until the snapshot creation completes 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. | 该磁盘还有未完成的跨地域快照拷贝。 |
| 403 | InvalidOperation.DiskHasUnfinishedSnapshotCopy | There is an unfinished snapshot copy "%s" of this disk in the target region. Please change the region or wait for the copy to complete before trying again. | 该磁盘在目标地域存在未完成的快照拷贝,请更换地域或等待其拷贝完成后再重试。 |
| 403 | InvalidOperation.NotSupportCopyInSameRegion | Copying snapshot in the same region is not supported. Please specify a different DestinationRegionId and try again. | 不支持在同一地域内复制该快照。请指定不同的DestinationRegionId,然后重试。 |
| 403 | InvalidSnapshotName.Malformed | The specified DestinationSnapshotName is malformed. Please ensure that the DestinationSnapshotName is 2 to 128 characters long and starts with a letter and does not start with "http://" or "https://" or auto and try again. | |
| 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. Please ensure that the value is an integer between 1 and 65536 and try again. | |
| 403 | InvalidRegionId.NotSupportedEncryptedSnapshotCopy | The specified region does not support copying encrypted snapshots. Please choose another region and try again. | |
| 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 | The specified RegionId does not exist. Please call DescribeRegions to query the supported regions and try again. | |
| 403 | InvalidEncryptAlgorithm | The encryption algorithm of the source snapshot does not support copying. Please choose another snapshot and try again. | |
| 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 | The specified snapshot is encrypted and cannot be copied as an unencrypted snapshot. Please set the Encrypted parameter to true and try again. | |
| 403 | InvalidSnapshotCategory.NotSupportCrossRegionCopy | The specified snapshot does not support cross-region copy. | |
| 403 | InvalidSnapshotCategory.NotSupportEncryptedCopy | The category of the specified snapshot does not support encrypted copy. Please set Encrypted to false or use a snapshot of a supported category and try again. | |
| 403 | InvalidParameter.KmsNotEnabled | The specified operation requires KMS to be enabled. Please activate KMS and try again. | |
| 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 | The source snapshot has an unfinished encrypted copy task in the destination region. Please wait for the copy task to complete or delete the unfinished copied snapshot and try again. | |
| 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 encrypted snapshots. Please use an unencrypted snapshot and try again. | |
| 403 | InvalidParameterDestinationStorageLocationArn.Malformed | The specified parameter DestinationStorageLocationArn is malformed. Please ensure that the value of DestinationStorageLocationArn is in the correct format and try again. | |
| 403 | OperationDenied.NonCompliantDestinationRegion | The copy operation to the destination region is not in compliance with regulations. | 目标地域不符合安全合规要求。 |
| 403 | OperationDenied.SnapshotCategoryNotSupportCopy | The specified snapshot category does not support copying. Please use a snapshot of a supported category and try again. | |
| 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 operation is denied because the account is not authorized to specify the Arn parameter. Please remove the Arn parameter and try again. | |
| 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. | 不支持从其他地域复制数据到当前地域。 |
| 403 | RequestDenied.WAFIntercepted | This request was blocked by security policies. Please check your request parameters and try again. | |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request. Please try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。