All Products
Search
Document Center

Enterprise Distributed Application Service:GetK8sApplication

Last Updated:Feb 01, 2024

Queries the information about applications deployed in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
edas:ReadApplicationRead
  • Application
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}
    none
none

Request syntax

GET /pop/v5/changeorder/co_application

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication .

5a166fbd-****-4f98-a286-781659d9****
FromstringNo

The source from which data is queried.

  • If you leave this parameter empty, a common query is performed.
  • If you set the value to deploy, you query application information from the deployment page.
deploy

Response parameters

ParameterTypeDescriptionExample
object

The response object.

Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

1053-08e4-47a5-b2ab-5c0323de7b5a
Applcationobject

The information about the application.

AppIdstring

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication .

a5281053-****-47a5-b2ab-5c0323de****
DeployGroupsobject []

The information about the instance group in which the application is deployed.

Componentsobject []

The information about the component.

Typestring

The component type. Valid values:

JDK
ComponentKeystring

The keyword that is included in the component name.

Open JDK 8
ComponentIdstring

The component ID.

5
Envstring

The environment variable. This parameter is different from the EnvList parameter. This parameter specifies the referenced configuration of the ConfigMap or 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\"}}}"]"
EnvFromstring

The source of the environment variable.

[{"configMapRef":{"name":"test-cm"}}]
ImageInfoobject

The information about the image.

RepoIdstring

The ID of the image repository.

cn-hangzhou
ImageUrlstring

The URL of the image.

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

The source type of the image repository.

ALI_HUB
Tagstring

The tag of the image.

5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282
RepoNamestring

The name of the image repository.

131****067006888_shared_repo
RepoNamespacestring

The namespace to which the image repository belongs.

edas-server****-user
RegionIdstring

The region ID of the image repository.

cn-beijing
Appobject

The basic information about the application.

RequestMeminteger

The size of the reserved memory. Unit: MiB.

1024
InstancesBeforeScalinginteger

The number of application instances before the last auto scaling operation.

10
DeployTypestring

The deployment type of the application. Example: Image.

Image
ApplicationNamestring

The name of the application.

test
ApplicationTypestring

The type of the application.

War
Instancesinteger

The number of application instances.

4
LimitMeminteger

The maximum size of the memory allowed. Unit: MiB.

1024
Cmdstring

The startup command.

ls
RegionIdstring

The ID of the region.

cn-hangzhou
BuildpackIdinteger

The build package number of Enterprise Distributed Application Service (EDAS) Container.

57
TomcatVersionstring

The version of Apache Tomcat.

8.5.55
CsClusterIdstring

The ID of the cluster to which the container belongs.

c383bc813c1974e****451b50c0c8****
RequestCpuMinteger

The number of requested CPU cores. Unit: millicores. 1,000 millicores equal one CPU core.

1000
AppIdstring

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication .

00ee517d-dd7d-4d4e-****-****
K8sNamespacestring

The namespace of the Kubernetes cluster.

default
EdasContainerVersionstring

The version of EDAS Container.

3.60.0
LimitCpuMinteger

The maximum number of CPU cores allowed. Unit: millicores. 1,000 millicores equal one CPU core.

1000
ClusterIdstring

The ID of the cluster.

c37aec2a-bcca-4ec1-****-****
EnvListobject []

The list of environment variables.

Namestring

The name of the environment variable.

CATALINA_OPTS
Valuestring

The value of the environment variable.

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

The list of commands.

string

The command parameters.

-lh
DevelopTypestring

The application type. Valid values:

  • General: native Java application
  • Pandora: Pandora application
  • Multilingual: multilingual application
General
SlbInfostring

The configuration information about the Server Load Balancer (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" } ]
Annotationsstring

The annotation of an application pod.

{"test-annokey":"test-annovalue"}
Labelsstring

The label of an application pod.

{"test-labelkey":"test-labelvalue"}
LimitEphemeralStoragestring

The maximum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.

4
RequestEphemeralStoragestring

The size of space reserved for ephemeral storage resources. Unit: GB. Value 0 indicates that no limit is set on the space size.

2
EnableEmptyPushRejectboolean

Indicates whether the Empty List Protection feature is enabled for the application.

true
EnableLosslessRuleboolean

Indicates whether the Graceful Release feature is enabled for the application.

true
LosslessRuleAlignedboolean

Indicates whether the Graceful Rolling Release and Configure Complete Service Registration before Readiness Probing feature is enabled for the application.

true
LosslessRuleDelayTimeinteger

The delay of service registration. Unit: seconds.

120
LosslessRuleFuncTypeinteger

The number of prefetching curves.

2
LosslessRuleRelatedboolean

Indicates whether the Graceful Rolling Release and Configure Complete Service Prefetching before Readiness Probing feature is enabled for the application.

true
LosslessRuleWarmupTimeinteger

The service prefetching duration. Unit: seconds.

120
FeatureAnnotationsstring

The feature annotations. Possible values:

  • base.combination.edas: enables EDAS integrated management solution.
  • base.combination.arms: enables ARMS monitoring.
  • base.combination.mse: enables MSE microservices governance.
  • base.combination.none: enables lifecycle management.
base.combination.edas
WorkloadTypestring

The workload type. Valid values: Deployment and StatefulSet. If you do not specify this parameter, Deployment is used.

Deployment
Confobject

The configurations.

PostStartstring

The script executed after the container is started.

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

The information about the readiness check on the container.

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

Indicates whether the application is connected to Application High Availability Service (AHAS).

true
K8sCmdArgsstring

The parameters of the startup command.

-lh
Livenessstring

The information about the liveness check on the container.

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

Indicates whether the application instances are deployed across nodes.

  • Value true indicates that the application instances are deployed across nodes.
  • Other values indicate that the application instances are not deployed across nodes.
true
K8sCmdstring

The startup command.

ls
PreStopstring

The script executed before the container is stopped.

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

Indicates whether the application instances are deployed across zones.

  • Value true indicates that the application instances are deployed across zones.
  • Other values indicate that the application instances are not deployed across zones.
true
JarStartArgsstring

The startup parameters for a JAR application. This parameter is deprecated.

-lh
K8sNasInfostring

The information about the Apsara File Storage NAS (NAS) storage.

[{"nasPath":"/mnt/","mountPath":"/mnt/"}]
JarStartOptionsstring

The startup options for a JAR application. This parameter is deprecated.

-h
RuntimeClassNamestring

The type of the container runtime. This parameter is applicable only to clusters that use sandboxed containers.

runc
K8sLocalvolumeInfostring

The information about the local storage.

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

The information about the storage.

"{\"hostPaths\":\"[]\",\"emptyDirs\":\"[]\"}"
Affinitystring

The affinity configuration of the 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\"}}]}}"
Tolerationsstring

The scheduling tolerance configuration of the pod.

"[{\"key\":\"edas-taint-key2\",\"operator\":\"Exists\",\"effect\":\"NoExecute\",\"tolerationSeconds\":50},{\"key\":\"edas-taint-key\",\"operator\":\"Equal\",\"value\":\"edas-taint-value\",\"effect\":\"PreferNoSchedule\"}]"
UserBaseImageUrlstring

The URL of the base image. If you use a custom Java Development Kit (JDK) runtime, you must specify this parameter.

openjdk:8u302
LatestVersionobject

The information about the latest version.

Urlstring

The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.

https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar
WarUrlstring

The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.

https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar
PackageVersionstring

The version of the deployment package.

20200720

Examples

Sample success responses

JSONformat

{
  "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"
    },
    "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"
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-13The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-03-27The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.