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