调用DescribeImageComponents查询一个或多个镜像组件的详细信息。
接口说明
您可以设置NextToken
查询凭证(Token),其取值是上一次调用DescribeImageComponents返回的NextToken
参数值,再通过MaxResults
设置单页查询的最大条目数进行查询。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeImageComponents |
系统规定参数。取值:DescribeImageComponents。 |
RegionId | String | 是 | cn-hangzhou |
所属的地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。 |
ResourceGroupId | String | 否 | rg-bp67acfmxazb4p**** |
资源组ID。使用该参数过滤资源时,资源数量不能超过1000个。 说明 不支持默认资源组过滤。
|
Tag.N.Key | String | 否 | TestKey |
标签键。N的取值范围:1~20 |
Tag.N.Value | String | 否 | TestValue |
标签值。N的取值范围:1~20 |
Name | String | 否 | testComponent |
镜像组件名称。仅支持精确查找。 |
NextToken | String | 否 | AAAAAdDWBF2**** |
查询凭证(Token)。取值为上一次调用该接口返回的 |
MaxResults | Integer | 否 | 50 |
分页查询时每页行数。取值范围:1~500 默认值:50。 |
Owner | String | 否 | SELF |
镜像组件类型。取值范围:
|
ImageComponentId.N | String | 否 | ic-bp67acfmxazb4p**** |
待查询的镜像组件ID。N取值范围:1~20 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
NextToken | String | AAAAAdDWBF2**** |
本次调用返回的查询凭证(Token)。具体使用方式请参见接口说明。 |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
请求ID。 |
TotalCount | Integer | 1 |
返回的镜像组件数量。 |
MaxResults | Integer | 50 |
分页查询时每页行数。 |
ImageComponent | Array of ImageComponentSet |
镜像组件的详细信息组成的列表。 |
|
ImageComponentSet | |||
CreationTime | String | 2020-11-24T06:00:00Z |
组件创建时间。 |
Description | String | This is description. |
描述信息。 |
SystemType | String | Linux |
组件支持的操作系统。 |
ImageComponentId | String | ic-bp67acfmxazb4p**** |
镜像组件ID。 |
ComponentType | String | Build |
组件类型。 |
ResourceGroupId | String | rg-bp67acfmxazb4p**** |
资源组ID。 |
Name | String | testComponent |
组件名称。 |
Content | String | RESTART |
组件内容。 |
Owner | String | SELF |
镜像组件类型。可能值:
|
Tags | Array of Tag |
标签键值对列表。 |
|
Tag | |||
TagValue | String | TestValue |
标签值。 |
TagKey | String | TestKey |
标签键。 |
示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeImageComponents
&RegionId=cn-hangzhou
&ImageComponentId.1=ic-bp67acfmxazb4p****
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeImageComponentsResponse>
<TotalCount>1</TotalCount>
<NextToken>AAAAAdDWBF2****</NextToken>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<ImageComponent>
<ImageComponentSet>
<ComponentType>Build</ComponentType>
<Description>This is description.</Description>
<ResourceGroupId>rg-bp67acfmxazb4p****</ResourceGroupId>
<Owner>SELF</Owner>
<Content>RESTART</Content>
<CreationTime>2020-11-24T06:00:00Z</CreationTime>
<SystemType>Linux</SystemType>
<ImageComponentId>ic-bp67acfmxazb4p****</ImageComponentId>
<Name>testComponent</Name>
</ImageComponentSet>
<ImageComponentSet>
<Tags>
<Tag>
<TagKey>TestKey</TagKey>
<TagValue>TestValue</TagValue>
</Tag>
</Tags>
</ImageComponentSet>
</ImageComponent>
<MaxResults>50</MaxResults>
</DescribeImageComponentsResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"NextToken" : "AAAAAdDWBF2****",
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"ImageComponent" : {
"ImageComponentSet" : [ {
"ComponentType" : "Build",
"Description" : "This is description.",
"ResourceGroupId" : "rg-bp67acfmxazb4p****",
"Owner" : "SELF",
"Content" : "RESTART",
"CreationTime" : "2020-11-24T06:00:00Z",
"SystemType" : "Linux",
"ImageComponentId" : "ic-bp67acfmxazb4p****",
"Name" : "testComponent"
}, {
"Tags" : {
"Tag" : [ {
"TagKey" : "TestKey",
"TagValue" : "TestValue"
} ]
}
} ]
},
"MaxResults" : 50
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidImageComponentIdSize.ExceededMaxNumber | %s | 指定的参数值有误,具体信息请参见错误信息%s占位符的实际返回结果。 |
访问错误中心查看更多错误码。