All Products
Search
Document Center

Elastic Compute Service:DescribeImageComponents

最終更新日:Dec 26, 2024

Queries the information about one or more image components.

Operation description

You can use NextToken to configure the query token. Set the value to the NextToken value that is returned in the previous call to the DescribeImageComponents operation. Then, use MaxResults to specify the maximum number of entries to return on each page.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeImageComponentsget
*ImageComponent
acs:ecs:{#regionId}:{#accountId}:imagecomponent/*
*ImageComponent
acs:ecs:{#regionId}:{#accountId}:imagecomponent/{#imagecomponentId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the image component. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceGroupIdstringNo

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.
rg-bp67acfmxazb4p****
Tagarray<object>No

The tags of the image component.

objectNo
KeystringNo

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

TestKey
ValuestringNo

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

TestValue
NamestringNo

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

testComponent
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

AAAAAdDWBF2****
MaxResultsintegerNo

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

Default value: 50.

50
OwnerstringNo

The type of the image component. Valid values:

  • SELF: the custom component that you created.
  • ALIYUN: the system component provided by Alibaba Cloud.
SELF
ImageComponentIdarrayNo

The IDs of image components. Valid values of N: 1 to 20.

stringNo

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

ic-bp67acfmxazb4p****
ComponentTypestringNo

The type of the image component.

Valid values:

  • Build
  • Test
null
SystemTypestringNo

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

Valid values:

  • Linux
  • Windows
null
ComponentVersionstringNo

The version number of the image component in the <major>.<minor>.<patch> format. You can set <major>, <minor>, and <patch> to non-negative integers, or set one of <major>, <minor>, and <patch> to the wildcard (*) and the other two to non-negative integers.

Note This parameter takes effect only if you specify Name.
null

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. For information about how to use the returned value, see the "Usage notes" section of this topic.

AAAAAdDWBF2****
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TotalCountinteger

The total number of image components returned.

1
MaxResultsinteger

The number of entries per page.

50
ImageComponentarray<object>

The information about the image components.

ImageComponentSetobject
CreationTimestring

The time when the image component was created.

2020-11-24T06:00:00Z
Descriptionstring

The description of the image component.

This is description.
SystemTypestring

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

Linux
ImageComponentIdstring

The ID of the image component.

ic-bp67acfmxazb4p****
ComponentTypestring

The type of the image component.

Build
ResourceGroupIdstring

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

rg-bp67acfmxazb4p****
Namestring

The name of the image component.

testComponent
Contentstring

The content of the image component.

RESTART
Ownerstring

The type of the image component. Valid values:

  • SELF: the custom component that you created.
  • ALIYUN: the system component provided by Alibaba Cloud.
SELF
Tagsarray<object>

The tags of the image component.

Tagobject
TagValuestring

The value of the tag.

TestValue
TagKeystring

The key of the tag.

TestKey
ComponentVersionstring

The version number of the image component.

null
Parametersarray<object>

The parameters contained in the image component.

Parameterobject
Namestring

The name of the parameter.

null
Typestring

The type of the parameter.

Valid values:

  • String
  • Number
  • Boolean
null
DefaultValuestring

The default value of the parameter.

null

Examples

Sample success responses

JSONformat

{
  "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": "RESTART",
        "Owner": "SELF",
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "ComponentVersion": "null",
        "Parameters": {
          "Parameter": [
            {
              "Name": "null",
              "Type": "null",
              "DefaultValue": "null"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.OwnerThe specified parameter \"Owner\" is not valid.-
400InvalidImageComponentIdSize.ExceededMaxNumber%s-
400InvalidSystemType.NotSupportedValue%s.The specified SystemType is invalid.
400InvalidComponentType.NotSupportedValue%s.The specified ComponentType is invalid.
400InvalidParameter.ComponentVersionThe specified ComponentVersion is invalid.The specified ComponentVersion is invalid.
403Invalid.NextTokenThe specified NextToken is not valid.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-17API Description Update. The Error code has changedView Change Details
2024-10-10The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-08-08The Error code has changedView Change Details