DescribeImages_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

  • 您可以查询的镜像资源包括您的自定义镜像、阿里云提供的公共镜像、云市场镜像以及其他阿里云用户主动共享给您的共享镜像。
  • 支持分页查询,查询结果包括可使用的镜像资源的总数和当前页的镜像资源。每页的数量默认为 10 条。
  • 通过阿里云 CLI 调用 API 时,不同数据类型的请求参数取值必须遵循格式要求。更多信息,请参见 CLI 参数格式说明
  • 当查询阿里云官方提供的镜像或共享镜像(ImageOwnerAlias 指定 system 或 others)时,本次请求可忽略 RAM 鉴权规则。更多信息,请参见鉴权规则

流控信息

请求速率为1000/60(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ecs:DescribeImages
Get
Image
acs:ecs:{#regionId}:{#accountId}:image/*
Image
acs:ecs:{#regionId}:{#accountId}:image/{#imageId}

请求参数

字段名称字段详情
RegionIdstring

镜像所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
Statusstring

查询指定状态的镜像,如果不配置此参数,默认只返回 Available 状态的镜像。取值范围:展开详情

示例值:Available
ImageIdstring

镜像 ID。展开详情

示例值:m-bp1g7004ksh0oeuc****参考取值来源:
    ImportImage
    CopyImage
    ExportImage
    CreateImage
ShowExpiredboolean

订阅型镜像是否已经超过使用期限。

示例值:false
SnapshotIdstring

根据某一快照 ID 创建的自定义镜像。

示例值:s-bp17ot2q7x72ggtw****参考取值来源:
    CopySnapshot
    CreateSnapshot
    DescribeSnapshots
ImageNamestring

镜像名称。支持模糊搜索。

示例值:testImageName参考取值来源:
    DescribeImageFromFamily
ImageFamilystring

镜像族系名称,查询镜像时可通过设置该参数来过滤当前族系对应的镜像。展开详情

示例值:hangzhou-daily-update参考取值来源:
    DescribeImagePipelines
ImageOwnerAliasstring

镜像来源。取值范围:展开详情

示例值:self参考取值来源:
    DescribeImageFromFamily
InstanceTypestring

为指定的实例规格查询可以使用的镜像。

示例值:ecs.g5.large参考取值来源:
    DescribeInstanceTypes
    CreateInstance
IsSupportIoOptimizedboolean

镜像是否可以运行在 I/O 优化实例上。

示例值:true
IsSupportCloudinitboolean

镜像是否支持 cloud-init。

示例值:true
OSTypestring

镜像的操作系统类型。取值范围:展开详情

示例值:linux
Architecturestring

镜像的体系架构。取值范围:展开详情

示例值:i386
PageNumberinteger<int32>

镜像资源列表的页码。展开详情

示例值:1取值 >= 1
PageSizeinteger<int32>

分页查询时设置的每页行数。展开详情

示例值:10取值 <= 100
Usagestring

镜像是否已经运行在 ECS 实例中。取值范围:展开详情

示例值:instance
DryRunboolean

是否只预检此次请求。展开详情

示例值:false
ActionTypestring

镜像需要被使用到的场景。取值范围:展开详情

示例值:CreateEcs
ResourceGroupIdstring

自定义镜像所在的企业资源组 ID。使用该参数过滤资源时,资源数量不能超过 1000 个。展开详情

示例值:rg-bp67acfmxazb4p****参考取值来源:
    DescribeSecurityGroups
Tagarray<object>

标签列表。

子级条数 <= 20
Filterarray<object>

查询资源时的筛选条件列表。

子级条数 <= 10
IsPublicboolean

是否查询已发布的社区镜像。取值范围:展开详情

示例值:false
ImageOwnerIdinteger<int64>

镜像所属的阿里云账号 ID。该参数仅在查询共享镜像以及社区镜像时生效。

注意 该字段类型为 Long,在序列化/反序列化的过程中可能导致精度丢失,请注意数值不得大于 9007199254740991。
示例值:20169351435666****

返回参数

字段名称字段详情
PageSizeinteger<int32>

当前分页包含多少条目。

示例值:1
PageNumberinteger<int32>

当前页码。

示例值:1
RequestIdstring

请求 ID。

示例值:66189103-EDB2-43E2-BB60-BFF2B62F4EB8
TotalCountinteger<int32>

镜像总数。

示例值:1
RegionIdstring

镜像所属地域 ID。

示例值:cn-hangzhou
Imagesobject

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidImageOwnerAlias.ValueNotSupported
The specified ImageOwnerAlias value is not supported.诊断
400
InvalidParamter
Invalid Parameter.诊断
400
InvalidTag.Mismatch
The specified Tag.n.Key and Tag.n.Value are not match.诊断
400
InvalidTagCount
The specified tags are beyond the permitted range.诊断
400
InvalidInstanceType.ValueNotSupported
The specified instance type %s does not exist. You can use the DescribeInstanceTypes API to query the available instance types.诊断
400
InvalidFilterValue.NetworkType
The specified networkType value in the Filter is invalid.诊断
400
InvalidOperation.ImageOwnerIdUnsupported
The parameter "ImageOwnerId" is not supported in this context, it is only valid when querying shared images or community images.诊断
403
CurrentAccount.NotSupportPublicImage
Public image is not supported for current account.诊断
404
InvalidFilterKey.NotFound
The specified Filter Key is not found.诊断
404
InvalidFilterValue
The specified Filter Value is not valid.诊断
404
InvalidUsage
The specified Usage is not valid.诊断
404
InvalidOSType
The specified OSType is not valid.诊断
404
InvalidArchitecture
The specified Architecture is not valid.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2025-03-14
变更错误码400
2025-02-27
变更错误码400
2024-12-25
变更返回参数
2024-12-20
变更返回参数
2024-12-16
变更返回参数
2024-12-05
变更返回参数
2024-09-26
变更错误码400
  • 1
  • 2
  • 10 条/页

相关示例

查询创建 ECS 需要的资源信息详情
2021-01-05