DescribeImageComponents

更新时间:
复制 MD 格式

Queries the details of one or more image components.

Operation description

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

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 1000.

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

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

cn-hangzhou

ResourceGroupId

string

No

资源组 ID。使用该参数过滤资源时,资源数量不能超过 1000 个。

Note

不支持默认资源组过滤。

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 in 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 format of major.minor.patch. All values are non-negative integers. You can also use the wildcard character (*) to replace one of the values 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 it, 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 image component was created.

2020-11-24T06:00:00Z

Description

string

The description of the image component.

This is description.

SystemType

string

The type of the operating system supported by the image component.

Linux

ImageComponentId

string

The ID of the image component.

ic-bp67acfmxazb4p****

ComponentType

string

The type of the image component.

Build

ResourceGroupId

string

The ID of the resource group to which the image component belongs.

rg-bp67acfmxazb4p****

Name

string

The name of the image component.

testComponent

Content

string

The content of the image component.

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

Owner

string

The type of the image component. Valid values:

  • SELF: the custom component that you created.

  • ALIYUN: the system component provided by Alibaba Cloud.

SELF

Tags

object

Tag

array<object>

The tags of the image component.

object

TagValue

string

The value of the tag.

TestValue

TagKey

string

The key of the tag.

TestKey

ComponentVersion

string

The version number of the image component.

1.0.0

Parameters

object

Parameter

array<object>

The parameters contained in the image component.

object

Name

string

The name of the parameter.

paramName

Type

string

The type of the parameter.

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.