Todos os produtos
Search
Central de documentação

Enterprise Distributed Application Service:GetK8sApplication

Última atualização: Jun 28, 2026

Obtém informações sobre uma aplicação implantada em um cluster do Container Service for Kubernetes (ACK) ou em um cluster do Serverless Kubernetes (ASK).

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

edas:ReadApplication

get

*Application

acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}

Nenhuma Nenhuma

Sintaxe da solicitação

GET /pop/v5/changeorder/co_application HTTP/1.1

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

AppId

string

Sim

O ID da aplicação. Você pode chamar a operação ListApplication para obter o ID da aplicação.

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

From

string

Não

A origem da consulta.

  • Se este parâmetro estiver vazio, uma consulta regular será realizada.

  • deploy: A consulta é iniciada a partir da página de implantação.

deploy

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

A resposta da API.

Code

integer

O código de status HTTP.

200

Message

string

As informações adicionais.

success

RequestId

string

O ID da solicitação.

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

Applcation

object

As informações da aplicação.

AppId

string

O ID da aplicação. Você pode chamar a operação ListApplication para obter o ID da aplicação.

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

DeployGroups

object

DeployGroup

array<object>

The list of deployment groups.

array<object>

The deployment group object.

Components

object

Components

array<object>

The component information.

object

The component object.

Type

string

The component type.

JDK

ComponentKey

string

The component keyword.

Open JDK 8

ComponentId

string

The component ID.

5

Env

string

The environment variables. This parameter provides the configuration information about the references to ConfigMaps and Secrets. The information is not included in the EnvList parameter.

"["{\"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

The source of the environment variables.

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

ImageInfo

object

As informações da imagem.

RepoId

string

The ID of the image repository.

cn-hangzhou

ImageUrl

string

The URL of the image.

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

RepoOriginType

string

The type of the source of the image repository.

ALI_HUB

Tag

string

The tag of the image.

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

RepoName

string

The name of the image repository.

131****067006888_shared_repo

RepoNamespace

string

The namespace of the image repository.

edas-server****-user

RegionId

string

The ID of the region where the image is located.

cn-beijing

App

object

As informações básicas sobre a aplicação.

RequestMem

integer

The amount of memory that is reserved. Unit: MiB.

1024

InstancesBeforeScaling

integer

The number of application instances before the last scaling event.

10

DeployType

string

The deployment type. The value is Image.

Image

ApplicationName

string

The name of the application.

test

ApplicationType

string

The application type.

War

Instances

integer

The number of application instances.

4

LimitMem

integer

The memory limit. Unit: MiB.

1024

Cmd

string

The startup command.

ls

RegionId

string

The region ID.

cn-hangzhou

BuildpackId

integer

The ID of the application build type.

57

TomcatVersion

string

The version of Apache Tomcat.

8.5.55

CsClusterId

string

The ID of the container cluster.

c383bc813c1974e****451b50c0c8****

RequestCpuM

integer

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

1000

AppId

string

The ID of the application. You can call the ListApplication operation to obtain the application ID.

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

K8sNamespace

string

The Kubernetes namespace.

default

EdasContainerVersion

string

The version of the EDAS container.

3.60.0

LimitCpuM

integer

The CPU limit. Unit: millicores. 1,000 millicores are equal to one CPU core.

1000

ClusterId

string

The cluster ID.

c37aec2a-bcca-4ec1-****-****

EnvList

object

Env

array<object>

The list of environment variables.

object

The environment variable object.

Name

string

The name of the environment variable.

CATALINA_OPTS

Value

string

The value of the environment variable.

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

CmdArgs

object

CmdArg

array

The list of commands.

string

The command parameters.

-lh

DevelopType

string

The application type:

  • General: a native Java application.

  • Pandora: a Pandora application.

  • Multilingual: a multilingual application.

General

SlbInfo

string

The SLB configurations.

[ { "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

The annotations of the application pod.

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

Labels

string

The labels of the application pod.

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

LimitEphemeralStorage

string

The limit of ephemeral storage resources. Unit: GB. A value of 0 indicates that no limit is set.

4

RequestEphemeralStorage

string

The amount of ephemeral storage resources to reserve. Unit: GB. A value of 0 indicates that no limit is set.

2

EnableEmptyPushReject

boolean

Indicates whether empty-push protection is enabled for the application.

true

EnableLosslessRule

boolean

Indicates whether graceful start is enabled for the application.

true

LosslessRuleAligned

boolean

Indicates whether the application, in graceful rolling deployment mode, is configured to complete service registration before it passes the readiness probe.

true

LosslessRuleDelayTime

integer

The duration of delayed service registration that is configured for the application. Unit: seconds.

120

LosslessRuleFuncType

integer

The service prefetch curve that is set for the application.

2

LosslessRuleRelated

boolean

Indicates whether the application, in graceful rolling deployment mode, is configured to complete service prefetch before it passes the readiness probe.

true

LosslessRuleWarmupTime

integer

The service prefetch duration that is set for the application. Unit: seconds.

120

FeatureAnnotations

string

The tags of advanced configurations for the current application. This parameter indicates the features that are enabled. Valid values:

  • base.combination.edas: the EDAS integrated management solution.

  • base.combination.arms: ARMS monitoring is enabled.

  • base.combination.mse: MSE is enabled.

  • base.combination.none: Only lifecycle management is enabled.

base.combination.edas

WorkloadType

string

The type of the workload that is used to create the application. Valid values: Deployment and StatefulSet. If you leave this parameter empty, Deployment is used.

Deployment

SecurityContext

string

The SecurityContext properties of the application pod container.

{\"runAsUser\":0,\"runAsGroup\":0}

Conf

object

As informações de configuração.

PostStart

string

The information about the post-start execution of the Kubernetes container.

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

Readiness

string

The information about the readiness probe of the Kubernetes container.

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

AhasEnabled

boolean

Indicates whether the application is connected to AHAS.

true

K8sCmdArgs

string

The parameters of the startup command.

-lh

Liveness

string

The information about the liveness probe of the Kubernetes container.

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

DeployAcrossNodes

string

Indicates whether to distribute application instances across multiple nodes:

  • true: The application instances are distributed across multiple nodes.

  • Other values: The application instances are not distributed across multiple nodes.

true

K8sCmd

string

The startup command.

ls

PreStop

string

The information about the pre-stop execution of the Kubernetes container.

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

DeployAcrossZones

string

Indicates whether to distribute application instances across multiple zones:

  • true: The application instances are distributed across multiple zones.

  • Other values: The application instances are not distributed across multiple zones.

true

JarStartArgs

string

The startup parameters of the JAR package. This parameter is deprecated.

-lh

K8sNasInfo

string

The NAS storage information.

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

JarStartOptions

string

The startup options of the JAR package. This parameter is deprecated.

-h

RuntimeClassName

string

The pod runtime class. This parameter is applicable only to clusters that use sandboxed containers.

runc

K8sLocalvolumeInfo

string

The local storage information.

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

K8sVolumeInfo

string

The storage information.

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

Affinity

string

The pod affinity configuration.

"{\"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

The pod scheduling toleration configuration.

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

UserBaseImageUrl

string

The URL of the base image. This parameter is configured when a custom OpenJDK runtime is used.

openjdk:8u302

LatestVersion

object

As informações sobre a versão mais recente.

Url

string

The URL of the deployment package. This parameter is required for applications that are deployed using a FatJar or WAR package.

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

WarUrl

string

The URL of the deployment package. This parameter is required for applications that are deployed using a FatJar or WAR package.

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

PackageVersion

string

The version number of the deployment package.

20200720

Exemplos

Resposta de sucesso

JSON formato

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

Códigos de erro

Consulte Códigos de ErroCódigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de VersãoNotas de Versão para uma lista completa.