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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeImageComponents |
get |
*ImageComponent
*ImageComponent
|
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 |
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 |
| 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 |
| SystemType |
string |
No |
The operating system supported by the component. Valid values:
|
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 |
| 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 |
| 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.