最近更新时间:2023.06.16 15:07:11
首次发布时间:2022.07.01 09:23:04
调用 ImportImage 接口导入一份您的本地镜像文件到云服务器,作为自定义镜像出现在相应地域中。
说明
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ImportImage | 要执行的操作,取值:ImportImage。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
ImageName | String | 是 | image-1 | 镜像名称。
|
Description | String | 否 | This is my first image | 镜像描述。
|
OsType | String | 否 | Linux | 操作系统类型。取值:
说明 若为空,火山引擎会根据您传入的 |
Platform | String | 是 | CentOS | 镜像操作系统的发行版本。取值:
|
PlatformVersion | String | 否 | 7.6 | 镜像的发行版本。 |
Architecture | String | 否 | amd64 | 镜像的架构类型。取值:
|
Url | String | 是 | - | 自定义镜像在TOS存储桶的Url链接。 说明 请将自定义镜像文件上传至TOS存储桶获取链接,详情可查看导入自定义镜像。 |
BootMode | String | 否 | UEFI | 镜像的启动模式。取值:
|
ProjectName | String | 否 | default | 资源所属项目。 注意 调用接口账号若仅拥有部分项目权限,本参数必填。授权账号操作项目详情,可查看管理项目权限。 |
Tags.N.Key | String | 否 | image-tag-key-1 | 镜像标签的标签键。
说明
|
Tags.N.Value | String | 否 | image-tag-value-1 | 镜像标签的标签值。
说明
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ImageId | String | image-ebgy1og99tfct0gw**** | 镜像ID。 |
GET /?Action=ImportImage&Version=2020-04-01&ImageName=image-1&OsType=Linux&Platform=CentOS&PlatformVersion=7.6&Architecture=amd64&Url=xxx HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata": { "RequestId": "202106111445100102252431000052****", "Action": "ImportImage", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": { "ImageId": "image-ebgy1og99tfct0gw****" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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 | InvalidOsType.Malformed | The specified OsType is malformed. | 指定的操作系统类型不合法。 |
400 | MissingParameter.Platform | The required parameter Platform is not supplied. | 镜像的操作系统发行版不能为空。 |
400 | InvalidPlatformForImportImage.Unsupported | The specified Platform cannot be used for ImportImage. | 指定的镜像操作系统发行版不支持导入。 |
400 | InvalidArchitecture.Malformed | The specified Architecture is malformed. | 指定的镜像架构类型不合法。 |
400 | InvalidBootMode.Malformed | The specified BootMode is malformed. | 指定的启动方式不合法。 |
400 | InvalidUrl.Malformed | The specified URL is malformed. | 指定的URL不合法。 |
400 | InvalidTosGetObject.AccessDenied | The Action tos:GetObject is not authorized for ecs, please check your IAM policy of ecs. | tos:GetObject未授权给ecs,请检查您的ecs IAM策略。 |
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 import. | 指定的镜像大小(GiB)超出限制。 |
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. | 指定的标签数量超过最大限制。 |
404 | InvalidTOSObject.NotFound | The specified TOSObject does not exist. | 指定的TOSObject不存在。 |
404 | InvalidProject.NotFound | The specified Project does not exist. | 指定的Project不存在。 |
409 | InvalidTagKey.Conflict | The specified TagKey already exists. | 指定的标签键已存在。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |