Obtaining the Details of a Component
Function
Obtain the details of a component.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
|
application_id |
Yes |
String |
Application ID. |
|
component_id |
Yes |
String |
Component ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token.
|
|
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
NOTE:
For details about how to obtain enterprise project IDs and enterprise project features, see Enterprise Management User Guide.
|
|
X-Environment-ID |
Yes |
String |
Environment ID.
|
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
api_version |
String |
API version. Fixed value: v1. |
|
kind |
String |
API type. Fixed value: Component. |
|
metadata |
MetadataResponse object |
Response data. |
|
spec |
ComponentSpec object |
Component specifications. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Component ID. |
|
name |
String |
Component name. |
|
annotations |
Map<String,String> |
Additional attributes of the component. Options:
|
|
created_at |
String |
Creation time. |
|
updated_at |
String |
Update time. |
|
Parameter |
Type |
Description |
|---|---|---|
|
runtime |
String |
Language or runtime. |
|
env_id |
String |
Environment ID. |
|
replica |
Integer |
Number of instances. |
|
source |
Source object |
Source information. |
|
build |
Build object |
Build information. |
|
resource_limit |
ResourceLimit object |
Instance specifications |
|
access_info |
Array of Access objects |
Access mode list. |
|
image_url |
String |
Image address. |
|
available_replica |
Integer |
Number of available instances. |
|
job_id |
String |
Job ID. |
|
build_id |
String |
Build job ID. |
|
status |
String |
Component status.
|
|
job_status |
String |
Last operation result of the component.
|
|
build_log_id |
String |
Build log ID. |
|
configuration_operation_id |
String |
Latest operation ID. |
|
terminated |
String |
Whether the task executed on the component is forcibly terminated. |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
Repo object |
Source code repository information. |
|
type |
String |
Definition Source type. Constraints When updating a component, the source type must match the type used during its initial creation. Range
Default Value N/A |
|
sub_type |
String |
Source subtype.
|
|
url |
String |
URL.
|
|
Parameter |
Type |
Description |
|---|---|---|
|
auth_name |
String |
Authorization name. |
|
branch |
String |
Branch. |
|
namespace |
String |
Namespace, which must be Base64-encoded. |
|
Parameter |
Type |
Description |
|---|---|---|
|
archive |
Archive object |
Place where build products are archived for management. |
|
parameters |
Map<String,String> |
Additional parameters. Options:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
artifact_namespace |
String |
SWR organization for product management. |
Example Requests
Obtain the details of a component.
GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components/{component_id}
Example Responses
Status code: 200
OK
{
"api_version" : "v1",
"kind" : "Component",
"metadata" : {
"id" : "b04980af-5f20-49ec-b499-79b5a4eb8a43",
"name" : "test",
"annotations" : {
"log_group_id" : "96fe4c34-578a-4ea8-8e77-ee59bf8a0fd1",
"log_stream_id" : "9c024ad2-5c80-45ee-8651-5f2bd89d3c7e",
"version" : "1.0.0"
},
"created_at" : "2023-03-03T03:32:10.040303Z",
"updated_at" : "2023-03-03T03:32:10.040303Z"
},
"spec" : {
"runtime" : "Docker",
"env_id" : "7eb2f920-e183-4d4e-9b9d-fffb875ae520",
"replica" : 1,
"source" : {
"type" : "image",
"url" : "nginx:stable-alpine-perl"
},
"resource_limit" : {
"cpu_limit" : "500m",
"memory_limit" : "1Gi"
},
"image_url" : "nginx:stable-alpine-perl",
"available_replica" : 1,
"job_id" : "c96c6907-5c69-4d72-bce0-03926a857b21",
"status" : "running"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot