为已有镜像版本启动制作任务,或恢复已有制作任务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
appstreaming:StartTaskForCreateImage |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ImageId |
string |
否 |
指定镜像 ID,默认不对外暴露。 |
img-bp13mu**** |
| VersionId |
string |
否 |
指定镜像版本,暂不对外暴露。 |
iv-bp1example**** |
| RetryType |
string |
否 |
重试类型。 |
RETRY |
| SystemDiskSize |
integer |
否 |
系统盘大小,单位 GB。 |
100 |
| PerformanceType |
string |
否 |
资源类型。 枚举值:
|
CPU |
| ResourceList |
array<object> |
否 |
镜像制作所需的资源列表,例如待安装应用的下载地址。最多 100 项;每项的 ResourceType 与 Resource 必须相互对应。 |
List of Object |
|
object |
否 |
镜像制作所需的资源列表,例如待安装应用的下载地址。最多 100 项;每项的 ResourceType 与 Resource 必须相互对应。 |
Object |
|
| ResourceType |
string |
否 |
资源类型。 枚举值:
|
URL |
| Resource |
string |
否 |
资源信息 |
https://example.com/apps/business/setup.exe |
| InstanceId |
string |
否 |
无影实例 ID。该实例可以是云桌面实例,工作站实例。为了保障镜像中的数据数据一致性, 建议将实例关机之后再发起镜像制作。 |
ecd-5u87dainamz54yk10 |
| SubInstanceId |
string |
否 |
子实例 ID,云电脑场景不涉及。工作站场景,需要传入持久会话 ID,确保定位到一个具体的实例。 |
p-0cc7s3n1l***** |
| ImageCreateMode |
string |
否 |
镜像制作模式。当前请使用以下模式:
|
BUILDER_MANUAL |
| RunMode |
string |
否 |
镜像制作环境的运行模式。可选值:
|
NORMAL |
| JumpStep |
string |
否 |
跳转到的步骤。 枚举值:
|
CREATE_VALIDATE_ENV |
| ProductType |
string |
否 |
产品类型。调用时固定填写以下取值:
|
CloudApp |
| SourceRegion |
string |
否 |
指定创建镜像的源地域,不设置则随机选择。 |
cn-shanghai |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
PlainResult |
||
| Data |
string |
返回的镜像 ID。 |
imgc-dabde**** |
| Success |
boolean |
是否成功。 |
true |
| Code |
string |
业务状态码。 |
200 |
| Message |
string |
出错时的错误消息。 |
Success |
| RequestId |
string |
请求 ID。 |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
示例
正常返回示例
JSON格式
{
"Data": "imgc-dabde****",
"Success": true,
"Code": "200",
"Message": "Success",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Instance.NotFound | The instance is not found. | 实例找不到。 |
| 400 | DesktopInstance.NotFound | The cloud computer instance does not exist. | 云电脑实例不存在。 |
| 400 | Instance.ImageUnsupported | A non-centralized image does not support this type of operation. | 使用非中心化镜像不支持该操作。 |
| 400 | Instance.PhysicalNodeNotExist | The instance physical node does not exist. | 物理节点不存在。 |
| 400 | ImageCreateByInstance.TaskExist | The image task of instance creation already exists. | 实例创建镜像任务已存在。 |
| 400 | ExceedBuilderQuota | The maximum number of builders is reached. | Builder数量达到了上限。 |
| 400 | InvalidBaseImage.NotConfigured | Configuration required for Vhd/Container images. | Vhd/Container镜像类型需要配置BaseImageId。 |
| 400 | CreateDesktopImageRecord.Failed | Create cloud computer image failed. | 创建云电脑镜像失败。 |
| 400 | Image.NotExist | The image does not exist. | 镜像不存在。 |
| 400 | ImageRegionDistribute.NotAllow | This image cannot be distributed. | 镜像不允许分发操作。 |
| 400 | ImageUpdateFailed.NotAllow | The image is not allowed to be modified. | 镜像不允许修改。 |
| 400 | ImageUpdateSharedImageFailed.NotAllow | The shared image is not allowed to be modified. | 共享镜像不允许修改。 |
| 400 | ParentImageRegionDistribute.NotExist | The target distribution region of the parent image does not exist. | 依赖父镜像分发地址不存在。 |
| 400 | InternalError | Internal error. | 内部错误 |
| 400 | InvalidParameter.SystemDiskSize | The system disk size is invalid. | 系统盘大小不合法。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。