调用GetK8sApplication接口获取容器服务K8s集群或Serverless K8s集群中部署的应用信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

GET /pop/v5/changeorder/co_application HTTPS|HTTP

请求参数

名称 类型 是否必选 示例值 描述
AppId String 5a166fbd-****-4f98-a286-781659d9****

应用ID,可通过调用ListApplication接口获取,详情请参见ListApplication

From String deploy

查询来源:

  • 为空表示普通查询
  • deploy表示从部署页面进入查询

返回数据

名称 类型 示例值 描述
Applcation Struct

应用信息

App Struct

应用基础信息

AppId String 00ee517d-dd7d-4d4e-****-****

应用ID,可通过调用ListApplication接口获取,详情请参见ListApplication

ApplicationName String test

应用名称

ApplicationType String War

应用类型

BuildpackId Integer 57

应用构建类型ID

ClusterId String c37aec2a-bcca-4ec1-****-****

集群ID

Cmd String ls

启动命令

CmdArgs List -lh

命令参数

CsClusterId String c383bc813c1974e****451b50c0c8****

容器集群ID

DeployType String Image

部署类型,可选值为:Image。

EdasContainerVersion String 3.60.0

EDAS容器版本

EnvList Array

环境变量列表

Env
Name String CATALINA_OPTS

环境变量名称

Value String -Xmx 1024m -Dhsf.default.tid=false $(EDAS_CATALINA_OPTS)

环境变量值

Instances Integer 4

应用实例数

InstancesBeforeScaling Integer 10

上次伸缩前的应用实例数

TomcatVersion String 8.5.55

Apache Tomcat版本

AppId String a5281053-****-47a5-b2ab-5c0323de****

应用ID,可通过调用ListApplication接口来获取,详情请参见ListApplication

Conf Struct

配置信息

AhasEnabled Boolean true

应用是否已接入AHAS

DeployAcrossZones String true

是否将应用实例分布到多可用区:

  • true代表是
  • 其他值代表否
JarStartArgs String -lh

JAR启动参数,已废弃。

JarStartOptions String -h

JAR启动选项,已废弃。

K8sCmd String ls

启动命令

K8sCmdArgs String -lh

启动命令参数

K8sLocalvolumeInfo String [{"type":"","nodePath":"/mnt/","mountPath":"/mnt/"}]

本地存储信息

K8sNasInfo String [{"nasPath":"/mnt/","mountPath":"/mnt/"}]

NAS存储信息

K8sVolumeInfo String "{\"hostPaths\":\"[]\",\"emptyDirs\":\"[]\"}"

存储信息

Liveness String {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}

K8s容器存活状态监测信息

PostStart String {\"exec\":{\"command\":[\"ls\",\"/\"]}}"

K8s容器启动后执行信息

PreStop String {\"exec\":{\"command\":[\"ls\",\"/\"]}}"

K8s容器停止前执行信息

Readiness String {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": \[{"name": "test","value": "testvalue"}\]}}

K8s容器业务状态检查信息

RuntimeClassName String runc

容器运行时类型,仅适用于使用安全沙箱容器的集群。

DeployGroups Array

部署分组列表

DeployGroup
Components Array

组件信息

Components
ComponentId String 5

组件ID

ComponentKey String Open JDK 8

组件关键字

ImageInfo Struct

镜像信息

ImageUrl String registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282

镜像URL

RegionId String cn-beijing

镜像地域ID

RepoId String cn-hangzhou

镜像仓库ID

RepoName String 131****067006888_shared_repo

镜像仓库名称

RepoNamespace String edas-server****-user

镜像仓库命名空间

RepoOriginType String ALI_HUB

镜像仓库来源类型

Tag String 5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282

镜像Tag

Code Integer 200

接口状态或POP错误码

Message String success

附加信息

RequestId String 1053-08e4-47a5-b2ab-5c0323de7b5a

请求ID

示例

请求示例

GET /pop/v5/changeorder/co_application HTTP/1.1
公共请求头
{
  "AppId": "5a166fbd-****-4f98-a286-781659d9f54c"
}

正常返回示例

XML 格式

<Message>success</Message>
<RequestId>1053-08e4-47a5-b2ab-5c0323de7b5a</RequestId>
<Applcation>
    <App>
        <DeployType>Image</DeployType>
        <Liveness>”“</Liveness>
        <BuildpackId>57</BuildpackId>
        <K8sLocalvolumeInfo>{\"emptyDirs\":[],\"hostPaths\":[]}</K8sLocalvolumeInfo>
        <AhasEnabled>true</AhasEnabled>
        <K8sNasInfo>”“</K8sNasInfo>
        <JarStartArgs>”“</JarStartArgs>
        <K8sCmd>”“</K8sCmd>
        <RepoOriginType>ALI_HUB</RepoOriginType>
        <K8sCmdArgs>”“</K8sCmdArgs>
        <PreStop>”“</PreStop>
        <Readiness>”“</Readiness>
        <Cmd>”“</Cmd>
        <RepoNamespace>edas-server****-user</RepoNamespace>
        <RepoName>131****067006888_shared_repo</RepoName>
        <ImageUrl>registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282</ImageUrl>
        <PostStart>”“</PostStart>
        <DeployAcrossZones>true</DeployAcrossZones>
        <JarStartOptions>”“</JarStartOptions>
        <InstancesBeforeScaling>1</InstancesBeforeScaling>
        <EnvList>
            <Env>
                <Value>”“</Value>
                <Name>”“</Name>
            </Env>
        </EnvList>
        <ApplicationType>War</ApplicationType>
        <K8sVolumeInfo>”“</K8sVolumeInfo>
        <CmdArgs>”“</CmdArgs>
        <EdasContainerVersion>”“</EdasContainerVersion>
        <RuntimeClassName>""</RuntimeClassName>
        <RegionId>cn-beijing</RegionId>
        <Tag>5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282</Tag>
        <TomcatVersion>”“</TomcatVersion>
        <RepoId>”“</RepoId>
    </App>
    <AppId>a5281053-****-47a5-b2ab-5c0323de****</AppId>
    <Conf>
        <DeployType>Image</DeployType>
        <Liveness>”“</Liveness>
        <BuildpackId>57</BuildpackId>
        <K8sLocalvolumeInfo>{\"emptyDirs\":[],\"hostPaths\":[]}</K8sLocalvolumeInfo>
        <AhasEnabled>true</AhasEnabled>
        <K8sNasInfo>”“</K8sNasInfo>
        <JarStartArgs>”“</JarStartArgs>
        <K8sCmd>”“</K8sCmd>
        <RepoOriginType>ALI_HUB</RepoOriginType>
        <K8sCmdArgs>”“</K8sCmdArgs>
        <PreStop>”“</PreStop>
        <Readiness>”“</Readiness>
        <Cmd>”“</Cmd>
        <RepoNamespace>edas-server****-user</RepoNamespace>
        <RepoName>131****067006888_shared_repo</RepoName>
        <ImageUrl>registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282</ImageUrl>
        <PostStart>”“</PostStart>
        <DeployAcrossZones>true</DeployAcrossZones>
        <JarStartOptions>”“</JarStartOptions>
        <InstancesBeforeScaling>1</InstancesBeforeScaling>
        <EnvList>
            <Env>
                <Value>”“</Value>
                <Name>”“</Name>
            </Env>
        </EnvList>
        <ApplicationType>War</ApplicationType>
        <K8sVolumeInfo>”“</K8sVolumeInfo>
        <CmdArgs>”“</CmdArgs>
        <EdasContainerVersion>”“</EdasContainerVersion>
        <RuntimeClassName>""</RuntimeClassName>
        <RegionId>cn-beijing</RegionId>
        <Tag>5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282</Tag>
        <TomcatVersion>”“</TomcatVersion>
        <RepoId>”“</RepoId>
    </Conf>
    <ImageInfo>
        <DeployType>Image</DeployType>
        <Liveness>”“</Liveness>
        <BuildpackId>57</BuildpackId>
        <K8sLocalvolumeInfo>{\"emptyDirs\":[],\"hostPaths\":[]}</K8sLocalvolumeInfo>
        <AhasEnabled>true</AhasEnabled>
        <K8sNasInfo>”“</K8sNasInfo>
        <JarStartArgs>”“</JarStartArgs>
        <K8sCmd>”“</K8sCmd>
        <RepoOriginType>ALI_HUB</RepoOriginType>
        <K8sCmdArgs>”“</K8sCmdArgs>
        <PreStop>”“</PreStop>
        <Readiness>”“</Readiness>
        <Cmd>”“</Cmd>
        <RepoNamespace>edas-server****-user</RepoNamespace>
        <RepoName>131****067006888_shared_repo</RepoName>
        <ImageUrl>registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282</ImageUrl>
        <PostStart>”“</PostStart>
        <DeployAcrossZones>true</DeployAcrossZones>
        <JarStartOptions>”“</JarStartOptions>
        <InstancesBeforeScaling>1</InstancesBeforeScaling>
        <EnvList>
            <Env>
                <Value>”“</Value>
                <Name>”“</Name>
            </Env>
        </EnvList>
        <ApplicationType>War</ApplicationType>
        <K8sVolumeInfo>”“</K8sVolumeInfo>
        <CmdArgs>”“</CmdArgs>
        <EdasContainerVersion>”“</EdasContainerVersion>
        <RuntimeClassName>""</RuntimeClassName>
        <RegionId>cn-beijing</RegionId>
        <Tag>5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282</Tag>
        <TomcatVersion>”“</TomcatVersion>
        <RepoId>”“</RepoId>
    </ImageInfo>
</Applcation>
<Code>200</Code>

JSON 格式

{
    "Message": "success",
    "RequestId": "1053-08e4-47a5-b2ab-5c0323de7b5a",
    "Applcation": {
        "App": {
            "DeployType": "Image",
            "Liveness": "”“",
            "BuildpackId": 57,
            "K8sLocalvolumeInfo": "{\\\"emptyDirs\\\":[],\\\"hostPaths\\\":[]}",
            "AhasEnabled": true,
            "K8sNasInfo": "”“",
            "JarStartArgs": "”“",
            "K8sCmd": "”“",
            "RepoOriginType": "ALI_HUB",
            "K8sCmdArgs": "”“",
            "PreStop": "”“",
            "Readiness": "”“",
            "Cmd": "”“",
            "RepoNamespace": "edas-server****-user",
            "RepoName": "131****067006888_shared_repo",
            "ImageUrl": "registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282",
            "PostStart": "”“",
            "DeployAcrossZones": true,
            "JarStartOptions": "”“",
            "InstancesBeforeScaling": 1,
            "EnvList": {
                "Env": {
                    "Value": "”“",
                    "Name": "”“"
                }
            },
            "ApplicationType": "War",
            "K8sVolumeInfo": "”“",
            "CmdArgs": "”“",
            "EdasContainerVersion": "”“",
            "RuntimeClassName": "\"\"",
            "RegionId": "cn-beijing",
            "Tag": "5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282",
            "TomcatVersion": "”“",
            "RepoId": "”“"
        },
        "AppId": "a5281053-****-47a5-b2ab-5c0323de****",
        "Conf": {
            "DeployType": "Image",
            "Liveness": "”“",
            "BuildpackId": 57,
            "K8sLocalvolumeInfo": "{\\\"emptyDirs\\\":[],\\\"hostPaths\\\":[]}",
            "AhasEnabled": true,
            "K8sNasInfo": "”“",
            "JarStartArgs": "”“",
            "K8sCmd": "”“",
            "RepoOriginType": "ALI_HUB",
            "K8sCmdArgs": "”“",
            "PreStop": "”“",
            "Readiness": "”“",
            "Cmd": "”“",
            "RepoNamespace": "edas-server****-user",
            "RepoName": "131****067006888_shared_repo",
            "ImageUrl": "registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282",
            "PostStart": "”“",
            "DeployAcrossZones": true,
            "JarStartOptions": "”“",
            "InstancesBeforeScaling": 1,
            "EnvList": {
                "Env": {
                    "Value": "”“",
                    "Name": "”“"
                }
            },
            "ApplicationType": "War",
            "K8sVolumeInfo": "”“",
            "CmdArgs": "”“",
            "EdasContainerVersion": "”“",
            "RuntimeClassName": "\"\"",
            "RegionId": "cn-beijing",
            "Tag": "5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282",
            "TomcatVersion": "”“",
            "RepoId": "”“"
        },
        "ImageInfo": {
            "DeployType": "Image",
            "Liveness": "”“",
            "BuildpackId": 57,
            "K8sLocalvolumeInfo": "{\\\"emptyDirs\\\":[],\\\"hostPaths\\\":[]}",
            "AhasEnabled": true,
            "K8sNasInfo": "”“",
            "JarStartArgs": "”“",
            "K8sCmd": "”“",
            "RepoOriginType": "ALI_HUB",
            "K8sCmdArgs": "”“",
            "PreStop": "”“",
            "Readiness": "”“",
            "Cmd": "”“",
            "RepoNamespace": "edas-server****-user",
            "RepoName": "131****067006888_shared_repo",
            "ImageUrl": "registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282",
            "PostStart": "”“",
            "DeployAcrossZones": true,
            "JarStartOptions": "”“",
            "InstancesBeforeScaling": 1,
            "EnvList": {
                "Env": {
                    "Value": "”“",
                    "Name": "”“"
                }
            },
            "ApplicationType": "War",
            "K8sVolumeInfo": "”“",
            "CmdArgs": "”“",
            "EdasContainerVersion": "”“",
            "RuntimeClassName": "\"\"",
            "RegionId": "cn-beijing",
            "Tag": "5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282",
            "TomcatVersion": "”“",
            "RepoId": "”“"
        }
    },
    "Code": 200
}

错误码

访问错误中心查看更多错误码。