All Products
Search
Document Center

Elastic Compute Service:DescribeImageComponents

Last Updated:Jun 26, 2026

Queries the details of one or more image components.

Operation description

You can set NextToken to the value of NextToken returned by the previous call to DescribeImageComponents, and set MaxResults to specify the maximum number of entries per page.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeImageComponents

get

*ImageComponent

acs:ecs:{#regionId}:{#accountId}:imagecomponent/*

*ImageComponent

acs:ecs:{#regionId}:{#accountId}:imagecomponent/{#imagecomponentId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call DescribeRegions to query the most recent region list.

cn-hangzhou

ResourceGroupId

string

No

The resource group ID. If you use this parameter to filter resources, the resource count cannot exceed 1,000.

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

Tag

array<object>

No

The tags.

object

No

Key

string

No

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

TestKey

Value

string

No

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

TestValue

RegionId

string

Yes

The region ID. You can call DescribeRegions to query the most recent region list.

cn-hangzhou

ResourceGroupId

string

No

The resource group ID. If you use this parameter to filter resources, the resource count cannot exceed 1,000.

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

Name

string

No

The image component name. Only exact match is supported.

testComponent

NextToken

string

No

The pagination token. Set this parameter to the value of NextToken returned by the previous call. You do not need to set this parameter for the first request.

AAAAAdDWBF2****

MaxResults

integer

No

The maximum number of entries per page for paging. Valid values: 1 to 500.

Default value: 50.

50

Owner

string

No

The image component type. Valid values:

  • SELF: custom image components that you created.

  • ALIYUN: system components provided by Alibaba Cloud.

SELF

ImageComponentId

array

No

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

ic-bp67acfmxazb4p****

string

No

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

ic-bp67acfmxazb4p****

ComponentType

string

No

The component type.

Valid values:

  • Build

  • Test.

Build

SystemType

string

No

The operating system supported by the component.

Valid values:

  • Linux

  • Windows.

Linux

ComponentVersion

string

No

The component version number in the major.minor.patch format. Each part must be a non-negative integer. You can also use the wildcard character (*) to replace one part for fuzzy matching.

Note

This parameter takes effect only when Name is specified.

1.0.*

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token returned in this call. For more information about how to use this token, refer to the operation description.

AAAAAdDWBF2****

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of image components returned.

1

MaxResults

integer

The maximum number of entries per page for paging.

50

ImageComponent

object

ImageComponentSet

array<object>

The list of image component details.

array<object>

CreationTime

string

The time when the component was created.

2020-11-24T06:00:00Z

Description

string

The description.

This is description.

SystemType

string

The operating system supported by the component.

Linux

ImageComponentId

string

The image component ID.

ic-bp67acfmxazb4p****

ComponentType

string

The component type.

Build

ResourceGroupId

string

The resource group ID.

rg-bp67acfmxazb4p****

Name

string

The component name.

testComponent

Content

string

The component content.

Tasks: - Name: HelloWorld Action: RunShellCommand Properties: commandContent: echo hello world

Owner

string

The image component type. Valid values:

  • SELF: custom image components that you created.

  • ALIYUN: system components provided by Alibaba Cloud.

SELF

Tags

object

Tag

array<object>

The list of tag key-value pairs.

object

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

ComponentVersion

string

The component version number.

1.0.0

Parameters

object

Parameter

array<object>

The list of parameters included in the image component.

object

Name

string

The parameter name.

paramName

Type

string

The parameter type.

Valid values:

  • String

  • Number

  • Boolean.

String

DefaultValue

string

The default value of the parameter.

paramDefaultValue

Examples

Success response

JSON format

{
  "NextToken": "AAAAAdDWBF2****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 1,
  "MaxResults": 50,
  "ImageComponent": {
    "ImageComponentSet": [
      {
        "CreationTime": "2020-11-24T06:00:00Z",
        "Description": "This is description.",
        "SystemType": "Linux",
        "ImageComponentId": "ic-bp67acfmxazb4p****",
        "ComponentType": "Build",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "Name": "testComponent",
        "Content": "Tasks:\n  - Name: HelloWorld\n    Action: RunShellCommand\n    Properties:\n      commandContent: echo hello world\n",
        "Owner": "SELF",
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "ComponentVersion": "1.0.0",
        "Parameters": {
          "Parameter": [
            {
              "Name": "paramName",
              "Type": "String",
              "DefaultValue": "paramDefaultValue"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.Owner The specified parameter \"Owner\" is not valid.
400 InvalidImageComponentIdSize.ExceededMaxNumber %s
400 InvalidSystemType.NotSupportedValue %s. The specified SystemType is invalid.
400 InvalidComponentType.NotSupportedValue %s. The specified ComponentType is invalid.
400 InvalidParameter.ComponentVersion The specified ComponentVersion is invalid. The specified ComponentVersion is invalid.
403 Invalid.NextToken The specified NextToken is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.