最近更新时间:2023.07.07 10:54:52
首次发布时间:2022.09.02 08:59:35
调用 CopyImage 接口,跨地域复制自定义镜像。
说明
ResourceIds.N
(资源ID)参数中传入目标镜像ID,查询复制镜像任务进度。名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CopyImage | 要执行的操作,取值为:CopyImage。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值为:2020-04-01。 |
ImageId | String | 是 | image-4431h3l7hl31a0****** | 源自定义镜像ID。您可以调用DescribeImages接口并传入Visibility=private 参数,查询获取自定义镜像ID。 |
DestinationRegion | String | 是 | cn-beijing | 目标地域,指定目标镜像所在地域。 注意 目标地域不能与源自定义镜像所在地域相同。 |
ImageName | String | 是 | testlyb1 | 目标自定义镜像名称。命名规范如下:
|
Description | String | 否 | winserver | 目标镜像描述,不填默认与源自定义镜像一致。填写规范如下:
|
ProjectName | String | 否 | default | 资源所属项目。 注意 调用接口账号若仅拥有部分项目权限,本参数必填。授权账号操作项目详情,可查看管理项目权限。 |
CopyImageTags | Boolean | 否 | true | 是否复制原镜像标签。取值:
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ImageId | String | image-4431h3l7hl31a0****** | 目标镜像ID。 |
GET /?Action=CopyImage&Version=2022-06-15&ImageId=image-4431h3l7hl31a0******&DestinationRegion=cn-changsha-sdv&ImageName=testlyb1 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata": { "RequestId": "2022061517394001022514606307*****", "Action": "CopyImage", "Version": "2022-06-15", "Service": "ecs", "Region": "cn-beijing", }, "Result": { "ImageId": "image-3teco18f1w5a71******" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | MissingParameter.ImageId | The required parameter ImageId is not supplied. | 镜像ID不能为空。 |
400 | MissingParameter.ImageName | The required parameter ImageName is not supplied. | 镜像名称不能为空。 |
400 | MissingParameter.DestinationRegion | The required parameter DestinationRegion is not supplied. | 目标地域不能为空。 |
400 | InvalidImageName.Malformed | The specified ImageName is malformed. | 目标镜像名称不合法。 |
400 | InvalidDescription.Malformed | The specified Description is malformed. | 目标镜像描述不合法。 |
400 | InvalidDestinationRegion.Malformed | The specified DestinationRegion is malformed. | 目的地域不合法。 |
400 | InvalidImageForCopyImage.UnSupported | The specified image cannot be used for CopyImage. | 指定的镜像不支持复制镜像操作。 |
400 | LimitExceeded.MaximumImageCount | You've reached the limit on the number of image that you can create. | 目的地域创建的镜像达到上限。 |
400 | LimitExceeded.MaximumImageSize | You've reached the limit on the number of image size that you can copy. | 指定的镜像大小(GiB)超出限制。 |
400 | InvalidRegionForCopyImage.UnSupported | The specified region cannot be used for CopyImage. | 指定的源地域或目的地域不支持复制镜像操作。 |
404 | InvalidImage.NotFound | The specified image does not exist. | 指定的镜像不存在。 |
404 | InvalidActionOrVersion | Could not find operation %s for version %s. | 请求接口不存在。 |
404 | InvalidProject.NotFound | The specified Project does not exist. | 指定的Project不存在。 |
412 | InvalidDestinationRegion.Mismatch | The destination region cannot be equal to the target region. | 复制镜像的源地域不能等于目标地域。 |
412 | OperationDenied.ResourceLocked | The specified operation is denied as your resource is locked for another operation. | 指定的操作被拒绝,因为您的资源已为其他操作锁定。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |