All Products
Search
Document Center

Serverless App Engine:CreateApplication

Last Updated:Feb 25, 2026

Create an application.

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:CreateApplication

create

*All Resource

*

None None

Request syntax

POST /pop/v1/sam/app/createApplication HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppName

string

Yes

The application name. It can contain digits, letters, and hyphens (-). It must start with a letter and cannot end with a hyphen (-). The name cannot exceed 36 characters.

test

NamespaceId

string

No

The SAE namespace ID. Only namespaces with names consisting of lowercase letters and hyphens (-) are supported. The name must start with a letter. Obtain the namespace by calling the DescribeNamespaceList API operation.

cn-beijing:test

AppDescription

string

No

The application description. It cannot exceed 1024 characters.

This is a test description.

VpcId

string

No

The VPC corresponding to the SAE namespace. In SAE, a namespace can only correspond to one VPC, and you cannot change it. The first time you create an SAE application in a namespace, a binding relationship forms. Multiple namespaces can correspond to one VPC. If you do not specify this parameter, the system uses the VPC ID bound to the namespace by default.

vpc-bp1aevy8sofi8mh1q****

VSwitchId

string

No

The virtual switch (vSwitch) where the application instance's Elastic Network Interface (ENI) is located. This vSwitch must be within the specified VPC. This vSwitch also has a binding relationship with the SAE namespace. If you do not specify this parameter, the system uses the vSwitch ID bound to the namespace by default.

vsw-bp12mw1f8k3jgygk9****

PackageType

string

Yes

The application package type. Valid values:

  • If you deploy with Java, supported types are FatJar, War, and Image.

  • If you deploy with PHP, supported types 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

  • If you deploy with Python, supported types are PythonZip and Image.

  • If you deploy with .NET Core, supported types are DotnetZip and Image.

    Note

    When you select DotnetZip, Dotnet is the version number of the .NET Core environment. Supported versions are .NET 3.1, .NET 5.0, .NET 6.0, .NET 7.0, and .NET 8.0. The Dotnet, Command, and CommandArgs options are required.

FatJar

PackageVersion

string

No

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

1.0.0

PackageUrl

string

No

The URL of the deployment package. This parameter is required when Package Type is FatJar, War, or PythonZip.

http://myoss.oss-cn-****.aliyuncs.com/my-buc/2019-06-30/****.jar

ImageUrl

string

No

The image address. This parameter is required when Package Type is Image.

registry.cn-hangzhou.aliyuncs.com/sae_test/ali_sae_test:0.0.1

Jdk

string

No

The JDK version that the deployment package depends on. Supported versions:

  • 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 Image.

Open JDK 8

WebContainer

string

No

The Tomcat version that the WebContainer deployment package depends on. Supported versions:

  • apache-tomcat-7.0.91

  • apache-tomcat-8.5.42

This parameter is not supported when Package Type is Image.

apache-tomcat-7.0.91

Cpu

integer

No

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

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

1000

Memory

integer

No

The memory required for each instance, in MB. It cannot be 0. It has a one-to-one correspondence with CPU. Currently, only the following defined specifications are supported:

  • 1024: Corresponds to 500 millicores and 1000 millicores CPU.

  • 2048: Corresponds to 500, 1000 millicores, and 2000 millicores CPU.

  • 4096: Corresponds to 1000, 2000 millicores, and 4000 millicores CPU.

  • 8192: Corresponds to 2000, 4000 millicores, and 8000 millicores CPU.

  • 12288: Corresponds to 12000 millicores CPU.

  • 16384: Corresponds to 4000, 8000 millicores, and 16000 millicores CPU.

  • 24576: Corresponds to 12000 millicores CPU.

  • 32768: Corresponds to 16000 millicores CPU.

  • 65536: Corresponds to 8000, 16000, and 32000 millicores CPU.

  • 131072: Corresponds to 32000 millicores CPU.

1024

Replicas

integer

Yes

The initial number of instances.

1

Command

string

No

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

command:
      - echo
      - abc
      - >
      - file0

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

Important This option is required when PackageType is DotnetZip.

echo

CommandArgs

string

No

The image start command parameters. These are the parameters required by the Command parameter. Format:

["a","b"]

In the example, CommandArgs=["abc", ">", "file0"]. Convert ["abc", ">", "file0"] to a string type, with the format as a JSON array. If this parameter is not needed, do not specify it.

Important This option is required when PackageType is DotnetZip.

["a","b"]

Envs

string

No

Container environment variable parameters. Support custom configurations or referencing configuration items. To reference a configuration item, create a ConfigMap instance first. For more information, see CreateConfigMap. Valid values:

  • Custom configuration
    • name: The environment variable name.

    • value: The environment variable value. This has a higher priority than valueFrom.

  • Reference configuration item (valueFrom)
    • name: The environment variable name. 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 this to configMapRef.
      • configMapId: The configuration item ID.

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

[ { "name": "sae-sys-configmap-all-hello", "valueFrom": { "configMapRef": { "configMapId": 100, "key": "" } } }, { "name": "hello", "valueFrom": { "configMapRef": { "configMapId": 101, "key": "php-fpm" } } }, { "name": "envtmp", "value": "newenv" } ]

CustomHostAlias

string

No

Custom Host mapping within the container. Valid values:

  • hostName: The domain name or hostname.

  • ip: The IP address.

[{"hostName":"samplehost","ip":"127.0.0.1"}]

JarStartOptions

string

No

JAR package startup options for the application. The application's default start command is: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs

-Xms4G -Xmx4G

JarStartArgs

string

No

JAR package startup parameters for the application. The application's default start command is: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs

custom-args

Liveness

string

No

Container health check. Containers that fail the health check are shut down and recovered. Supported methods:

  • 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

Select only one method for the health check.

Parameter description:

  • exec.command: Set the health check command.

  • httpGet.path: The access path.

  • httpGet.scheme: HTTP or HTTPS.

  • httpGet.isContainKeyWord: true means the keyword is included, false means the keyword is not included. If this field is missing, advanced features are not used.

  • httpGet.keyWord: The custom keyword. Do not omit the isContainKeyWord field when using it.

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

  • initialDelaySeconds: Set the health check delay detection time. Default is 10 seconds.

  • periodSeconds: Set the health check period. Default is 30 seconds.

  • timeoutSeconds: Set the health check timeout duration. Default is 1 second. If you set it to 0 or do not set it, the default timeout is 1 second.

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

Readiness

string

No

Application startup status check. Containers that fail multiple health checks are shut down and restarted. Containers that do not pass the health check will not receive SLB traffic. Supported methods are exec, httpGet, and tcpSocket. For examples, see the Liveness parameter.

Note

Select only one method for the health check.

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

Deploy

boolean

No

Whether to deploy immediately. Valid values:

  • true: Default value. Deploy immediately.

  • false: Deploy later.

true

EdasContainerVersion

string

No

The application runtime environment version in the HSF framework, such as the Ali-Tomcat container.

3.5.3

Timezone

string

No

The time zone. Default is Asia/Shanghai.

Asia/Shanghai

SlsConfigs

string

No

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

  • Use SLS resources automatically created by SAE: [{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}].

  • 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 Project on SLS.

  • logDir: The log path.

  • logType: The log type. stdout indicates container standard output logs; you can set only one such entry. If you do not set this, the system collects file logs.

  • logstoreName: The name of the Logstore on SLS.

  • logtailName: The name of the Logtail on SLS. If you do not specify this, the system creates a new Logtail.

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

Note

Projects automatically created with an application are deleted when the application is deleted. Therefore, when selecting an existing Project, do not select a Project automatically created by SAE.

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

NasId

string

No

Do not configure this field; configure NasConfigs instead. The ID of the mounted NAS. It must be in the same region as the cluster. It must have available mount target creation quotas, or its mount target must already be on a vSwitch within the VPC. If you do not specify this parameter and the mountDescs field exists, the system automatically purchases a NAS and mounts it to a vSwitch within the VPC by default.

If the configuration has not changed during deployment, you do not need to set this parameter (that is, the request does not need to include the NASId field). To clear the NAS configuration, set the value of this field to an empty string in the request (that is, the value of the NASId field in the request is "").

KSAK****

MountHost

string

No

Do not configure this field; configure NasConfigs instead. The NAS mount target within the application VPC. If the configuration has not changed during deployment, you do not need to set this parameter (that is, the request does not need to include the MountHost field). To clear the NAS configuration, set the value of this field to an empty string in the request (that is, the value of the MountHost field in the request is "").

example.com

MountDesc

string

No

Do not configure this field; configure NasConfigs instead. The NAS mount description. If the configuration has not changed during deployment, you do not need to set this parameter (that is, the request does not need to include the MountDesc field). To clear the NAS configuration, set the value of this field to an empty string in the request (that is, the value of the MountDesc field in the request is "").

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

PreStop

string

No

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

PostStart

string

No

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

WarStartOptions

string

No

Set the startup command for WAR package deployed applications. The procedure is the same as configuring the startup command for image deployments. For more information, see Set the startup command.

CATALINA_OPTS=\"$CATALINA_OPTS $Options\" catalina.sh run

ConfigMapMountDesc

string

No

The ConfigMap mount description. Use configuration items created on the namespace configuration item page to inject configuration information into the container. Parameter description:

  • configMapId: The ConfigMap instance ID. Obtain it by calling the ListNamespacedConfigMaps API operation.

  • key: The key value.

Note

You can mount all keys by passing the sae-sys-configmap-all parameter.

  • mountPath: The mount path.

[{"configMapId":16,"key":"test","mountPath":"/tmp"}]

SecurityGroupId

string

No

The security group ID.

sg-wz969ngg2e49q5i4****

AutoConfig

boolean

No

Whether to automatically configure the network environment. Valid values:

  • true: SAE automatically configures the network environment when creating an application. The values of NamespaceId, VpcId, vSwitchId, and SecurityGroupId are ignored.

  • false: SAE manually configures the network environment when creating an application.

Note

If you select true, other NamespaceId values passed are ignored.

true

TerminationGracePeriodSeconds

integer

No

The graceful shutdown timeout duration. Default is 30 seconds. Valid values are 1 to 300.

30

PhpArmsConfigLocation

string

No

The mount path for PHP application monitoring. Ensure that the PHP server loads the configuration file from 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

PhpConfigLocation

string

No

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

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

PhpConfig

string

No

The content of the PHP configuration file.

k1=v1

TomcatConfig

string

No

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

  • port: The port range is 1024 to 65535. Ports less than 1024 require root permissions to operate. Because the container is configured with Admin permissions, specify a port greater than 1024. If you do not configure this, the default is 8080.

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

  • maxThreads: Configure the connection pool size. Default is 400.

  • uriEncoding: The encoding format for Tomcat, including UTF-8, ISO-8859-1, GBK, and GB2312. If you do not set this, the default is ISO-8859-1.

  • useBodyEncodingForUri: Whether to use BodyEncoding for URL. Default is true.

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

OssMountDescs

string

No

OSS mount description. Parameter description:

  • bucketName: The Bucket name.

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

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

  • readOnly: Whether the container path has read permission for the mounted directory resource. Valid values:
    • true: Read-only permission.

    • false: Read and write permission.

[{"bucketName": "oss-bucket", "bucketPath": "data/user.data", "mountPath": "/usr/data/user.data", "readOnly": true}]

OssAkId

string

No

The AccessKey ID for OSS read and write operations.

xxxxxx

OssAkSecret

string

No

The AccessKey Secret for OSS read and write operations.

xxxxxx

Php

string

No

The PHP version that the PHP deployment package depends on. Images do not support this.

PHP-FPM 7.0

AcrInstanceId

string

No

The Container Registry Enterprise Edition (ACR Enterprise Edition) instance ID. This parameter is required when ImageUrl is a Container Registry Enterprise Edition image.

cri-xxxxxx

AcrAssumeRoleArn

string

No

The ARN of the RAM role required to pull images across Alibaba Cloud accounts. For more information, see Authorize cross-account access using a RAM role.

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

ImagePullSecrets

string

No

The ID of the corresponding secret.

10

AssociateEip

boolean

No

Whether to bind an Elastic IP address (EIP). Valid values:

  • true: Bind.

  • false: Do not bind.

true

ProgrammingLanguage

string

No

The technology stack language for creating the application. Valid values:

  • java: Java language.

  • php: PHP language.

  • python: Python language.

  • dotnet: .NET Core language.

  • other: Multi-language, such as C++, Go, and Node.js.

java

KafkaConfigs

string

No

The summary configuration for collecting logs to Kafka. Valid values:

  • kafkaEndpoint: The service registration address for the Kafka API.

  • kafkaInstanceId: The Kafka instance ID.

  • kafkaConfigs: The summary configuration for single or multiple logs. For valid values, 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"}]}

PvtzDiscoverySvc

string

No

Enable K8s Service service discovery. Valid values:

  • serviceName: The service name. Format: custom-namespace ID. The suffix -namespace ID cannot be customized; specify it based on the application's namespace. For example, if you select the default namespace in the China (Beijing) region, it is -cn-beijing-default.

  • namespaceId: The namespace ID.

  • portProtocols: The port and protocol. The port range is [1, 65535]. Supported protocols are TCP and UDP.

  • portAndProtocol: The port and protocol. The port range is [1, 65535]. Supported protocols are TCP and UDP. portProtocols is recommended. If portProtocols is set, only portProtocols takes effect.

  • enable: Enable K8s Service service discovery.

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

MicroRegistration

string

No

Select the Nacos registry. Valid values:

  • 0: SAE built-in Nacos.

  • 1: User-managed Nacos.

  • 2: MSE Professional Edition Nacos.

"0"

MicroRegistrationConfig

string

No

The registry configuration information.

{\"instanceId\":\"mse-cn-zvp2bh6h70r\",\"namespace\":\"4c0aa74f-57cb-423c-b6af-5d9f2d0e3dbd\"}

NasConfigs

string

No

The configuration for mounting NAS. Valid values:

  • mountPath: The container mount path.

  • readOnly: If the value is false, it indicates read and write permission.

  • nasId: The NAS ID.

  • mountDomain: The container mount target address. For more information, see DescribeMountTargets.

  • nasPath: The relative file directory of 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

No

The Python environment. Supports PYTHON 3.9.15.

PYTHON 3.9.15

PythonModules

string

No

Custom installation of module dependencies. By default, the system installs dependencies defined in requirements.txt in the root directory. If you do not configure or customize packages, you can specify the dependencies to install.

Flask==2.0

Dotnet

string

No

The version number of the .NET framework:

  • .NET 3.1

  • .NET 5.0

  • .NET 6.0

  • .NET 7.0

  • .NET 8.0

.NET 3.1

EnableEbpf

string

No

Enable application monitoring for non-Java applications based on eBPF technology. Valid values:

  • true: Enable.

  • false: Disable. Default value.

false

SaeVersion

string

No

The SAE version. Supported versions:

  • v1

  • v2

v1

AppSource

string

No

Select micro_service for a microservice application.

micro_service

BaseAppId

string

No

The base application ID.

ee99cce6-1c8e-4bfa-96c3-3e2fa9de8a41

ServiceTags

string

No

The grayscale tags for application configuration.

{\"alicloud.service.tag\":\"g1\"}

EnableNewArms

boolean

No

Whether to enable new ARMS features:

  • true: Enable.

  • false: Do not enable.

false

EnableCpuBurst

boolean

No

Whether to enable the CPU Burst feature:

  • true: Enable.

  • false: Do not enable.

true

OidcRoleName

string

No

Set the identity authentication service RAM role.

Note

Create an OpenID Connect (OIDC) identity provider and an identity provider role in the same region beforehand. For more information, seeCreate an OIDC identity provider andCreate a role SSO identity provider.

sae-test

SidecarContainersConfig

array

No

Container configuration information.

SidecarContainerConfig

No

Container configuration information.

SecretMountDesc

string

No

The Secret mount description. Use secrets created on the namespace secret page to inject secret information into the container. Parameter description:

  • secretId: The secret instance ID. Obtain it by calling the ListSecrets API operation.

  • key: The key value.

Note

You can mount all keys by passing the sae-sys-secret-all parameter.

  • mountPath: The mount path.

[{“secretId":10,”key":"test","mountPath":"/tmp"}]

EnableSidecarResourceIsolated

boolean

No

Whether to enable Sidecar resource isolation:

  • true: Enable isolation.

  • false: Do not enable isolation.

true

CustomImageNetworkType

string

No

The custom image type. If it is not a custom image, set it to an empty string:

  • internet: Public network image.

  • intranet: Private network image.

internet

ResourceType

string

No

The resource type. Supports NULL (default), default, and haiguang (Haiguang server) types.

NULL

NewSaeVersion

string

No

The application version:

  • lite: Lightweight Edition

  • std: Standard Edition

  • pro: Professional Edition

pro

MicroserviceEngineConfig

string

No

Configure microservice administration features.

  • Whether to enable microservice administration (enable):

    • true: Enable.

    • false: Do not enable.

  • Configure graceful start and graceful shutdown (mseLosslessRule):

    • delayTime: The delay time.

    • enable: Whether to enable the graceful start feature. true means enabled, false means not enabled.

    • notice: Whether to enable the notification feature. true means enabled, false means enabled.

    • warmupTime: The duration of traffic prefetch, in seconds.

{"enable": true,"mseLosslessRule": {"delayTime": 0,"enable": false,"notice": false,"warmupTime": 120}}

DiskSize

integer

No

The disk storage size, in GB.

50

InitContainersConfig

array

No

Initialization container configuration.

InitContainerConfig

No

Initialization container configuration.

GpuConfig

string

No

StartupProbe

string

No

Enable application startup probes.

  • Successful check: Indicates that the application started successfully. If you configured Liveness and Readiness checks, the system performs Liveness and Readiness checks after the application starts successfully.

  • Failed check: Indicates that the application failed to start. The system reports an exception and automatically restarts the application.

Note
  • Supported methods are exec, httpGet, and tcpSocket. For examples, see the Liveness parameter.

  • Select only one method for the health check.

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

IsStateful

boolean

No

Whether it is a stateful application.

EnablePrometheus

boolean

No

Whether to enable Prometheus custom metric collection.

false

HeadlessPvtzDiscoverySvc

string

No

K8s Headless Service service discovery.

  • serviceName: The service name.

  • namespaceId: The namespace ID.

{\"serviceName\":\"leaf-test-headless\",\"namespaceId\":\"cn-zhangjiakou:prod\"}

Html

string

No

The Nginx version.

  • nginx 1.20

  • nginx 1.22

  • nginx 1.24

  • nginx 1.26

  • nginx 1.28

nginx 1.28

EmptyDirDesc

string

No

Shared temporary storage configuration.

[{\"name\":\"workdir\",\"mountPath\":\"/usr/local/tomcat/webapps\"}]

AgentVersion

string

No

The AliyunAgent version.

4.4.2

EnableNamespaceAgentVersion

boolean

No

Whether to reuse the namespace Agent version configuration.

true

EnableNamespaceSlsConfig

boolean

No

Whether to reuse the namespace SLS log configuration.

true

SlsLogEnvTags

string

No

SLS log tags.

LokiConfigs

string

No

Response elements

Element

Type

Description

Example

object

The created application information.

RequestId

string

The request ID.

91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

Message

string

Additional information. Valid values:

  • If the request is normal, success is returned.

  • If the request is abnormal, a specific error code is returned.

success

TraceId

string

The trace ID, used for term query of call information.

0a98a02315955564772843261e****

Data

object

The returned result.

ChangeOrderId

string

The returned release order ID, used to query the task execution status.

01db03d3-3ee9-48b3-b3d0-dfce2d88****

AppId

string

The ID of the successfully created application.

017f39b8-dfa4-4e16-a84b-1dcee4b1****

ErrorCode

string

The error code. Valid values:

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

  • If the request fails, the ErrorCode field is returned. For more information, see the error code list in this topic.

Code

string

The API status or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirection.

  • 4xx: Request error.

  • 5xx: Server error.

200

Success

boolean

Whether the application is created successfully. Valid values:

  • true: Created successfully.

  • false: Failed to create.

true

Examples

Success response

JSON format

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": {
    "ChangeOrderId": "01db03d3-3ee9-48b3-b3d0-dfce2d88****",
    "AppId": "017f39b8-dfa4-4e16-a84b-1dcee4b1****"
  },
  "ErrorCode": "空",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 Application.MissingJdk Your application must at least contain a JDK component.
400 InvalidPackageType.NotFound The package type must be War, FatJar, or Image.
400 InvalidParameter.NotEmpty You must specify the parameter %s.
400 InvalidParameter.Obviously The specified parameter is invalid {%s}.
400 JarApplication.MissingJdk A FatJar application must contain JDK.
400 NoAvailableCluster.NotFound No clusters are available for the current region.
400 NoComputeResourceQuota.Exceed Your compute resource is insufficient. Please contact us to raise the quota.
400 PandoraApplication.MissingJdk The Pandora application is missing a JDK component.
400 PandoraApplication.OnlyJdk A Pandora application only requires JDK component.
400 InvalidParameter.WithMessage The parameter is invalid {%s}: %s
400 InvalidComponent.NotFound The current component (such as JDK, Tomcat, or EDASWebContainer) does not exist.
400 InvalidHostnameIp.Invalid The hostname and/or IP is invalid: Hostname [%s], IP [%s].
400 InvalidInstanceSpecification.Unsupported The instance specification is not supported: CPU [%s], memory [%s].
400 InvalidServerlessRegion.Unsupported The current region is not supported: %s
400 WarApplication.MissingJdkWebcontainer A War application must contain JDK and Tomcat.
400 InvalidNamespace.WithUppercase This namespace does not support creating SAE apps because it contains uppercase letters.
400 LogService.ConfigQuotaExceed The maximum number of Log Service configs is exceeded. The maximum number of Log Service configs is exceeded, please join the DingTalk group 32874633 for technical support.
400 LogService.InternalError An exception occurred while calling Log Service. Please submit a ticket to solve the problem. An exception occurred while calling log service. please join the DingTalk group 32874633 for technical support.
400 LogService.LogDirInvalid The log collection path is invalid. The log collection path is invalid.
400 LogService.NotAvailable Log Service is unavailable. Please activate Log Service first. The log service is not available. Please open the log service first.
400 LogService.ProjectNumQuotaExceed The maximum number of Log Service projects is exceeded. The maximum number of Log Service projects is exceeded, please join the DingTalk group 32874633 for technical support.
400 user.indebt The user has an outstanding payment.
400 NoComputeResourceQuota.App.Exceed You can create %s instances for each application. Please submit a ticket to raise the quota. You can create %s instances for each application. please join the DingTalk group 32874633 for technical support.
400 NoComputeResourceQuota.User.Exceed Your account is limited to create %s instances. Please submit a ticket to raise the quota. Your account is limited to create %s instances. please join the DingTalk group 32874633 for technical support.
400 System.Upgrading The system is being upgraded. Please try again later.
400 VolumnPath.Conflict Conflict between log collection directory and persistent storage directory. Conflict between log collection directory and persistent storage directory.
400 MountConflict.ConfigMap Conflict detected for ConfigMap path %s.
400 NotFound.ConfigMap The ConfigMap object (ID: %s) does not exist.
400 NotFound.ConfigMapKey The key %s of ConfigMap object (ID: %s) does not exist.
400 Sls.Config.Mixed.Multi.Project The specified Config contains multiple projects.
400 Sls.Config.User.Defined.Missing.Logstore.Info The specified Config is invalid. Both Project and Logstore must be specified.
400 Sls.Config.User.Defined.Missing.Project.Info The specified Config is invalid. Both Project and Logstore must be specified.
400 Sls.Logstore.Name.Invalid The specified name of Logstore is invalid. The Logstore name must not contain the prefix "sae-".
400 Sls.Logstore.User.Defined.Not.Exist The user defined Logstore does not exist.
400 Sls.Project.Name.Invalid The specified project name is invalid. The project name must not contain the prefix "sae-".
400 Sls.Project.User.Defined.Not.Exist The user defined project does not exist.
400 InvalidImageUrl.AcrInstanceId.Domain.NotMatch The specified domain of ImageUrl does not match AcrInstanceId domains.
400 PhpApplication.MissingPhpRuntime A PHP application must contain PHP Runtime.
400 InvalidParameter.FileName The application deployment package name is invalid. This name can contain only alphanumeric characters, hyphens (-), and underscores (_). For deploying java package, you can upload JAR files only if the selected deployment version supports JAR file. Otherwise, upload WAR files only. For deploying php package, you can upload ZIP files only if the selected deployment version supports ZIP file.
400 Sls.Logtail.Name.Invalid The specified name of Logtail is invalid. The Logtail name must not contain the prefix sae-.
400 vswitch.not.exist The specified vSwitch does not exist. The specified vSwitch does not exist. Please change the vSwitch.
400 InvalidImageUrl.MissingAcrInstanceId The specified domain of ImageUrl is from ACREE, but you are not specified AcrInstanceId.
400 EnvFromSecretIdConflict.AlreadyExist The specified SecretId [%s] already exist in the specified Envs.
400 MountConflict.Secret Conflict detected for Secret path %s. Secret mount path% s has conflict.
404 Associate.Eip.Not.Enough No sufficient EIPs are available.
404 InvalidNamespaceId.NotFound The specified NamespaceId does not exist.
404 InvalidVpcId.NotFound The specified VpcId does not exist.
404 InvalidAcrInstanceId.NotFound The specified AcrInstanceId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.