最近更新时间:2023.08.01 17:11:36
首次发布时间:2021.07.31 07:48:16
调用 DescribeImages 接口查询镜像信息。
说明
调用该接口时,使用TagFilters.N.Key
和TagFilters.N.Values.N
查询到的镜像数量不能超过1000个。若超过1000个,请使用 DesribeTags 接口进行查询。
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeImages | 要执行的操作,取值:DescribeImages。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
ImageName | String | 否 | test | 镜像名称。 |
NextToken | String | 否 | - | 分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的NextToken 参数值。 |
MaxResults | Integer | 否 | 15 | 分页查询时设置的每页行数:
|
ImageIds.N | String | 否 | ImageIds.1=image-3tksv4n6ay3vj0******& ImageIds.2=image-2asdv4n6ay3vj0****** | 镜像的ID,最多支持100个ID。您可以调用CreateImage、ImportImage接口获取自定义镜像ID,或调用本接口查询获取。
|
OsType | String | 否 | Linux | 操作系统类型。取值:
|
Visibility | String | 否 | public | 镜像的可见性。取值:
|
InstanceTypeId | String | 否 | ecs.c1.xlarge | 实例的规格ID,传入本参数时,将返回该规格可用的镜像ID列表。 |
IsSupportCloudInit | Boolean | 否 | true | 镜像是否支持Cloud-init。取值:
|
Status.N | String | 否 | Status.1=available&Status.2=creating | 镜像状态,最多支持10个。取值:
说明
|
ProjectName | String | 否 | default | 资源所属项目。 |
TagFilters.N.Key | String | 否 | TagFilters.1.Key=k1 | 镜像标签的标签键。
|
TagFilters.N.Values.N | String | 否 | TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2 | 镜像标签的标签值。
说明
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
NextToken | String | bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq****** | 本次调用返回的查询凭证值,返回为空表示没有下一页。 |
Images | Array of struct | - | 镜像信息。具体请参见下表“Images 结构”。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ImageId | String | image-3tksv4n6ay3vj****** | 镜像ID。 |
ImageName | String | test | 镜像名称。 |
Description | String | testdescription | 镜像描述。 |
OsType | String | Linux | 操作系统类型。 |
Status | String | available | 镜像的状态。 |
Visibility | String | public | 镜像的可见性。 |
Architecture | String | amd64 | 镜像的架构类型。取值:
|
UpdatedAt | String | 2021-07-26T21:55:12+08:00 | 更新时间,格式满足RFC3339。 |
CreatedAt | String | 2021-07-26T21:55:12+08:00 | 创建时间,格式满足RFC3339。 |
Platform | String | CentOS | 镜像操作系统的发行版本。取值:
|
PlatformVersion | String | 7.6 | 镜像的发行版本。 |
OsName | String | CentOS 7.6 64位 | 镜像操作系统的名称。 |
IsSupportCloudInit | Boolean | true | 镜像是否支持Cloud-init。取值:
|
ShareStatus | String | - | 镜像共享状态。取值:
|
Size | Integer | 20 | 镜像大小,单位为GiB。 |
ImageOwnerId | String | 210005**** | 镜像所属的账号ID。该参数仅在查询共享镜像时生效。 |
ProjectName | String | default | 资源所属项目。 |
BootMode | String | UEFI | 镜像的启动模式。 |
Tags | Array of struct | - | 镜像的标签信息,具体请参见下表“ Tags 结构 ”。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Key | String | image-tag-key-1 | 镜像的标签键。 |
Value | String | image-tag-value-1 | 镜像的标签值。 |
GET /?Action=DescribeImages&Version=2020-04-01&MaxResults=1 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata":{ "RequestId":"2021110417394001022514606307*****", "Action":"DescribeImages", "Version":"2020-04-01", "Service":"ecs", "Region":"cn-beijing" }, "Result":{ "NextToken":"", "Images":[ { "ImageId":"image-ebgy1og99tfct0gw****", "ImageName":"Windows Server 2012 R2 数据中心版 64位中文版", "Description":"testdescription", "OsType":"Windows", "Platform":"Windows Server", "PlatformVersion":"2012 R2 Datacenter Edition 64-bit Chinese", "Status":"available", "Visibility":"public", "Architecture":"amd64", "UpdatedAt":"2021-11-09T14:51:40+08:00", "CreatedAt":"2021-11-09T14:24:55+08:00", "OsName":"Windows Server 2012 R2 Datacenter Edition 64-bit Chinese", "IsSupportCloudInit":true, "ShareStatus":"", "Size":20, "ImageOwnerId":"210005****", "ProjectName":"default", "BootMode":"UEFI", "Tags": [ { "Key": "image-tag-key-1", "Value": "image-tag-value-1" } ] } ] } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidOsType.Malformed | The specified OsType is malformed. | 指定的操作系统不合法。 |
400 | InvalidVisibility.Malformed | The specified Visibility is malformed. | 指定的可见性不合法。 |
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | LimitExceeded.MaximumImageIds | You've reached the limit on the number of ImageIds that you can set. | 指定的镜像ID数量超过限制。 |
400 | LimitExceeded.MaximumStatus | You've reached the limit on the number of Status that you can set. | 指定的镜像状态数量超过限制。 |
400 | LimitExceeded.MaximumTagFilterKeys | You've reached the limit on the number of TagFilterKeys that you can set. | 指定的标签键超过最大限制。 |
400 | LimitExceeded.MaximumTagFilterValues | You've reached the limit on the number of TagFilterValues that you can set. | 指定的标签值超过最大限制。 |
400 | InvalidTagFilterKey.Malformed | The specified TagFilterKey is malformed. | 指定的标签键不合法。 |
400 | InvalidTagFilterValue.Malformed | The specified TagFilterValue is malformed. | 指定的标签值不合法。 |
400 | LimitExceeded.MaximumTagFilterResults | You've reached the limit on the number of resources that you can describe by TagFilters. | 通过标签过滤出的资源数量超过上限。 |
404 | InvalidInstanceType.NotFound | The specified InstanceType does not exist. | 指定的实例规格不存在。 |
409 | InvalidTagFilterKey.Conflict | The specified TagFilterKey already exists. | 指定的标签键已存在。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |