You can call this operation to query the details of one or more image components.

Description

By default, the details of custom image components that you created are queried.

You can configure the query token by using the NextToken parameter. Set the value of NextToken to the NextToken value that was returned when you last called the DescribeImageComponents operation. Then, use the MaxResults parameter to configure the maximum number of entries to return on each page to query the details of the image components.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.

Tag.N.Key String No TestKey

The key of tag N. Valid values of N: 1 to 20.

Tag.N.Value String No TestValue

The value of tag N. Valid values of N: 1 to 20.

ResourceGroupId String No rg-bp67acfmxazb4p****

The ID of the resource group.

Name String No testComponent

The name of image component. You must specify an exact name to search for the image component.

ImageComponentId.N RepeatList No ic-bp67acfmxazb4p****

The ID of image component N. Valid values of N: 1 to 20.

NextToken String No AAAAAdDWBF2****

The query token. Set the value to the NextToken value that was returned when you last called the DescribeImageComponents operation. Leave this parameter empty when you call this operation for the first time.

MaxResults Integer No 50

The maximum number of entries to return on each page. Valid values: 1 to 500.

Default value: 50.

Response parameters

Parameter Type Example Description
ImageComponent Array of ImageComponentSet

Details of the image component.

ImageComponentSet
ComponentType String Build

The type of the image component.

Content String RUN yum update -y

The content of the image component.

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.

ImageComponentId String ic-bp67acfmxazb4p****

The ID of the image component.

Name String testComponent

The name of the image component.

ResourceGroupId String rg-bp67acfmxazb4p****

The ID of the resource group.

SystemType String Linux

The operating system type supported by the image component.

Tags Array of Tag

The list of tag key-value pairs.

Tag
TagKey String TestKey

The key of the tag.

TagValue String TestValue

The value of the tag.

MaxResults Integer 50

The maximum number of entries returned per page.

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 returned image components.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeImageComponents
&RegionId=cn-hangzhou
&ImageComponentId.1=ic-bp67acfmxazb4p****
&<Common request parameters>

Sample success responses

XML format

<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>
                  <Content>RUN yum update -y</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

{
    "TotalCount": "1", 
    "NextToken": "AAAAAdDWBF2****", 
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E", 
    "ImageComponent": {
        "ImageComponentSet": [
            {
                "ComponentType": "Build", 
                "Description": "This is description.", 
                "ResourceGroupId": "rg-bp67acfmxazb4p****", 
                "Content": "RUN yum update -y", 
                "CreationTime": "2020-11-24T06:00:00Z", 
                "SystemType": "Linux", 
                "ImageComponentId": "ic-bp67acfmxazb4p****", 
                "Name": "testComponent"
            }, 
            {
                "Tags": {
                    "Tag": [
                        {
                            "TagKey": "TestKey", 
                            "TagValue": "TestValue"
                        }
                    ]
                }
            }
        ]
    }, 
    "MaxResults": "50"
}

Error codes

For a list of error codes, visit the API Error Center.