DescribeApplicationConfig

Updated at:

Retrieves application configuration information.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:DescribeApplicationConfig

get

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/app/describeApplicationConfig HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

7171a6ca-d1cd-4928-8642-7d5cfe69****

VersionId

string

No

The version ID.

0026ff7f-2b57-4127-bdd0-9bf202bb****

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

01CF26C7-00A3-4AA6-BA76-7E95F2A3****

Message

string

The additional information about the call result.

success

TraceId

string

The trace ID, which is used to accurately query call information.

ac1a0b2215622246421415014e****

Data

object

The application information.

VpcId

string

The VPC ID.

vpc-2ze0i263cnn311nvj****

Readiness

string

The readiness probe for the application. Containers that fail multiple health checks are terminated and restarted. Traffic from Server Load Balancer (SLB) is not routed to containers that fail health checks. The exec, httpGet, and tcpSocket methods are supported. For examples, see the Liveness parameter.

Note

You can select only one method for health checks.

{"exec":{"command":["curl http://localhost:8080"]},"initialDelaySeconds":20,"timeoutSeconds":5}

ConfigMapMountDesc

array<object>

The ConfigMap information.

object

The ConfigMap information.

Key

string

The ConfigMap key-value pair.

k1

ConfigMapName

string

The ConfigMap name.

test

MountPath

string

The mount path in the container.

/tmp

ConfigMapId

integer

The ConfigMap ID.

1

SecurityGroupId

string

The security group ID.

sg-wz969ngg2e49q5i4****

BatchWaitTime

integer

The wait time between batches during a batch release, in seconds.

10

Jdk

string

The JDK version required by the deployment package. Valid values:

  • Open JDK 8

  • Open JDK 7

  • Dragonwell 11

  • Dragonwell 8

  • openjdk-8u191-jdk-alpine3.9

  • openjdk-7u201-jdk-alpine3.9

This parameter is not supported when Package Type is set to Image.

Open JDK 8

ImageUrl

string

The image URL. This parameter is required when Package Type is set to Image.

docker.io/library/nginx:1.14.2

SlsConfigs

string

The configuration for collecting logs to Simple Log Service (SLS).

  • To use SLS resources automatically created by Serverless App Engine (SAE): [{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}].

  • To use custom SLS resources: [{"projectName":"test-sls","logType":"stdout","logDir":"","logstoreName":"sae","logtailName":""},{"projectName":"test","logDir":"/tmp/a.log","logstoreName":"sae","logtailName":""}].

Parameter description:

  • projectName: the name of the SLS project.

  • logDir: the log path.

  • logType: the log type. stdout indicates container standard output logs. Only one stdout log configuration can be set. If this parameter is not set, file logs are collected.

  • logstoreName: the name of the SLS Logstore.

  • logtailName: the name of the SLS Logtail. If this parameter is not specified, a new Logtail is created.

If the SLS collection configuration remains unchanged during multiple deployments, you do not need to set this parameter (that is, the SlsConfigs field is not required in the request). If you no longer need the SLS collection feature, you must set the value of this field to an empty string (that is, set SlsConfigs to "") in the request.

[{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}]

Liveness

string

The liveness probe for the container. Containers that fail health checks are terminated and restarted. The following methods are supported:

  • exec: for example, {"exec":{"command":["sh","-c","cat /home/admin/start.sh"]},"initialDelaySeconds":30,"periodSeconds":30,"timeoutSeconds":2}.

  • httpGet: for example, {"httpGet":{"path":"/","port":18091,"scheme":"HTTP","isContainKeyWord":true,"keyWord":"SAE"},"initialDelaySeconds":11,"periodSeconds":10,"timeoutSeconds":1}.

  • tcpSocket: for example, {"tcpSocket":{"port":18091},"initialDelaySeconds":11,"periodSeconds":10,"timeoutSeconds":1}.

Note

You can select only one method for health checks.

Parameter description:

  • exec.command: the health check command.

  • httpGet.path: the access path.

  • httpGet.scheme: HTTP or HTTPS.

  • httpGet.isContainKeyWord: true indicates that the keyword is included, and false indicates that the keyword is not included. If this field is missing, the advanced feature is not used.

  • httpGet.keyWord: the custom keyword. The isContainKeyWord field is required when this field is used.

  • tcpSocket.port: the port for TCP connection detection.

  • initialDelaySeconds: the delay before the health check starts. Default value: 10. Unit: seconds.

  • periodSeconds: the health check interval. Default value: 30. Unit: seconds.

  • timeoutSeconds: the timeout period for the health check. Default value: 1. Unit: seconds. If this parameter is set to 0 or not set, the default timeout period is 1 second.

{"exec":{"command":["curl http://localhost:8080"]},"initialDelaySeconds":20,"timeoutSeconds":3}

Tags

array<object>

The tag information.

object

The tag information.

Key

string

The tag key.

k1

Value

string

The tag value.

v1

PackageUrl

string

The URL of the deployment package. If your deployment package is uploaded through SAE, note the following points:

  • The URL cannot be directly downloaded. You must call the GetPackageVersionAccessableUrl operation to obtain a downloadable URL, which is valid for 10 minutes.

  • SAE retains the package for a maximum of 90 days. After 90 days, the URL is not returned and the package cannot be downloaded.

https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war

PackageType

string

The type of the application package. Valid values:

  • When you deploy a Java application, valid values are FatJar, War, and Image.

  • When you deploy a PHP application, valid values are:
    • PhpZip

    • IMAGE_PHP_5_4

    • IMAGE_PHP_5_4_ALPINE

    • IMAGE_PHP_5_5

    • IMAGE_PHP_5_5_ALPINE

    • IMAGE_PHP_5_6

    • IMAGE_PHP_5_6_ALPINE

    • IMAGE_PHP_7_0

    • IMAGE_PHP_7_0_ALPINE

    • IMAGE_PHP_7_1

    • IMAGE_PHP_7_1_ALPINE

    • IMAGE_PHP_7_2

    • IMAGE_PHP_7_2_ALPINE

    • IMAGE_PHP_7_3

    • IMAGE_PHP_7_3_ALPINE

War

PreStop

string

The script to execute before the container stops. A script is triggered before the container is deleted. Format: {"exec":{"command":["cat","/etc/group"]}}.

{"exec":{"command":["cat","/etc/group"]}}

PackageVersion

string

The version number of the deployment package. This parameter is required when Package Type is set to FatJar or War.

1.0

JarStartArgs

string

The startup parameters for the JAR package. Default application startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

start

AppName

string

The application name.

demo-app

AppId

string

The application ID.

7171a6ca-d1cd-4928-8642-7d5cfe69****

JarStartOptions

string

The startup options for the JAR package. Default application startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

-Dtest=true

Replicas

integer

The number of application instances.

2

UpdateStrategy

string

The deployment policy. When the minimum number of ready instances is 1, the value of the UpdateStrategy field is "". When the minimum number of ready instances is greater than 1, examples are as follows:

  • Canary release of 1 instance + 2 subsequent batches + automatic batching + 1-minute interval between batches: {"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":1},"grayUpdate":{"gray":1}}.

  • Canary release of 1 instance + 2 subsequent batches + manual batching: {"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"manual"},"grayUpdate":{"gray":1}}.

  • 2 batches + automatic batching + 0-minute interval between batches: {"type":"BatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":0}}.

Parameter description:

  • type: the release policy type. Valid values: GrayBatchUpdate for canary release and BatchUpdate for batch release.

  • batchUpdate: the batch release policy.
    • batch: the number of release batches.

    • releaseType: the processing method between batches. Valid values: auto for automatic and manual for manual.

    • batchWaitTime: the interval between batches during deployment, in seconds.

  • grayUpdate: the remaining batches after the canary release. This parameter is required when type is set to GrayBatchUpdate.

{"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":1},"grayUpdate":{"gray":1}}

MinReadyInstances

integer

The minimum number of ready instances. Valid values:

  • If this parameter is set to 0, services are interrupted during the application upgrade.

  • If this parameter is set to -1, the system recommended value is used, which is 25% of the current number of instances. For example, if there are 5 instances, 5 × 25% = 1.25. After rounding up, the minimum number of ready instances is 2.

Note

Set the minimum number of ready instances to a value greater than or equal to 1 for each rolling deployment to ensure service continuity.

1

MinReadyInstanceRatio

integer

The percentage of the minimum number of ready instances. Valid values:

  • -1: the default value, which indicates that the percentage is not used. If this parameter is not specified, the system defaults to -1.

  • 0 to 100: the percentage, rounded up. For example, if this parameter is set to 50 and there are 5 instances, the minimum number of ready instances is 3.

Note

When both MinReadyInstance and MinReadyInstanceRatio are passed and the value of MinReadyInstanceRatio is not -1, the MinReadyInstanceRatio parameter prevails. For example, if MinReadyInstances is set to 5 and MinReadyInstanceRatio is set to 50, MinReadyInstanceRatio is used to calculate the minimum number of ready instances.

-1

Memory

integer

The memory required for each instance, in MB. The value cannot be 0. The memory has a one-to-one mapping with the CPU. Only the following defined specifications are supported:

  • 1024: corresponds to 500 and 1000 millicores.

  • 2048: corresponds to 500, 1000, and 2000 millicores.

  • 4096: corresponds to 1000, 2000, and 4000 millicores.

  • 8192: corresponds to 2000, 4000, and 8000 millicores.

  • 12288: corresponds to 12000 millicores.

  • 16384: corresponds to 4000, 8000, and 16000 millicores.

  • 24576: corresponds to 12000 millicores.

  • 32768: corresponds to 16000 millicores.

  • 65536: corresponds to 8000, 16000, and 32000 millicores.

  • 131072: corresponds to 32000 millicores.

2048

Php

string

The PHP version required by the PHP deployment package. This parameter is not supported for images.

PHP-FPM 7.0

PhpConfig

string

The content of the PHP configuration file.

k1=v1

PhpConfigLocation

string

The mount path for the PHP application startup configuration. You must ensure that the PHP server uses this configuration file to start.

/usr/local/etc/php/php.ini

PostStart

string

The script to execute after the container starts. A script is triggered immediately after the container is created. Format: {"exec":{"command":["cat","/etc/group"]}}.

{"exec":{"command":["cat","/etc/group"]}}

TerminationGracePeriodSeconds

integer

The timeout period for graceful shutdown. Default value: 30. Unit: seconds. Valid values: 1 to 300.

10

CommandArgs

string

The parameters for the image startup command. These parameters are required by the Command startup command. Format:

["a","b"]

In the example of the Command parameter, CommandArgs=["abc", ">", "file0"], where ["abc", ">", "file0"] must be converted to a string in JSON array format. If this parameter is not required, you do not need to specify it.

["a","b"]

NamespaceId

string

The namespace ID.

cn-beijing:test

MountHost

string

The mount target of the NAS file system in the application VPC. If the configuration remains unchanged during deployment, you do not need to set this parameter (that is, the MountHost field is not required in the request). If you need to clear the NAS configuration, you must set the value of this field to an empty string (that is, set MountHost to "") in the request.

example.com

TomcatConfig

string

The Tomcat file configuration. Set this parameter to "" or "{}" to delete the configuration:

  • port: the port range is 1024 to 65535. Ports smaller than 1024 require root permissions. Because the container is configured with admin permissions, specify a port greater than 1024. If this parameter is not configured, the default value is 8080.

  • contextPath: the access path. The default value is the root directory "/".

  • maxThreads: the maximum number of connections in the connection pool. The default value is 400.

  • uriEncoding: the Tomcat encoding format. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. If this parameter is not set, the default value is ISO-8859-1.

  • useBodyEncoding: specifies whether to use BodyEncoding for URL. Default value: true.

{"port":8080,"contextPath":"/","maxThreads":400,"uriEncoding":"ISO-8859-1","useBodyEncodingForUri":true}

RegionId

string

The region ID.

cn-beijing

VSwitchId

string

The vSwitch ID.

vsw-2ze559r1z1bpwqxwp****

Cpu

integer

The CPU required for each instance, in millicores. The value cannot be 0. Only the following defined specifications are supported:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

1000

Envs

string

The container environment variable parameters. Custom configuration items or referenced configuration items are supported. To reference a configuration item, create a ConfigMap instance first. For more information, see CreateConfigMap. Valid values:

  • Custom configuration
    • name: the name of the environment variable.

    • value: the value of the environment variable.

  • Referenced configuration item
    • name: the name of the environment variable. You can reference a single key or all keys. To reference all keys, enter sae-sys-configmap-all-<configuration item name>, for example, sae-sys-configmap-all-test1.

    • valueFrom: the environment variable reference. Set the value to configMapRef.

    • configMapId: the ID of the configuration item.

    • key: the key. If all keys are referenced, do not set this field.

[{"name":"TEST_ENV_KEY","value":"TEST_ENV_VAR"}]

MountDesc

array<object>

The mount description.

object

The mount description.

MountPath

string

The mount path in the container.

/tmp

NasPath

string

The relative file directory of the NAS file system.

/

EnableAhas

string

Specifies whether to connect to Application High Availability Service (AHAS). Valid values:

  • true: connects to AHAS.

  • false: does not connect to AHAS.

true

CustomHostAlias

string

The custom host mapping in the container. Valid values:

  • hostName: the domain name or hostname.

  • ip: the IP address.

[{"hostName":"test.host.name","ip":"0.0.0.0"}]

WebContainer

string

The Tomcat version required by the deployment package. Valid values:

  • apache-tomcat-7.0.91

  • apache-tomcat-8.5.42

This parameter is not supported when Package Type is set to Image.

apache-tomcat-7.0.91

Command

string

The image startup command. The command must be an executable object that exists in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

Based on the preceding example, Command="echo", CommandArgs=["abc", ">", "file0"].

echo

WarStartOptions

string

The startup options for the WAR package. Default application startup command: java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

custom-option

PhpArmsConfigLocation

string

The mount path for PHP application monitoring. You must ensure that the PHP server loads the configuration file in this path.

You do not need to focus on the configuration content. SAE automatically renders the correct configuration file.

/usr/local/etc/php/conf.d/arms.ini

NasId

string

The NAS ID.

AKSN****

OssAkId

string

The AccessKey ID for OSS read and write operations.

DemoAK****cdefgh

OssAkSecret

string

The AccessKey Secret for OSS read and write operations.

DemoSecretabc****hijklmnopqrst

OssMountDescs

array<object>

The OSS mount description.

object

The OSS mount description.

bucketName

string

The bucket name.

oss-bucket

bucketPath

string

The directory or OSS object that you created in OSS. If the OSS mount directory does not exist, an exception is triggered.

data/user.data

mountPath

string

The container path in SAE. If the path already exists, it is overwritten. If the path does not exist, it is created.

/usr/data/user.data

readOnly

boolean

Specifies whether the container path has read permissions on the resources in the mount directory. Valid values:

  • true: read-only permissions.

  • false: read and write permissions.

true

EdasContainerVersion

string

The application runtime environment version in the High-Speed Service Framework (HSF), such as the Ali-Tomcat container.

3.5.3

Timezone

string

The time zone. Default value: Asia/Shanghai.

Asia/Shanghai

AppDescription

string

The application description.

Sample application

EnableGreyTagRoute

boolean

Specifies whether to enable traffic canary release rules. This rule applies only to applications that use the Spring Cloud and Dubbo frameworks. Valid values:

  • true: enables canary release rules.

  • false: disables canary release rules.

false

MseApplicationId

string

The application ID in Microservices Engine (MSE).

xxxxxxx@xxxxx

AcrInstanceId

string

The ACR Enterprise Edition instance ID.

cri-xxxxxx

AcrAssumeRoleArn

string

The ARN of the RAM role required for pulling images across accounts. For more information, see Pull Alibaba Cloud images across accounts and Implement cross-account authorization by using RAM roles.

acs:ram::123456789012****:role/adminrole

ImagePullSecrets

string

The ID of the corresponding secret dictionary.

10

AssociateEip

boolean

Specifies whether to associate an EIP. Valid values:

  • true: The EIP is associated.

  • false: The EIP is not associated.

true

KafkaConfigs

string

The summary of configurations for collecting logs to Kafka. The parameters are described as follows:

  • kafkaEndpoint: The service registration endpoint of the Kafka API.

  • kafkaInstanceId: The Kafka instance ID.

  • kafkaConfigs: The summary of configurations for one or more logs. For sample values and metric descriptions, see the kafkaConfigs request parameter in this topic.

{"kafkaEndpoint":"10.0.X.XXX:XXXX,10.0.X.XXX:XXXX,10.0.X.XXX:XXXX","kafkaInstanceId":"alikafka_pre-cn-7pp2l8kr****","kafkaConfigs":[{"logType":"file_log","logDir":"/tmp/a.log","kafkaTopic":"test2"},{"logType":"stdout","logDir":"","kafkaTopic":"test"}]}

ProgrammingLanguage

string

The programming language of the technology stack used to create the application. Valid values:

  • java: Java.

  • php: PHP.

  • other: Multiple languages, such as Python, C++, Go, .NET, and Node.js.

java

PvtzDiscovery

string

Specifies whether to enable service registration and discovery for Kubernetes Services.

{ "serviceName": "bwm-poc-sc-gateway-cn-beijing-front", "namespaceId": "cn-beijing:front", "portAndProtocol": { "18012": "TCP" }, "portProtocols": [ { "port": "18012", "protocol": "TCP" } ], "enable": true }

SwimlanePvtzDiscovery

string

Specifies whether to configure service registration and discovery and end-to-end canary release based on Kubernetes Services.

{\"enable\":\"false\",\"namespaceId\":\"cn-beijing:test\",\"portAndProtocol\":{\"2000:TCP\":\"18081\"},\"portProtocols\":[{\"port\":2000,\"protocol\":\"TCP\",\"targetPort\":18081}],\"pvtzDiscoveryName\":\"cn-beijing-1421801774382676\",\"serviceId\":\"3513\",\"serviceName\":\"demo-gray.test\"}

MicroRegistration

string

The Nacos registry center. Valid values:

  • 0: The built-in Nacos registry of Serverless App Engine (SAE).

  • 1: A user-created Nacos registry.

  • 2: Microservices Engine (MSE) Nacos commercial edition.

"0"

NasConfigs

string

The configurations for mounting NAS.

[{"mountPath":"/test1","readOnly":false,"nasId":"nasId1","mountDomain":"nasId1.cn-shenzhen.nas.aliyuncs.com","nasPath":"/test1"},{"nasId":"nasId2","mountDomain":"nasId2.cn-shenzhen.nas.aliyuncs.com","readOnly":false,"nasPath":"/test2","mountPath":"/test2"}]

Python

string

The Python environment. Python 3.9.15 is supported.

PYTHON 3.9.15

PythonModules

string

The custom installation of module dependencies. By default, the dependencies defined in the requirements.txt file in the root folder are installed. If no dependencies are configured or custom software packages are used, you can specify the dependencies to install.

Flask==2.0

MseApplicationName

string

The application name after the SAE service is registered with MSE.

cn-shenzhen-alb-demo-5c****

AppSource

string

The type of the SAE application. Valid values:

  • micro_service

  • web

  • job

micro_service

ServiceTags

object

The canary release tags configured for the application.

{"alicloud.service.tag":"gray"}

string

The value of the canary release tag.

tag1

Dotnet

string

The version of the .NET framework. Valid values:

  • .NET 3.1

  • .NET 5.0

  • .NET 6.0

  • .NET 7.0

  • .NET 8.0

.NET 8.0

MicroRegistrationConfig

string

The registry configurations. This parameter takes effect only when the registry type is MSE Nacos Enterprise Edition.

{\"instanceId\":\"mse-cn-1ls43******\",\"namespace\":\"62ee12fb-c279-4da4-be96-21**********\"}

EnableIdle

boolean

Specifies whether to enable the idle mode. Valid values:

  • true: Enabled.

  • false: Disabled.

false

EnableNewArms

boolean

Specifies whether to enable the new Application Real-Time Monitoring Service (ARMS) features. Valid values:

  • true: Enabled.

  • false: Disabled.

false

EnableCpuBurst

string

Specifies whether to enable the CPU Burst feature. Valid values:

  • true: Enabled.

  • false: Disabled.

true

OidcRoleName

string

The RAM role for the identity authentication service.

Note

You must create an OIDC identity provider and an identity provider role in the same region in advance. For more information, see Create an OIDC identity provider and Create an IdP for role-based SSO.

sae-test

SecretMountDesc

array<object>

The description of the Secret mount.

object

The description of the Secret mount.

Key

string

The key used to Base64-encode the data value.

task-center

SecretName

string

The name of the Secret instance.

dummy-name-opaque-894

MountPath

string

The mount path.

/opt/www/runtime/logs

SecretId

integer

The instance ID of the queried Secret.

520

SidecarContainersConfig

array<object>

The configurations of the sidecar container.

array<object>

The configurations of the sidecar container.

Name

string

The name of the container.

test

Cpu

integer

The maximum CPU resources that the sidecar container can use from the main container.

500

Memory

integer

The maximum memory resources that the sidecar container can use from the main container.

1024

ImageUrl

string

The image address.

registry.cn-beijing.aliyuncs.com/sae-dev-test/nginx:stable

AcrInstanceId

string

The instance ID of the Container Registry Enterprise instance. This parameter is required when ImageUrl is set to a Container Registry Enterprise instance.

cri-fhzlneorxala66ip

Command

string

The image startup command. The command must be an executable object that exists in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

Based on the preceding example, Command="echo", CommandArgs=["abc", ">", "file0"].

/bin/sh

CommandArgs

string

The arguments for the image startup command. These are the parameters required by the Command startup command. Format:

["a","b"]

In the preceding example, CommandArgs=["abc", ">", "file0"], where ["abc", ">", "file0"] must be converted to a string in JSON array format. If no arguments are required, you do not need to specify this parameter.

[\"-c\",\"echo \\\"test\\\" > /home/nas/test.log && sleep 10000000s\"]

Envs

string

The environment variables of the container. You can customize environment variables or reference ConfigMaps. To reference a ConfigMap, you must create a ConfigMap instance first. For more information, see CreateConfigMap. Valid values:

  • Custom configuration
    • name: The name of the environment variable.

    • value: The value of the environment variable. The priority of this parameter is higher than that of valueFrom.

  • Reference a ConfigMap (valueFrom)
    • name: The name of the environment variable. You can reference a single key or all keys. To reference all keys, enter sae-sys-configmap-all-<ConfigMap name>, for example, sae-sys-configmap-all-test1.

    • valueFrom: The reference of the environment variable. Set the value to configMapRef.
      • configMapId: The ID of the ConfigMap.

      • key: The key. If you reference all key-value pairs, do not set this field.

[{\"name\":\"k1\",\"value\":\"c8e3a815-e5d3-4adf-abb3-98b106a607c4\"}]

ConfigMapMountDesc

array<object>

The description of the ConfigMap mount. Uses the configuration item created on the configuration item page in the namespace to inject configuration information into the container. The metric descriptions are as follows:

  • configMapId: The ConfigMap instance ID. You can invoke the ListNamespacedConfigMaps operation to obtain the instance ID.

  • key: The key.

Note

You can pass the sae-sys-configmap-all parameter to mount all keys.

  • mountPath: The mount path.

  • ConfigMapName: The name of the ConfigMap.

object

The description of the ConfigMap mount.

Key

string

The ConfigMap key.

key

ConfigMapName

string

The ConfigMap name.

ConfigMap-test

MountPath

string

The mount path in the container.

/mnt/test

ConfigMapId

integer

The ConfigMap instance ID.

7361

EmptyDirDesc

array<object>

The shared ephemeral storage. Sets an ephemeral storage directory and mounts it to the main container and the sidecar container.

object

The shared ephemeral storage.

Name

string

The name of the ephemeral storage.

sidecar-container

MountPath

string

The mount path of the volume in the container.

/mnt/cache

SecretMountDesc

array<object>

The description of the Secret mount.

object

Key

string

The key used to Base64-encode the data value.

test

SecretName

string

The name of the Secret instance.

registry-auth

MountPath

string

The mount path.

/tmp

SecretId

integer

The Secret instance ID.

16

Liveness

string

The container health check.

{"exec":{"command":["sh","-c","cat /home/admin/start.sh"]},"initialDelaySeconds":30,"periodSeconds":30,"timeoutSeconds":2}

Readiness

string

The application readiness probe.

{"exec":{"command":["sh","-c","cat /home/admin/start.sh"]},"initialDelaySeconds":30,"periodSeconds":30,"timeoutSeconds":2}

PreStop

string

The pre-stop hook of the container.

{"exec":{"command":["sh","-c","echo hello"]}}

PostStart

string

The post-start hook of the container.

{"exec":{"command":["sh","-c","echo hello"]}}

SlsConfigs

string

The configurations for collecting sidecar logs to Simple Log Service (SLS). The structure is aligned with SlsConfigs.

[{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}]

AcrAssumeRoleArn

string

The ARN of the RAM role used to pull sidecar images across accounts.

acs:ram::1889178085252366:role/qiweiyun2

ImagePullSecrets

string

The ID of the secret dictionary corresponding to the sidecar image.

secret-key

InitContainersConfig

array<object>

The configurations of the init container.

array<object>

The configurations of the init container.

Name

string

The name of the init container.

init-container

ImageUrl

string

The image address used by the init container.

registry.cn-shenzhen.aliyuncs.com/sae-serverless-demo/sae-demo:microservice-java-provider-v1.0

Command

string

The image startup command. The command must be an executable object that exists in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

Based on the preceding example, Command="echo", CommandArgs=["abc", ">", "file0"].

/bin/sh

CommandArgs

string

The arguments for the image startup command. These are the parameters required by the Command startup command. Format:

["a","b"]

In the preceding example, CommandArgs=["abc", ">", "file0"], where ["abc", ">", "file0"] must be converted to a string in JSON array format. If no arguments are required, you do not need to specify this parameter.

["a","b"]

Envs

string

The environment variables of the container. You can customize environment variables or reference ConfigMaps. To reference a ConfigMap, you must create a ConfigMap instance first. For more information, see CreateConfigMap. Valid values:

  • Custom configuration
    • name: The name of the environment variable.

    • value: The value of the environment variable. The priority of this parameter is higher than that of valueFrom.

  • Reference a ConfigMap (valueFrom)
    • name: The name of the environment variable. You can reference a single key or all keys. To reference all keys, enter sae-sys-configmap-all-<ConfigMap name>, for example, sae-sys-configmap-all-test1.

    • valueFrom: The reference of the environment variable. Set the value to configMapRef.

    • configMapId: The ID of the ConfigMap.

    • key: The key. If you reference all key-value pairs, do not set this field.

  • Reference a secret dictionary (valueFrom)
    • name: The name of the environment variable. You can reference a single key or all keys. To reference all keys, enter sae-sys-secret-all-<secret dictionary name>, for example, sae-sys-secret-all-test1.

    • valueFrom: The reference of the environment variable. Set the value to secretRef.

    • secretId: The ID of the secret dictionary.

    • key: The key. If you reference all key-value pairs, do not set this field.

[{"name":"TEST_ENV_KEY","value":"TEST_ENV_VAR"}]

ConfigMapMountDesc

array<object>

The ConfigMap information.

object

The ConfigMap key-value pair.

Key

string

The ConfigMap key-value pair.

k1

ConfigMapName

string

The ConfigMap name.

test

MountPath

string

The mount path in the container.

/tmp

ConfigMapId

integer

The ConfigMap ID.

1

EmptyDirDesc

array<object>

The shared ephemeral storage.

object

Name

string

The name of the ephemeral storage.

workdir

MountPath

string

The mount path of the volume in the container.

/usr/local/tomcat/webapps

SecretMountDesc

array<object>

The description of the Secret mount.

object

Key

string

The key.

test

SecretName

string

The name of the Secret instance.

registry-auth

MountPath

string

The mount path.

/tmp

SecretId

integer

The Secret instance ID.

16

CustomImageNetworkType

string

The custom image network type. If the image is not a custom image, set this parameter to an empty string. Valid values:

  • internet: Public image.

  • intranet: Private image.

internet

ResourceType

string

The resource type. Only application is supported.

application

BaseAppId

string

The baseline application ID.

8c573618-8d72-4407-baf4-f7b64b******

MicroserviceEngineConfig

string

The microservice governance configuration.

  • enable: Specifies whether to enable microservice governance. Valid values:
    • true: Enabled.

    • false: Disabled.

  • mseLosslessRule: The lossless online and offline configuration.
    • delayTime: The delay time.

    • enable: Specifies whether to enable lossless online. Valid values: true (enabled) and false (disabled).

    • notice: Specifies whether to enable notifications. Valid values: true (enabled) and false (disabled).

    • warmupTime: The warm-up duration for low traffic, in seconds.

{\"Enable\":true,\"MseLosslessRule\":{\"enable\":true,\"notice\":true,\"delayTime\":10,\"warmupTime\":120,\"funcType\":2,\"aligned\":false,\"related\":false,\"lossLessDetail\":false}}

NewSaeVersion

string

The application version. Valid values:

  • lite: Lite edition.

  • std: Standard edition.

  • pro: Professional edition.

pro

ClusterId

string

The cluster ID.

495fc79c-ae61-4600-866d-a09d68******

DiskSize

integer

The disk storage size, in GB.

20

StartupProbe

string

The application startup probe.

{\"exec\":{\"command\":[\"/bin/sh\",\"-c\",\"#!Note: If microservice config is enabled, the application will be automatically injected with the prestop configuration for lossless offline. If you delete this prestop configuration, lossless offline will not be effective.\\n echo stop > /tmp/prestop; /home/admin/.tools/curl http://127.0.0.1:54199/offline; sleep 30\"]}}

GpuCount

string

The number of GPUs.

1

GpuType

string

The GPU type.

PPU810E

EnablePrometheus

boolean

Specifies whether to enable Prometheus custom metric collection.

IsStateful

boolean

Specifies whether the application is stateful.

CmsServiceId

string

The CloudMonitor service ID.

cms-id

HeadlessPvtzDiscovery

string

The headless PrivateZone service discovery configuration for stateful applications. The value is a JSON string.

{"enable":"true","serviceName":"svc1","namespaceId":"cn-shenzhen"}

Html

string

The NGINX runtime environment version used by the HTML application.

nginx 1.28

EmptyDirDesc

array<object>

The shared ephemeral storage.

object

The shared ephemeral storage configuration.

Name

string

The name of the ephemeral storage.

workdir

MountPath

string

The mount path.

/usr/local/tomcat/webapps

DeploymentName

string

The instance name of the application in the ASI cluster.

demo-b0cdce9b-3d1f-4168-b206-b59f348f1a8a

AlbIngressReadinessGate

string

The ALB gateway readiness gate configuration.

default

MaxSurgeInstances

integer

The peak volume of instances.

-1

MaxSurgeInstanceRatio

integer

The ratio of the peak volume of instances.

-1

AgentVersion

string

The agent version.

4.4.2

EnableNamespaceAgentVersion

boolean

Specifies whether to reuse the namespace agent version configuration.

SlsLogEnvTags

string

sls log env tags

[]

LokiConfigs

string

LokiConfigs

[]

IdleHour

string

The idle time period configuration for the application. The value is a JSON array string that contains startTime and endTime. The time must be specified in full hours.

[{"startTime":"1:00","endTime":"16:00"}]

Labels

object

The labels.

{"environment":"prod"}

string

The value of the application label.

prod

RaspConfig

array<object>

The RASP configuration items.

object

EnableRasp

boolean

Specifies whether to enable RASP.

RaspAppName

string

The RASP application name.

sae-test

RaspAppKey

string

The RASP application key.

key-1

ErrorCode

string

The error code.

  • If the request is successful, the ErrorCode parameter is not returned.

  • If the request fails, the ErrorCode parameter is returned. For more information, see the Error codes section in this topic.

InvalidApplication.NotFound

Code

string

The API status code or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirection.

  • 4xx: Client error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the application configuration information was retrieved successfully. Valid values:

  • true: The information was retrieved successfully.

  • false: The information failed to be retrieved.

true

Examples

Success response

JSON format

{
  "RequestId": "01CF26C7-00A3-4AA6-BA76-7E95F2A3****",
  "Message": "success",
  "TraceId": "ac1a0b2215622246421415014e****",
  "Data": {
    "VpcId": "vpc-2ze0i263cnn311nvj****",
    "Readiness": "{\"exec\":{\"command\":[\"curl http://localhost:8080\"]},\"initialDelaySeconds\":20,\"timeoutSeconds\":5}",
    "ConfigMapMountDesc": [
      {
        "Key": "k1",
        "ConfigMapName": "test",
        "MountPath": "/tmp",
        "ConfigMapId": 1
      }
    ],
    "SecurityGroupId": "sg-wz969ngg2e49q5i4****",
    "BatchWaitTime": 10,
    "Jdk": "Open JDK 8",
    "ImageUrl": "docker.io/library/nginx:1.14.2",
    "SlsConfigs": "[{\"logDir\":\"\",\"logType\":\"stdout\"},{\"logDir\":\"/tmp/a.log\"}]",
    "Liveness": "{\"exec\":{\"command\":[\"curl http://localhost:8080\"]},\"initialDelaySeconds\":20,\"timeoutSeconds\":3}",
    "Tags": [
      {
        "Key": "k1",
        "Value": "v1"
      }
    ],
    "PackageUrl": "https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war",
    "PackageType": "War",
    "PreStop": "{\"exec\":{\"command\":[\"cat\",\"/etc/group\"]}}",
    "PackageVersion": "1.0",
    "JarStartArgs": "start",
    "AppName": "demo-app",
    "AppId": "7171a6ca-d1cd-4928-8642-7d5cfe69****",
    "JarStartOptions": "-Dtest=true",
    "Replicas": 2,
    "UpdateStrategy": "{\"type\":\"GrayBatchUpdate\",\"batchUpdate\":{\"batch\":2,\"releaseType\":\"auto\",\"batchWaitTime\":1},\"grayUpdate\":{\"gray\":1}}",
    "MinReadyInstances": 1,
    "MinReadyInstanceRatio": -1,
    "Memory": 2048,
    "Php": "PHP-FPM 7.0",
    "PhpConfig": "k1=v1",
    "PhpConfigLocation": "/usr/local/etc/php/php.ini",
    "PostStart": "{\"exec\":{\"command\":[\"cat\",\"/etc/group\"]}}",
    "TerminationGracePeriodSeconds": 10,
    "CommandArgs": "[\"a\",\"b\"]",
    "NamespaceId": "cn-beijing:test",
    "MountHost": "example.com",
    "TomcatConfig": "{\"port\":8080,\"contextPath\":\"/\",\"maxThreads\":400,\"uriEncoding\":\"ISO-8859-1\",\"useBodyEncodingForUri\":true}",
    "RegionId": "cn-beijing",
    "VSwitchId": "vsw-2ze559r1z1bpwqxwp****",
    "Cpu": 1000,
    "Envs": "[{\"name\":\"TEST_ENV_KEY\",\"value\":\"TEST_ENV_VAR\"}]",
    "MountDesc": [
      {
        "MountPath": "/tmp",
        "NasPath": "/"
      }
    ],
    "EnableAhas": "true",
    "CustomHostAlias": "[{\"hostName\":\"test.host.name\",\"ip\":\"0.0.0.0\"}]",
    "WebContainer": "apache-tomcat-7.0.91",
    "Command": "echo",
    "WarStartOptions": "custom-option",
    "PhpArmsConfigLocation": "/usr/local/etc/php/conf.d/arms.ini",
    "NasId": "AKSN****",
    "OssAkId": "DemoAK****cdefgh",
    "OssAkSecret": "DemoSecretabc****hijklmnopqrst",
    "OssMountDescs": [
      {
        "bucketName": "oss-bucket",
        "bucketPath": "data/user.data",
        "mountPath": "/usr/data/user.data",
        "readOnly": true
      }
    ],
    "EdasContainerVersion": "3.5.3",
    "Timezone": "Asia/Shanghai",
    "AppDescription": "Sample application",
    "EnableGreyTagRoute": false,
    "MseApplicationId": "xxxxxxx@xxxxx",
    "AcrInstanceId": "cri-xxxxxx",
    "AcrAssumeRoleArn": "acs:ram::123456789012****:role/adminrole",
    "ImagePullSecrets": "10",
    "AssociateEip": true,
    "KafkaConfigs": "{\"kafkaEndpoint\":\"10.0.X.XXX:XXXX,10.0.X.XXX:XXXX,10.0.X.XXX:XXXX\",\"kafkaInstanceId\":\"alikafka_pre-cn-7pp2l8kr****\",\"kafkaConfigs\":[{\"logType\":\"file_log\",\"logDir\":\"/tmp/a.log\",\"kafkaTopic\":\"test2\"},{\"logType\":\"stdout\",\"logDir\":\"\",\"kafkaTopic\":\"test\"}]}",
    "ProgrammingLanguage": "java",
    "PvtzDiscovery": "{     \"serviceName\": \"bwm-poc-sc-gateway-cn-beijing-front\",     \"namespaceId\": \"cn-beijing:front\",     \"portAndProtocol\": {         \"18012\": \"TCP\"     },     \"portProtocols\": [         {             \"port\": \"18012\",             \"protocol\": \"TCP\"         }     ],     \"enable\": true }",
    "SwimlanePvtzDiscovery": "{\\\"enable\\\":\\\"false\\\",\\\"namespaceId\\\":\\\"cn-beijing:test\\\",\\\"portAndProtocol\\\":{\\\"2000:TCP\\\":\\\"18081\\\"},\\\"portProtocols\\\":[{\\\"port\\\":2000,\\\"protocol\\\":\\\"TCP\\\",\\\"targetPort\\\":18081}],\\\"pvtzDiscoveryName\\\":\\\"cn-beijing-1421801774382676\\\",\\\"serviceId\\\":\\\"3513\\\",\\\"serviceName\\\":\\\"demo-gray.test\\\"}",
    "MicroRegistration": "\"0\"",
    "NasConfigs": "[{\"mountPath\":\"/test1\",\"readOnly\":false,\"nasId\":\"nasId1\",\"mountDomain\":\"nasId1.cn-shenzhen.nas.aliyuncs.com\",\"nasPath\":\"/test1\"},{\"nasId\":\"nasId2\",\"mountDomain\":\"nasId2.cn-shenzhen.nas.aliyuncs.com\",\"readOnly\":false,\"nasPath\":\"/test2\",\"mountPath\":\"/test2\"}]",
    "Python": "PYTHON 3.9.15",
    "PythonModules": "Flask==2.0",
    "MseApplicationName": "cn-shenzhen-alb-demo-5c****",
    "AppSource": "micro_service",
    "ServiceTags": {
      "key": "tag1"
    },
    "Dotnet": ".NET 8.0",
    "MicroRegistrationConfig": "{\\\"instanceId\\\":\\\"mse-cn-1ls43******\\\",\\\"namespace\\\":\\\"62ee12fb-c279-4da4-be96-21**********\\\"}",
    "EnableIdle": false,
    "EnableNewArms": false,
    "EnableCpuBurst": "true",
    "OidcRoleName": "sae-test",
    "SecretMountDesc": [
      {
        "Key": "task-center",
        "SecretName": "dummy-name-opaque-894",
        "MountPath": "/opt/www/runtime/logs",
        "SecretId": 520
      }
    ],
    "SidecarContainersConfig": [
      {
        "Name": "test",
        "Cpu": 500,
        "Memory": 1024,
        "ImageUrl": "registry.cn-beijing.aliyuncs.com/sae-dev-test/nginx:stable",
        "AcrInstanceId": "cri-fhzlneorxala66ip",
        "Command": "/bin/sh",
        "CommandArgs": "[\\\"-c\\\",\\\"echo \\\\\\\"test\\\\\\\" > /home/nas/test.log && sleep 10000000s\\\"]",
        "Envs": "[{\\\"name\\\":\\\"k1\\\",\\\"value\\\":\\\"c8e3a815-e5d3-4adf-abb3-98b106a607c4\\\"}]",
        "ConfigMapMountDesc": [
          {
            "Key": "key",
            "ConfigMapName": "ConfigMap-test",
            "MountPath": "/mnt/test",
            "ConfigMapId": 7361
          }
        ],
        "EmptyDirDesc": [
          {
            "Name": "sidecar-container",
            "MountPath": "/mnt/cache"
          }
        ],
        "SecretMountDesc": [
          {
            "Key": "test",
            "SecretName": "registry-auth",
            "MountPath": "/tmp",
            "SecretId": 16
          }
        ],
        "Liveness": "{\"exec\":{\"command\":[\"sh\",\"-c\",\"cat /home/admin/start.sh\"]},\"initialDelaySeconds\":30,\"periodSeconds\":30,\"timeoutSeconds\":2}",
        "Readiness": "{\"exec\":{\"command\":[\"sh\",\"-c\",\"cat /home/admin/start.sh\"]},\"initialDelaySeconds\":30,\"periodSeconds\":30,\"timeoutSeconds\":2}",
        "PreStop": "{\"exec\":{\"command\":[\"sh\",\"-c\",\"echo hello\"]}}",
        "PostStart": "{\"exec\":{\"command\":[\"sh\",\"-c\",\"echo hello\"]}}",
        "SlsConfigs": "[{\"logDir\":\"\",\"logType\":\"stdout\"},{\"logDir\":\"/tmp/a.log\"}]",
        "AcrAssumeRoleArn": "acs:ram::1889178085252366:role/qiweiyun2",
        "ImagePullSecrets": "secret-key"
      }
    ],
    "InitContainersConfig": [
      {
        "Name": "init-container",
        "ImageUrl": "registry.cn-shenzhen.aliyuncs.com/sae-serverless-demo/sae-demo:microservice-java-provider-v1.0",
        "Command": "/bin/sh",
        "CommandArgs": "[\"a\",\"b\"]\n",
        "Envs": "[{\"name\":\"TEST_ENV_KEY\",\"value\":\"TEST_ENV_VAR\"}]\n",
        "ConfigMapMountDesc": [
          {
            "Key": "k1\n",
            "ConfigMapName": "test\n",
            "MountPath": "/tmp\n",
            "ConfigMapId": 1
          }
        ],
        "EmptyDirDesc": [
          {
            "Name": "workdir",
            "MountPath": "/usr/local/tomcat/webapps"
          }
        ],
        "SecretMountDesc": [
          {
            "Key": "test",
            "SecretName": "registry-auth",
            "MountPath": "/tmp",
            "SecretId": 16
          }
        ]
      }
    ],
    "CustomImageNetworkType": "internet",
    "ResourceType": "application",
    "BaseAppId": "8c573618-8d72-4407-baf4-f7b64b******",
    "MicroserviceEngineConfig": "{\\\"Enable\\\":true,\\\"MseLosslessRule\\\":{\\\"enable\\\":true,\\\"notice\\\":true,\\\"delayTime\\\":10,\\\"warmupTime\\\":120,\\\"funcType\\\":2,\\\"aligned\\\":false,\\\"related\\\":false,\\\"lossLessDetail\\\":false}}",
    "NewSaeVersion": "pro",
    "ClusterId": "495fc79c-ae61-4600-866d-a09d68******",
    "DiskSize": 20,
    "StartupProbe": "{\\\"exec\\\":{\\\"command\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#!Note: If microservice config is enabled, the application will be automatically injected with the prestop configuration for lossless offline. If you delete this prestop configuration, lossless offline will not be effective.\\\\n echo stop > /tmp/prestop; /home/admin/.tools/curl http://127.0.0.1:54199/offline; sleep 30\\\"]}}",
    "GpuCount": "1",
    "GpuType": "PPU810E",
    "EnablePrometheus": false,
    "IsStateful": false,
    "CmsServiceId": "cms-id",
    "HeadlessPvtzDiscovery": "{\"enable\":\"true\",\"serviceName\":\"svc1\",\"namespaceId\":\"cn-shenzhen\"}",
    "Html": "nginx 1.28",
    "EmptyDirDesc": [
      {
        "Name": "workdir",
        "MountPath": "/usr/local/tomcat/webapps"
      }
    ],
    "DeploymentName": "demo-b0cdce9b-3d1f-4168-b206-b59f348f1a8a",
    "AlbIngressReadinessGate": "default",
    "MaxSurgeInstances": -1,
    "MaxSurgeInstanceRatio": -1,
    "AgentVersion": "4.4.2",
    "EnableNamespaceAgentVersion": false,
    "SlsLogEnvTags": "[]",
    "LokiConfigs": "[]",
    "IdleHour": "[{\"startTime\":\"1:00\",\"endTime\":\"16:00\"}]",
    "Labels": {
      "key": "prod"
    },
    "RaspConfig": [
      {
        "EnableRasp": false,
        "RaspAppName": "sae-test",
        "RaspAppKey": "key-1"
      }
    ]
  },
  "ErrorCode": "InvalidApplication.NotFound",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidApplication.NotFound The current application does not exist. The current application cannot be found.
404 InvalidAppId.NotFound The specified AppId does not exist. The specified AppId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.