Queries the details of one or more image components.
Description
You can use NextToken
to configure the query token. Set the value to the NextToken
value that is returned in the last call to the DescribeImageComponents operation.
Then, use MaxResults
to specify the maximum number of entries to return on each page.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeImageComponents |
The operation that you want to perform. Set the value to DescribeImageComponents. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the image component. You can call the DescribeRegions operation to query the most recent region list. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** |
The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response. Note Resources in the default resource group are displayed in the response regardless of
how this parameter is set.
|
Tag.N.Key | String | No | TestKey |
The key of tag N of the image component. Valid values of N: 1 to 20. |
Tag.N.Value | String | No | TestValue |
The value of tag N of the image component. Valid values of N: 1 to 20. |
Name | String | No | testComponent |
The name of the image component. You must specify an exact name to search for the image component. |
NextToken | String | No | AAAAAdDWBF2**** |
The query token. Set the value to the |
MaxResults | Integer | No | 50 |
The maximum number of entries to return on each page. Valid values: 1 to 500. Default value: 50. |
Owner | String | No | SELF |
The type of the image component. Valid values:
|
ImageComponentId.N | String | No | ic-bp67acfmxazb4p**** |
The ID of image component N. Valid values of N: 1 to 20. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NextToken | String | AAAAAdDWBF2**** |
The query token returned in this call. For information about how to use this return value, see the "Description" section in this topic. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
TotalCount | Integer | 1 |
The total number of image components returned. |
MaxResults | Integer | 50 |
The maximum number of entries returned per page. |
ImageComponent | Array of ImageComponentSet |
Details about the image components. |
|
ImageComponentSet | |||
CreationTime | String | 2020-11-24T06:00:00Z |
The time when the image component was created. |
Description | String | This is description. |
The description of the image component. |
SystemType | String | Linux |
The operating system type supported by the image component. |
ImageComponentId | String | ic-bp67acfmxazb4p**** |
The ID of the image component. |
ComponentType | String | Build |
The type of the image component. |
ResourceGroupId | String | rg-bp67acfmxazb4p**** |
The ID of the resource group. |
Name | String | testComponent |
The name of the image component. |
Content | String | RESTART |
The content of the image component. |
Owner | String | SELF |
The type of the image component. Valid values:
|
Tags | Array of Tag |
The tags of the image component. |
|
Tag | |||
TagValue | String | TestValue |
The tag value of the image component. |
TagKey | String | TestKey |
The tag key of the image component. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeImageComponents
&RegionId=cn-hangzhou
&ImageComponentId.1=ic-bp67acfmxazb4p****
&<Common request parameters>
Sample success responses
XML
format
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
format
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
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidImageComponentIdSize.ExceededMaxNumber | %s | The error message returned because a specified parameter is invalid. For more information, see the return value of the %s placeholder in the error message. |
For a list of error codes, visit the Error Center.