根据实例ID获取实例详细信息
功能介绍
此API通过实例ID获取实例详细信息。
URI
GET /v2/{project_id}/cas/applications/{application_id}/components/{component_id}/instances/{instance_id}
|
参数 |
参数类型 |
必选 |
描述 |
|---|---|---|---|
|
project_id |
String |
是 |
租户项目ID |
|
application_id |
String |
是 |
应用ID |
|
component_id |
String |
是 |
组件ID |
|
instance_id |
String |
是 |
组件实例ID |
请求消息
无
响应消息
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
应用组件实例ID |
|
name |
String |
应用组件实例名称 |
|
environment_id |
String |
应用组件环境ID |
|
platform_type |
String |
运行平台类型。 应用可以在不同的平台上运行,可选用的平台的类型有以下几种:cce、vmapp |
|
description |
String |
实例描述 |
|
flavor_id |
String |
资源规格 |
|
artifacts |
Map<String, Object> |
组件部署件。key为组件component_name,对于Docker多容器场景,key为容器名称,请参考表3 |
|
version |
String |
应用组件版本号 |
|
configuration |
Map<String, Object> |
应用组件配置,如环境变量 |
|
creator |
String |
创建人 |
|
create_time |
Integer |
创建时间 |
|
update_time |
Integer |
修改时间 |
|
external_accesses |
Array of objects |
访问方式,请参考表4 |
|
refer_resources |
Array of objects |
部署资源,请参考表5 |
|
status_detail |
Object |
状态详情,请参考表6 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
storage |
String |
存储方式,支持swr和obs |
|
type |
String |
类别,虚机部署为package,容器部署为image |
|
url |
String |
软件包/镜像地址 |
|
auth |
String |
认证方式,支持iam和none,默认为iam |
|
version |
String |
版本号 |
|
properties |
Map<String,String> |
属性 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
protocol |
String |
协议 |
|
address |
String |
访问地址 |
|
forward_port |
Integer |
应用组件进程监听端口 |
|
type |
String |
类型 |
|
status |
String |
状态 |
|
create_time |
Integer |
创建时间 |
|
update_time |
Integer |
修改时间 |
示例
请求示例
无
响应示例
{
"id": "11eddb33-140b-4e51-b1e2-6ec265373ca3",
"name": "test-micro-test-env-7iafjk",
"environment_id": "61b81021-21d5-42f3-b80e-0b6bd10dbf7d",
"platform_type": "cce",
"flavor_id": "CUSTOM-10G:250m-250m:0.5Gi-0.5Gi",
"artifacts": {
"test-micro": {
"storage": "swr",
"type": "image",
"url": "swr.region_id.development.com/ns/examples:v2",
"auth": "iam",
"version": "1.0.0",
"properties": {}
}
},
"version": "1.0.2",
"description": "",
"configuration": {
"env": [
{
"name": "PAAS_PROJECT_ID",
"value": "e7d2e9c589e5445e808a8ff0d1235aca",
"internal": true
}
],
"lifecycle": {
"post-start": null,
"pre-stop": null
},
"scheduler": {
"affinity": {
"az": [],
"node": [],
"application": []
},
"anti-affinity": {
"az": [],
"node": [],
"application": []
},
"isSynchronized": true
},
"strategy": {
"upgrade": "RollingUpdate",
"spec": {
"maxSurge": 0,
"maxUnavailable": 1
}
}
},
"creator": null,
"create_time": 1610331819996,
"update_time": 1610522676792,
"external_accesses": null,
"refer_resources": [
{
"id": "523498f1-36c4-11eb-ae36-0255ac1000c2",
"type": "cce",
"parameters": {
"namespace": "default"
}
},
{
"id": "default",
"type": "cse"
}
],
"status_detail": {
"status": "RUNNING",
"replica": 1,
"available_replica": 1,
"fail_detail": null,
"last_job_id": "JOB16c33466-41e6-4c5b-a9ac-2059253a1e5c",
"last_job_status": "SUCCEEDED",
"enterprise_project_id": "0"
}
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
操作成功。 |
|
400 |
错误的请求。 |
|
404 |
请求对象不存在。 |
|
500 |
内部错误。 |
错误码
错误码格式为:SVCSTG.00100.[Error_ID],例如:SVCSTG.00100400。错误码说明请参考应用管理API错误码。