更新时间:2022-10-08 GMT+08:00
分享

查询应用部署详情

功能介绍

该API用于查询应用部署详情。

URI

GET /v2/{project_id}/edgemgr/deployments/{deployment_id}

表1 Path参数

名称

是否必选

说明

project_id

项目ID,获取方法请参见获取项目ID

deployment_id

应用部署id

请求消息

表2 请求Header参数

参数

是否必选

类型

描述

Content-Type

String

消息体的类型(格式)

推荐您使用默认值application/json。

X-Auth-Token

String

用户Token

调用接口的认证方式分为Token和AK/SK两种,如果您使用Token方式,此参数为必填,请填写Token的值,获取方式请参见Token认证

响应消息

响应参数

表3 响应Body参数

名称

参数类型

说明

deployment

表18 object

部署详细信息

响应示例

{
    "deployment": {
        "description": "a@aaa",
        "created_at": "2018-07-20T15:18:42",
        "updated_at": null,
        "instances": [
            {
                "name": "test17",
                "envs": [],
                "state": "PENDING_CREATE",
                "version": "",
                "image_url": "camerachecker:1.5.31",
                "resources": {
                    "requests": {
                        "gpu": 2,
                        "cpu": 3,
                        "memory": 2
                    },
                    "limits": {
                        "gpu": 2,
                        "cpu": 3,
                        "memory": 2
                    }
                },
                "volumes": [
                    {
                        "read_only": true,
                        "source": "/tmp",
                        "destination": "/tmp0",
                        "type": "hostPath",
                        "name": "test"
                    },
                    {
                        "read_only": true,
                        "source": "/tmp",
                        "destination": "/tmp2",
                        "type": "hostPath",
                        "name": "test1"
                    }
                ],
                "reason": "CrashLoopBackOff ",
                "message": null,
                "configs": {
                    "host_network": true,
                    "restart_policy": "Always",
                    "privileged": false
                },
                "is_ready": "NORMAL",
                "restarts": 0,
                "node_id": "2fac08a3-f1b0-4326-a1e9-77f0f4f6df43",
                "liveness_probe": {
                    "http_get": {
                        "path": "/v1",
                        "port": 8080,
                        "host": "",
                        "scheme": "HTTP"
                    },
                    "initial_delay_seconds": 5,
                    "timeout_seconds": 5
                },
                "readiness_probe": {
                    "http_get": {
                        "path": "/v1",
                        "port": 9090,
                        "host": "",
                        "scheme": "HTTP"
                    },
                    "initial_delay_seconds": 5,
                    "timeout_seconds": 5
                }
            }
        ],
        "project_id": "d16e6eb6cc0d49a0941df2f31285757a",
        "id": "12529bc1-7146-43cc-a24f-9199743d7dc6",
        "name": "test6"
    }
}

错误码

请参见错误码

相关文档