获取容器服务K8s集群或Serverless K8s集群中部署的应用信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
edas:ReadApplication |
get |
*Application
|
无 | 无 |
请求语法
GET /pop/v5/changeorder/co_application HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AppId |
string |
是 |
应用 ID,可通过调用 ListApplication 接口获取,详情请参见 ListApplication 。 |
5a166fbd-****-4f98-a286-781659d9**** |
| From |
string |
否 |
查询来源:
|
deploy |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
接口响应。 |
||
| Code |
integer |
接口状态或 POP 错误码。 |
200 |
| Message |
string |
附加信息。 |
success |
| RequestId |
string |
请求 ID。 |
1053-08e4-47a5-b2ab-5c0323de7b5a |
| Applcation |
object |
应用信息。 |
|
| AppId |
string |
应用 ID,可通过调用 ListApplication 接口来获取,详情请参见 ListApplication 。 |
a5281053-****-47a5-b2ab-5c0323de**** |
| DeployGroups |
object |
||
| DeployGroup |
array<object> |
部署分组列表。 |
|
|
array<object> |
部署分组对象。 |
||
| Components |
object |
||
| Components |
array<object> |
组件信息。 |
|
|
object |
组件对象。 |
||
| Type |
string |
组件类型。 |
JDK |
| ComponentKey |
string |
组件关键字。 |
Open JDK 8 |
| ComponentId |
string |
组件 ID。 |
5 |
| Env |
string |
环境变量,相对于 EnvList 字段,本字段透出对 ConfigMap/Secret 引用的相关配置信息。 |
"["{\"name\":\"test1\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"edas-demo-configmap\",\"key\":\"key1\"}}}","{\"name\":\"k2\",\"value\":\"v2\"}","{\"name\":\"s1\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"edas-demo-secret\",\"key\":\"k1\"}}}"]" |
| EnvFrom |
string |
环境变量来源。 |
[{"configMapRef":{"name":"test-cm"}}] |
| ImageInfo |
object |
镜像信息。 |
|
| RepoId |
string |
镜像仓库 ID。 |
cn-hangzhou |
| ImageUrl |
string |
镜像 URL。 |
registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282 |
| RepoOriginType |
string |
镜像仓库来源类型。 |
ALI_HUB |
| Tag |
string |
镜像 Tag。 |
5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282 |
| RepoName |
string |
镜像仓库名称。 |
131****067006888_shared_repo |
| RepoNamespace |
string |
镜像仓库命名空间。 |
edas-server****-user |
| RegionId |
string |
镜像地域 ID。 |
cn-beijing |
| App |
object |
应用基础信息。 |
|
| RequestMem |
integer |
内存资源预留,单位 MiB。 |
1024 |
| InstancesBeforeScaling |
integer |
上次伸缩前的应用实例数。 |
10 |
| DeployType |
string |
部署类型,可选值为:Image。 |
Image |
| ApplicationName |
string |
应用名称。 |
test |
| ApplicationType |
string |
应用类型。 |
War |
| Instances |
integer |
应用实例数。 |
4 |
| LimitMem |
integer |
内存资源限制,单位 MiB。 |
1024 |
| Cmd |
string |
启动命令。 |
ls |
| RegionId |
string |
地域 ID。 |
cn-hangzhou |
| BuildpackId |
integer |
应用构建类型 ID。 |
57 |
| TomcatVersion |
string |
Apache Tomcat 版本。 |
8.5.55 |
| CsClusterId |
string |
容器集群 ID。 |
c383bc813c1974e****451b50c0c8**** |
| RequestCpuM |
integer |
CPU 资源请求,单位为毫核,1000 为 1 核 CPU。 |
1000 |
| AppId |
string |
应用 ID,可通过调用 ListApplication 接口获取,详情请参见 ListApplication 。 |
00ee517d-dd7d-4d4e-****-**** |
| K8sNamespace |
string |
K8s 命名空间。 |
default |
| EdasContainerVersion |
string |
EDAS 容器版本。 |
3.60.0 |
| LimitCpuM |
integer |
CPU 资源限制,单位为毫核,1000 为 1 核 CPU。 |
1000 |
| ClusterId |
string |
集群 ID。 |
c37aec2a-bcca-4ec1-****-**** |
| EnvList |
object |
||
| Env |
array<object> |
环境变量列表。 |
|
|
object |
环境变量对象。 |
||
| Name |
string |
环境变量名称。 |
CATALINA_OPTS |
| Value |
string |
环境变量值。 |
-Xmx 1024m -Dhsf.default.tid=false $(EDAS_CATALINA_OPTS) |
| CmdArgs |
object |
||
| CmdArg |
array |
命令列表。 |
|
|
string |
命令参数。 |
-lh |
|
| DevelopType |
string |
应用类型:
|
General |
| SlbInfo |
string |
SLB 配置信息。 |
[ { "addressType": "intranet", "externalTrafficPolicy": "Local", "ip": "192.168.254.***", "name": "intranet-testapp", "portMappings": [ { "loadBalancerProtocol": "TCP", "servicePort": { "port": 8080, "protocol": "TCP", "targetPort": 18081, "vServerGroupName": "k8s/31414/intranet-testapp/default/cc90e0c9508a44667bdae2e83d3******" } } ], "scheduler": "rr", "serviceType": "LoadBalancer", "slbId": "lb-bp1ikoh3nrpgqsm******", "source": "create", "specification": "slb.s3.large" } ] |
| Annotations |
string |
应用 Pod 注解。 |
{"test-annokey":"test-annovalue"} |
| Labels |
string |
应用 Pod 标签。 |
{"test-labelkey":"test-labelvalue"} |
| LimitEphemeralStorage |
string |
临时存储资源需求上限,单位:GB。设置 0 表示不限制。 |
4 |
| RequestEphemeralStorage |
string |
临时存储资源需求预留,单位:GB。设置 0 表示不限制。 |
2 |
| EnableEmptyPushReject |
boolean |
应用是否开启了推空保护。 |
true |
| EnableLosslessRule |
boolean |
应用是否开启了无损上线。 |
true |
| LosslessRuleAligned |
boolean |
应用是否启用了无损滚动发布模式配置通过就绪检查前完成服务注册。 |
true |
| LosslessRuleDelayTime |
integer |
应用配置的服务延迟注册时长,单位:秒。 |
120 |
| LosslessRuleFuncType |
integer |
应用设置的服务预热曲线。 |
2 |
| LosslessRuleRelated |
boolean |
应用是否启用了无损滚动发布模式配置通过就绪检查前完成服务预热。 |
true |
| LosslessRuleWarmupTime |
integer |
应用设置的服务预热时长,单位:秒。 |
120 |
| FeatureAnnotations |
string |
当前应用的高级配置标签,展示启用了哪些特性功能。可能的枚举值如下:
|
base.combination.edas |
| WorkloadType |
string |
创建应用时 Workload 的类型,目前支持 Deployment 和 StatefulSet 类型。留空时默认 Deployment。 |
Deployment |
| SecurityContext |
string |
应用 Pod 容器 SecurityContext 属性。 |
{\"runAsUser\":0,\"runAsGroup\":0} |
| Conf |
object |
配置信息。 |
|
| PostStart |
string |
K8s 容器启动后执行信息。 |
{\"exec\":{\"command\":[\"ls\",\"/\"]}}" |
| Readiness |
string |
K8s 容器业务状态检查信息。 |
{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": \[{"name": "test","value": "testvalue"}\]}} |
| AhasEnabled |
boolean |
应用是否已接入 AHAS。 |
true |
| K8sCmdArgs |
string |
启动命令参数。 |
-lh |
| Liveness |
string |
K8s 容器存活状态监测信息。 |
{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}} |
| DeployAcrossNodes |
string |
是否将应用实例分布到多节点:
|
true |
| K8sCmd |
string |
启动命令。 |
ls |
| PreStop |
string |
K8s 容器停止前执行信息。 |
{\"exec\":{\"command\":[\"ls\",\"/\"]}}" |
| DeployAcrossZones |
string |
是否将应用实例分布到多可用区:
|
true |
| JarStartArgs |
string |
JAR 启动参数,已废弃。 |
-lh |
| K8sNasInfo |
string |
NAS 存储信息。 |
[{"nasPath":"/mnt/","mountPath":"/mnt/"}] |
| JarStartOptions |
string |
JAR 启动选项,已废弃。 |
-h |
| RuntimeClassName |
string |
容器运行时类型,仅适用于使用安全沙箱容器的集群。 |
runc |
| K8sLocalvolumeInfo |
string |
本地存储信息。 |
[{"type":"","nodePath":"/mnt/","mountPath":"/mnt/"}] |
| K8sVolumeInfo |
string |
存储信息。 |
"{\"hostPaths\":\"[]\",\"emptyDirs\":\"[]\"}" |
| Affinity |
string |
Pod 亲和性配置。 |
"{\"nodeAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"beta.kubernetes.io/arch\",\"operator\":\"NotIn\",\"values\":[\"arm64\",\"arm32\"]}]}]},\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"weight\":5,\"preference\":{\"matchExpressions\":[{\"key\":\"kubernetes.io/os\",\"operator\":\"In\",\"values\":[\"linux\"]}]}}]},\"podAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":[{\"labelSelector\":{\"matchExpressions\":[{\"key\":\"edas.oam.acname\",\"operator\":\"NotIn\",\"values\":[\"edas-test-app\"]}]},\"namespaces\":[\"default\"],\"topologyKey\":\"kubernetes.io/hostname\"}]},\"podAntiAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"weight\":15,\"podAffinityTerm\":{\"labelSelector\":{\"matchExpressions\":[{\"key\":\"edas.oam.acname\",\"operator\":\"In\",\"values\":[\"edas-test-app-2\"]}]},\"namespaces\":[\"default\"],\"topologyKey\":\"failure-domain.beta.kubernetes.io/zone\"}}]}}" |
| Tolerations |
string |
Pod 调度容忍配置。 |
"[{\"key\":\"edas-taint-key2\",\"operator\":\"Exists\",\"effect\":\"NoExecute\",\"tolerationSeconds\":50},{\"key\":\"edas-taint-key\",\"operator\":\"Equal\",\"value\":\"edas-taint-value\",\"effect\":\"PreferNoSchedule\"}]" |
| UserBaseImageUrl |
string |
使用自定义 OpenJDK 运行时,配置的基础镜像地址。 |
openjdk:8u302 |
| LatestVersion |
object |
最新版本信息。 |
|
| Url |
string |
部署包地址。通过 FatJar 或 WAR 包部署的应用需要配置部署包地址。 |
https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar |
| WarUrl |
string |
部署包地址。通过 FatJar 或 WAR 包部署的应用需要配置部署包地址。 |
https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar |
| PackageVersion |
string |
部署包的版本号。 |
20200720 |
示例
正常返回示例
JSON格式
{
"Code": 200,
"Message": "success",
"RequestId": "1053-08e4-47a5-b2ab-5c0323de7b5a",
"Applcation": {
"AppId": "a5281053-****-47a5-b2ab-5c0323de****",
"DeployGroups": {
"DeployGroup": [
{
"Components": {
"Components": [
{
"Type": "JDK",
"ComponentKey": "Open JDK 8",
"ComponentId": "5"
}
]
},
"Env": "\"[\"{\\\"name\\\":\\\"test1\\\",\\\"valueFrom\\\":{\\\"configMapKeyRef\\\":{\\\"name\\\":\\\"edas-demo-configmap\\\",\\\"key\\\":\\\"key1\\\"}}}\",\"{\\\"name\\\":\\\"k2\\\",\\\"value\\\":\\\"v2\\\"}\",\"{\\\"name\\\":\\\"s1\\\",\\\"valueFrom\\\":{\\\"secretKeyRef\\\":{\\\"name\\\":\\\"edas-demo-secret\\\",\\\"key\\\":\\\"k1\\\"}}}\"]\"",
"EnvFrom": "[{\"configMapRef\":{\"name\":\"test-cm\"}}]"
}
]
},
"ImageInfo": {
"RepoId": "cn-hangzhou",
"ImageUrl": "registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282",
"RepoOriginType": "ALI_HUB",
"Tag": "5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282",
"RepoName": "131****067006888_shared_repo",
"RepoNamespace": "edas-server****-user",
"RegionId": "cn-beijing"
},
"App": {
"RequestMem": 1024,
"InstancesBeforeScaling": 10,
"DeployType": "Image",
"ApplicationName": "test",
"ApplicationType": "War",
"Instances": 4,
"LimitMem": 1024,
"Cmd": "ls",
"RegionId": "cn-hangzhou",
"BuildpackId": 57,
"TomcatVersion": "8.5.55",
"CsClusterId": "c383bc813c1974e****451b50c0c8****",
"RequestCpuM": 1000,
"AppId": "00ee517d-dd7d-4d4e-****-****",
"K8sNamespace": "default",
"EdasContainerVersion": "3.60.0",
"LimitCpuM": 1000,
"ClusterId": "c37aec2a-bcca-4ec1-****-****",
"EnvList": {
"Env": [
{
"Name": "CATALINA_OPTS",
"Value": "-Xmx 1024m -Dhsf.default.tid=false $(EDAS_CATALINA_OPTS)"
}
]
},
"CmdArgs": {
"CmdArg": [
"-lh"
]
},
"DevelopType": "General",
"SlbInfo": "[\n {\n \"addressType\": \"intranet\",\n \"externalTrafficPolicy\": \"Local\",\n \"ip\": \"192.168.254.***\",\n \"name\": \"intranet-testapp\",\n \"portMappings\": [\n {\n \"loadBalancerProtocol\": \"TCP\",\n \"servicePort\": {\n \"port\": 8080,\n \"protocol\": \"TCP\",\n \"targetPort\": 18081,\n \"vServerGroupName\": \"k8s/31414/intranet-testapp/default/cc90e0c9508a44667bdae2e83d3******\"\n }\n }\n ],\n \"scheduler\": \"rr\",\n \"serviceType\": \"LoadBalancer\",\n \"slbId\": \"lb-bp1ikoh3nrpgqsm******\",\n \"source\": \"create\",\n \"specification\": \"slb.s3.large\"\n }\n]",
"Annotations": "{\"test-annokey\":\"test-annovalue\"}",
"Labels": "{\"test-labelkey\":\"test-labelvalue\"}",
"LimitEphemeralStorage": "4",
"RequestEphemeralStorage": "2",
"EnableEmptyPushReject": true,
"EnableLosslessRule": true,
"LosslessRuleAligned": true,
"LosslessRuleDelayTime": 120,
"LosslessRuleFuncType": 2,
"LosslessRuleRelated": true,
"LosslessRuleWarmupTime": 120,
"FeatureAnnotations": "base.combination.edas",
"WorkloadType": "Deployment",
"SecurityContext": "{\\\"runAsUser\\\":0,\\\"runAsGroup\\\":0}"
},
"Conf": {
"PostStart": "{\\\"exec\\\":{\\\"command\\\":[\\\"ls\\\",\\\"/\\\"]}}\"",
"Readiness": "{\"failureThreshold\": 3,\"initialDelaySeconds\": 5,\"successThreshold\": 1,\"timeoutSeconds\": 1,\"httpGet\": {\"path\": \"/consumer\",\"port\": 8080,\"scheme\": \"HTTP\",\"httpHeaders\": \\[{\"name\": \"test\",\"value\": \"testvalue\"}\\]}}",
"AhasEnabled": true,
"K8sCmdArgs": "-lh",
"Liveness": "{\"failureThreshold\": 3,\"initialDelaySeconds\": 5,\"successThreshold\": 1,\"timeoutSeconds\": 1,\"tcpSocket\":{\"host\":\"\", \"port\":8080}}",
"DeployAcrossNodes": "true",
"K8sCmd": "ls",
"PreStop": "{\\\"exec\\\":{\\\"command\\\":[\\\"ls\\\",\\\"/\\\"]}}\"",
"DeployAcrossZones": "true",
"JarStartArgs": "-lh",
"K8sNasInfo": "[{\"nasPath\":\"/mnt/\",\"mountPath\":\"/mnt/\"}]",
"JarStartOptions": "-h",
"RuntimeClassName": "runc",
"K8sLocalvolumeInfo": "[{\"type\":\"\",\"nodePath\":\"/mnt/\",\"mountPath\":\"/mnt/\"}]",
"K8sVolumeInfo": "\"{\\\"hostPaths\\\":\\\"[]\\\",\\\"emptyDirs\\\":\\\"[]\\\"}\"",
"Affinity": "\"{\\\"nodeAffinity\\\":{\\\"requiredDuringSchedulingIgnoredDuringExecution\\\":{\\\"nodeSelectorTerms\\\":[{\\\"matchExpressions\\\":[{\\\"key\\\":\\\"beta.kubernetes.io/arch\\\",\\\"operator\\\":\\\"NotIn\\\",\\\"values\\\":[\\\"arm64\\\",\\\"arm32\\\"]}]}]},\\\"preferredDuringSchedulingIgnoredDuringExecution\\\":[{\\\"weight\\\":5,\\\"preference\\\":{\\\"matchExpressions\\\":[{\\\"key\\\":\\\"kubernetes.io/os\\\",\\\"operator\\\":\\\"In\\\",\\\"values\\\":[\\\"linux\\\"]}]}}]},\\\"podAffinity\\\":{\\\"requiredDuringSchedulingIgnoredDuringExecution\\\":[{\\\"labelSelector\\\":{\\\"matchExpressions\\\":[{\\\"key\\\":\\\"edas.oam.acname\\\",\\\"operator\\\":\\\"NotIn\\\",\\\"values\\\":[\\\"edas-test-app\\\"]}]},\\\"namespaces\\\":[\\\"default\\\"],\\\"topologyKey\\\":\\\"kubernetes.io/hostname\\\"}]},\\\"podAntiAffinity\\\":{\\\"preferredDuringSchedulingIgnoredDuringExecution\\\":[{\\\"weight\\\":15,\\\"podAffinityTerm\\\":{\\\"labelSelector\\\":{\\\"matchExpressions\\\":[{\\\"key\\\":\\\"edas.oam.acname\\\",\\\"operator\\\":\\\"In\\\",\\\"values\\\":[\\\"edas-test-app-2\\\"]}]},\\\"namespaces\\\":[\\\"default\\\"],\\\"topologyKey\\\":\\\"failure-domain.beta.kubernetes.io/zone\\\"}}]}}\"",
"Tolerations": "\"[{\\\"key\\\":\\\"edas-taint-key2\\\",\\\"operator\\\":\\\"Exists\\\",\\\"effect\\\":\\\"NoExecute\\\",\\\"tolerationSeconds\\\":50},{\\\"key\\\":\\\"edas-taint-key\\\",\\\"operator\\\":\\\"Equal\\\",\\\"value\\\":\\\"edas-taint-value\\\",\\\"effect\\\":\\\"PreferNoSchedule\\\"}]\"",
"UserBaseImageUrl": "openjdk:8u302"
},
"LatestVersion": {
"Url": "https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar",
"WarUrl": "https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar",
"PackageVersion": "20200720"
}
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。