Queries the version of the component that is required when you create and deploy an application.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request parameters and common response parameters.
Request syntax
GET /pop/v1/sam/resource/components HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
AppId | String | Query | No | d700e680-aa4d-4ec1-afc2-6566b5ff**** | The ID of the application. |
Type | String | Query | Yes | TOMCAT | The component type. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** | The ID of the request. |
Message | String | success | The returned message. |
TraceId | String | 0a98a02315955564772843261e**** | The ID of the trace. It is used to query the details of a request. |
Data | Array of Data | The details of the component. |
|
Type | String | JDK | The component type. |
ComponentKey | String | Open JDK 8 | The ID of the component. |
ComponentDescription | String | Open JDK 8 | The description of the component. |
Expired | Boolean | false | Indicates whether the component is expired. Valid values:
|
ErrorCode | String | This parameter is left empty. | The error code.
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the component version was obtained. Valid values:
|
Examples
Sample requests
GET /pop/v1/sam/resource/components?AppId=d700e680-aa4d-4ec1-afc2-6566b5ff****&Type=TOMCAT HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeComponentsResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<Type>JDK</Type>
<ComponentKey>Open JDK 8</ComponentKey>
<ComponentDescription>Open JDK 8</ComponentDescription>
<Expired>false</Expired>
</Data>
<Code>200</Code>
<Success>true</Success>
</DescribeComponentsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : [ {
"Type" : "JDK",
"ComponentKey" : "Open JDK 8",
"ComponentDescription" : "Open JDK 8",
"Expired" : false
} ],
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidComponentType.NotFound | The specified Type does not exist. | The error message returned because the specified component type is invalid. |
For a list of error codes, visit the API Error Center.