调用DescribeAppInstanceList接口查询K8s应用实例列表。

调试

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

请求头

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

请求语法

GET /pop/v5/oam/app_instance_list HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
AppId String Query 93fdd228-*****-ed2ae98de18d

应用ID,可通过调用ListApplication接口获取。更多信息,请参见ListApplication

WithNodeInfo Boolean Query true

是否返回Pod所在的节点信息。

  • true:是
  • false:否

返回数据

名称 类型 示例值 描述
Code Integer 200

接口状态或POP错误码。

InstanceList Array of Instance

应用实例列表。

AppId String 93fdd228-*****-ed2ae98de18d

应用ID。

Canary Boolean false

是否是金丝雀发布实例。

  • true:是
  • false:否
GroupId String 93fdd228-*****-ed2ae98de18d

部署分组ID。

GroupName String _DEFAULT_GROUP

部署分组名。

NodeLabels String {"alibabacloud.com/nodepool-id":"np0*5b9377fa907","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"ecs.*","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"cn-hangzhou","failure-domain.beta.kubernetes.io/zone":"cn-hangzhou-b","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"cn-hangzhou*","kubernetes.io/os":"linux","node.kubernetes.io/instance-type":"ecs.*","topology.diskplugin.csi.alibabacloud.com/zone":"cn-hangzhou-b","topology.kubernetes.io/region":"cn-hangzhou","topology.kubernetes.io/zone":"cn-hangzhou-b"}

节点标签,内容为JSON格式字符串。

NodeName String cn-hangzhou.192.168.0.*

节点名称。

PodRaw String {"metadata":{"name":"oambuild-group-1-*4xthz","generateName":"oambuild-group-*96-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/oambuild-grou*96-4xthz","uid":"7a23399c-*fe7ff4018","resourceVersion":"969614830","creationTimestamp":"2021-04-06T11:38:46Z","labels":{"ARMSApmAppId":"*","ARMSApmLicenseKey":"*"...

Pod信息,内容为JSON格式字符串。

Version String 2021-04-06 19:37:42

节点部署的包版本。

Message String success

返回信息。

RequestId String 03FD1520-0FD6-436A-****-265318D7****

请求ID。

示例

请求示例

GET /pop/v5/oam/app_instance_list HTTP/1.1
公共请求头
{
"AppId": "93fdd228-*****-ed2ae98de18d"
}

正常返回示例

XML格式

<DescribeAppInstanceListResponse>
  <Message>success</Message>
  <RequestId>03FD1520-0FD6-436A-****-265318D7****</RequestId>
  <InstanceList>
        <GroupName>_DEFAULT_GROUP</GroupName>
        <AppId>93fdd228-*****-ed2ae98de18d</AppId>
        <NodeName>cn-hangzhou.192.168.0.*</NodeName>
        <Version>2021-04-06 19:37:42</Version>
        <Canary>false</Canary>
        <NodeLabels>{"alibabacloud.com/nodepool-id":"np0*5b9377fa907","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"ecs.*","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"cn-hangzhou","failure-domain.beta.kubernetes.io/zone":"cn-hangzhou-b","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"cn-hangzhou*","kubernetes.io/os":"linux","node.kubernetes.io/instance-type":"ecs.*","topology.diskplugin.csi.alibabacloud.com/zone":"cn-hangzhou-b","topology.kubernetes.io/region":"cn-hangzhou","topology.kubernetes.io/zone":"cn-hangzhou-b"}</NodeLabels>
        <PodRaw>{"metadata":{"name":"oambuild-group-1-*4xthz","generateName":"oambuild-group-*96-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/oambuild-grou*96-4xthz","uid":"7a23399c-*fe7ff4018","resourceVersion":"969614830","creationTimestamp":"2021-04-06T11:38:46Z","labels":{"ARMSApmAppId":"*","ARMSApmLicenseKey":"*"...</PodRaw>
        <GroupId>93fdd228-*****-ed2ae98de18d</GroupId>
  </InstanceList>
  <Code>200</Code>
</DescribeAppInstanceListResponse>

JSON格式

{
    "Message": "success",
    "RequestId": "03FD1520-0FD6-436A-****-265318D7****",
    "InstanceList": {
        "GroupName": "_DEFAULT_GROUP",
        "AppId": "93fdd228-*****-ed2ae98de18d",
        "NodeName": "cn-hangzhou.192.168.0.*",
        "Version": "2021-04-06 19:37:42",
        "Canary": false,
        "NodeLabels": "{\"alibabacloud.com/nodepool-id\":\"np0*5b9377fa907\",\"beta.kubernetes.io/arch\":\"amd64\",\"beta.kubernetes.io/instance-type\":\"ecs.*\",\"beta.kubernetes.io/os\":\"linux\",\"failure-domain.beta.kubernetes.io/region\":\"cn-hangzhou\",\"failure-domain.beta.kubernetes.io/zone\":\"cn-hangzhou-b\",\"kubernetes.io/arch\":\"amd64\",\"kubernetes.io/hostname\":\"cn-hangzhou*\",\"kubernetes.io/os\":\"linux\",\"node.kubernetes.io/instance-type\":\"ecs.*\",\"topology.diskplugin.csi.alibabacloud.com/zone\":\"cn-hangzhou-b\",\"topology.kubernetes.io/region\":\"cn-hangzhou\",\"topology.kubernetes.io/zone\":\"cn-hangzhou-b\"}",
        "PodRaw": "{\"metadata\":{\"name\":\"oambuild-group-1-*4xthz\",\"generateName\":\"oambuild-group-*96-\",\"namespace\":\"default\",\"selfLink\":\"/api/v1/namespaces/default/pods/oambuild-grou*96-4xthz\",\"uid\":\"7a23399c-*fe7ff4018\",\"resourceVersion\":\"969614830\",\"creationTimestamp\":\"2021-04-06T11:38:46Z\",\"labels\":{\"ARMSApmAppId\":\"*\",\"ARMSApmLicenseKey\":\"*\"...",
        "GroupId": "93fdd228-*****-ed2ae98de18d"
    },
    "Code": 200
}