最近更新时间:2024.03.22 16:45:43
首次发布时间:2022.09.02 08:59:36
调用 CreateImage 接口通过实例、快照或快照一致性组创建自定义镜像。
说明
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateImage | 要执行的操作,取值:CreateImage。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
InstanceId | String | 否 | i-3teco18f1w5a71****** | 实例ID。您可以调用DescribeInstances接口查询获取实例ID。 说明 本参数与 |
NeedDetection | Boolean | 否 | true | 是否进行镜像检测。取值:
|
ImageName | String | 是 | image-1 | 镜像名称。
|
SnapshotGroupId | String | 否 | sg-120931dkslfkl**** | 快照一致性组ID,表示使用快照一致性组创建自定义镜像。您可以调用DescribeSnapshotGroups接口查询获取。 说明 本参数与 |
SnapshotId | String | 否 | snap-31akybwsxi8rudc6**** | 系统盘快照ID,表示使用系统盘快照创建自定义镜像。您可以调用DescribeSnapshots接口查看获取。 说明 本参数与 |
CreateWholeImage | Boolean | 否 | false | 是否创建整机镜像。取值:
说明 本功能正在邀测中,如需试用,请提交工单或联系客户经理申请。 |
Description | String | 否 | This is my first image | 镜像描述。
|
ProjectName | String | 否 | default | 资源所属项目。 注意 调用接口账号若仅拥有部分项目权限,本参数必填。授权账号操作项目详情,可查看管理项目权限。 |
Tags.N.Key | String | 否 | image-tag-key-1 | 镜像标签的标签键。
说明
|
Tags.N.Value | String | 否 | image-tag-value-1 | 镜像标签的标签值。
说明
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ImageId | String | image-3teco18f1w5a71****** | 镜像ID。 |
GET /?Action=CreateImage&Version=2020-04-01&InstanceId=i-3teco18f1w5a71******&ImageName=image-1 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing ServiceName: ecs
{ "ResponseMetadata":{ "RequestId":"2021110417394001022514606307*****", "Action":"CreateImage", "Version":"2020-04-01", "Service":"ecs", "Region":"cn-beijing" }, "Result": { "ImageId": "image-3teco18f1w5a71******" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidInstanceStatus | The status of the specified instance does not support this request. | 当前实例的状态不支持此操作。 |
400 | MissingParameter.ImageName | The required parameter ImageName is not supplied. | 镜像名称不能为空。 |
400 | InvalidImageName.Malformed | The specified ImageName is malformed. | 指定的镜像名称不合法。 |
400 | InvalidDescription.Malformed | The specified Description is malformed. | 指定的描述不合法。 |
400 | InvalidInstanceVolumeStatusForCreateImage.Unsupported | The specified instance volume status cannot be used for CreateImage. | 指定的实例云盘状态不支持创建自定义镜像。 |
400 | InvalidParameterCombination | Indicates an incorrect combination of parameters, or a missing parameter. | 参数组合错误或缺失参数。 |
400 | InvalidPlatformForDetect.UnSupported | The specified image platform cannot be used for detect. | 指定的镜像平台不支持检测。 |
400 | InvalidSnapshotIdOrSnapshotGroupIdForCreateImage.UnSupported | The specified SnapshotId or SnapshotGroupId cannot be used for CreateImage. | 指定的快照或一致性组不支持创建自定义镜像。 |
400 | LimitExceeded.MaximumSystemVolumeSize | You've reached the limit on the number of system volume size that you can create. | 指定的系统盘大小(GiB)超出限制。 |
400 | LimitExceeded.MaximumImageCount | You've reached the limit on the number of image that you can create. | 可拥有的自定义镜像个数超过限制。 |
400 | InvalidTagKey.Malformed | The specified TagKey is malformed. | 指定的标签的键不合法。 |
400 | InvalidTagValue.Malformed | The specified TagValue is malformed. | 指定的标签的值不合法。 |
400 | LimitExceeded.MaximumTags | You've reached the limit on the number of tags that you can create. | 指定的标签数量超过最大限制。 |
400 | InvalidInstanceTypeForCreateWholeImage.Unsupported | The instance type for specified instance cannot be used for CreateWholeImage. | 指定的实例的计算规格不支持创建整机镜像。 |
400 | InvalidVolumeTypeForCreateWholeImage.UnSupported | The specified VolumeType cannot be used for CreateWholeImage. | 指定的云盘类型不支持创建整机镜像。 |
400 | LimitExceeded.MaximumSnapshotGroupTotalSize | You've reached the limit on the total size of snapshot group that you can create. | 指定的快照一致性组容量超过限制。 |
404 | InvalidInstance.NotFound | The specified instance does not exist. | 指定的实例不存在。 |
404 | InvalidProject.NotFound | The specified Project does not exist. | 指定的Project不存在。 |
404 | InvalidSnapshotGroupId.NotFound | The specified SnapshotGroupId does not exist. | 指定的快照一致性组Id不存在。 |
404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. | 指定的快照Id不存在。 |
409 | InvalidTagKey.Conflict | The specified TagKey already exists. | 指定的标签键已存在。 |
412 | OperationDenied.ResourceLocked | The specified operation is denied as your resource is locked for another operation. | 指定的操作被拒绝,因为您的资源已被其他操作锁定。 |
412 | OperationDenied.SnapshotServiceUnavailable | The specified operation is denied as Snapshot service is unavailable. | 指定的操作被拒绝,因为快照服务未开通。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |