Querying Instance Details Based on the Instance ID
Function
This API is used to query instance details based on the instance ID.
URI
GET /v2/{project_id}/cas/applications/{application_id}/components/{component_id}/instances/{instance_id}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Tenant's project ID. |
| application_id | String | Yes | Application ID. |
| component_id | String | Yes | Component ID. |
| instance_id | String | Yes | Component instance ID. |
Request Parameters
Request parameters
None
Response Parameters
Response parameters
| Parameter | Type | Description |
|---|---|---|
| id | String | Component instance ID. |
| name | String | Component instance name. |
| environment_id | String | Component environment ID. |
| platform_type | String | Platform type. Value: cce or vmapp. |
| description | String | Instance description. |
| flavor_id | String | Resource flavor. |
| artifacts | Map<String, Object> | Artifact. key indicates the component name. In the Docker container scenario, key indicates the container name. See Table 3. |
| version | String | Component version. |
| configuration | Map<String, Object> | Component configurations, such as environment variables. |
| creator | String | Creator. |
| create_time | Integer | Creation time. |
| update_time | Integer | Update time. |
| external_accesses | Array of objects | Access mode. See Table 4. |
| refer_resources | Array of objects | Deployed resources. See Table 5. |
| status_detail | Object | Status details. See Table 6. |
| Parameter | Type | Description |
|---|---|---|
| storage | String | Storage mode. Value: swr or obs. |
| type | String | Type. Value: package (VM deployment) or image (container deployment). |
| url | String | Software package or image address. |
| auth | String | Authentication mode. Value: iam or none. Default value: iam. |
| version | String | Version number. |
| properties | Map<String,String> | Property information. |
| Parameter | Type | Description |
|---|---|---|
| id | String | ID |
| protocol | String | Protocol. |
| address | String | Access address. |
| forward_port | Integer | Port for listening to an application component process. |
| type | String | Type. |
| status | String | Status. |
| create_time | Integer | Creation time. |
| update_time | Integer | Update time. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| id | String | Yes | Resource ID. |
| type | String | Yes | Basic resources: Cloud Container Engine (CCE), Cloud Container Instance (CCI), Elastic Cloud Server (ECS), and Auto Scaling (AS). Optional resources: Relational Database Service (RDS), Distributed Cache Service (DCS), Elastic Load Balance (ELB), and other services. |
| refer_alias | String | No | Application alias, which is provided only in DCS scenario. Value: "distributed_session", "distributed_cache", "distributed_session, distributed_cache". Default value: "distributed_session, distributed_cache". |
| parameters | Map<String,String> | No | Reference resource parameter. |
| Parameter | Type | Description |
|---|---|---|
| enterprise_project_id | String | Enterprise project ID. |
| status | String | Instance status. |
| available_replica | Integer | Number of normal instance replicas. |
| replica | Integer | Number of instance replicas. |
| fail_detail | String | Failure description. |
| last_job_id | String | Latest job ID. |
Example
Example request
None
Example response
{
"id": "string",
"name": "string",
"environment_id": "string",
"platform_type": "cce",
"description": "null",
"flavor_id": "MICRO-5G:0.5C:1G",
"artifacts": {
"container-name": {
"storage": "swr",
"type": "image",
"url": "{IP}:20202/xxxxxxxx/junit-platformstest:1.0",
"auth": "iam"
}
},
"version": "string",
"configuration": {},
"creator": "string",
"create_time": 0,
"update_time": 0,
"external_accesses": [
{
"id": "xxx",
"protocol": "HTTP",
"address": "string",
"forward_port": 80,
"type": "AUTO_GENERATED",
"status": "NORMAL",
"create_time": 1571626146765,
"update_time": 1571626146765
}
],
"refer_resources": [
{
"id": "b6862a62-d916-11e9-bdf1-0255ac101fd9",
"type": "cce",
"refer_alias": null,
"parameters": {
"namespace": "default"
}
},
{
"id": "ecbde1d8-dd03-11e9-8073-fa163e511d78",
"type": "pvc",
"refer_alias": null,
"parameters": {
"name": "cas-e063c731-f304-4c69-908c-a9c656c5d0dc-mbaas-sfs",
"class": "nfs-rw",
"type": "sfs",
"capacity": 10
}
},
{
"id": "b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8",
"type": "vpc",
"refer_alias": null,
"parameters": {
"subnet": {
"id": "daac28df-4bb2-435d-af7c-81f0eddc3ab7",
"name": "subnet-9002"
}
}
}
],
"status_detail": {
"enterprise_project_id": "0",
"status": "RUNNING",
"available_replica": 1,
"replica": 1,
"fail_detail": "cluster_deleted",
"last_job_id": "xxx"
}
} Status Code
| HTTP Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.
Last Article: Deleting an Application Component Instance
Next Article: Obtaining Component Instance Snapshots
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.