All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::SAE::Application

Last Updated:Oct 17, 2025

The ALIYUN::SAE::Application type is used to create an application in Serverless App Engine (SAE).

Syntax

{
  "Type": "ALIYUN::SAE::Application",
  "Properties": {
    "Timezone": String,
    "AppDescription": String,
    "MountDesc": String,
    "NasId": String,
    "WarStartOptions": String,
    "Liveness": String,
    "Memory": Integer,
    "WebContainer": String,
    "SlsConfigs": String,
    "Cpu": Integer,
    "Deploy": Boolean,
    "PackageVersion": String,
    "AppName": String,
    "Jdk": String,
    "JarStartArgs": String,
    "PreStop": String,
    "Readiness": String,
    "PackageType": String,
    "CommandArgs": String,
    "Envs": String,
    "VSwitchId": String,
    "ImageUrl": String,
    "PostStart": String,
    "JarStartOptions": String,
    "MountHost": String,
    "Replicas": Integer,
    "CustomHostAlias": String,
    "VpcId": String,
    "Tags": List,
    "SecurityGroupId": String,
    "Command": String,
    "EdasContainerVersion": String,
    "PackageUrl": String,
    "NamespaceId": String,
    "AssociateEip": Boolean,
    "AcrInstanceId": String,
    "OssAkId": String,
    "ProgrammingLanguage": String,
    "OssAkSecret": String,
    "Python": String,
    "BaseAppId": String,
    "EnableEbpf": String,
    "PhpArmsConfigLocation": String,
    "PhpConfig": String,
    "MicroRegistrationConfig": String,
    "TerminationGracePeriodSeconds": Integer,
    "ConfigMapMountDesc": String,
    "PvtzDiscoverySvc": String,
    "AcrAssumeRoleArn": String,
    "TomcatConfig": String,
    "AppSource": String,
    "PythonModules": String,
    "NasConfigs": String,
    "MicroRegistration": String,
    "ServiceTags": String,
    "ImagePullSecrets": String,
    "AutoConfig": Boolean,
    "KafkaConfigs": String,
    "Php": String,
    "OssMountDescs": List,
    "PhpConfigLocation": String,
    "SaeVersion": String,
    "NewSaeVersion": String,
    "EnableNewArms": Boolean,
    "EnableSidecarResourceIsolated": Boolean,
    "SidecarContainersConfig": List,
    "InitContainersConfig": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AppName

String

Yes

No

The application name.

The name can be up to 36 characters in length. It must start with a letter and can contain letters, digits, and hyphens (-).

Cpu

Integer

Yes

No

The number of CPU cores required for each instance. Only instances with defined specifications are supported.

Valid values:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

Unit: millicores.

Memory

Integer

Yes

No

The memory size required for each instance. Only instances with defined specifications are supported.

The memory size is coupled with the CPU cores. The following specifications are supported:

  • 1024 MB of memory: Corresponds to 500 millicores of CPU.

  • 2048 MB of memory: Corresponds to 500 or 1000 millicores of CPU.

  • 4096 MB of memory: Corresponds to 1000 or 2000 millicores of CPU.

  • 8192: Specifies a CPU allocation of 2,000 or 4,000 millicores.

  • 16384: Represents a CPU with 4,000 to 8,000 millicores.

  • 32768 corresponds to 16,000 millicores of CPU.

  • 65536 MB of memory: Corresponds to 8000, 16000, or 32000 millicores of CPU.

  • 131072: Represents 32,000 CPU millicores.

Unit: MB.

Replicas

Integer

Yes

No

The initial number of instances.

None

PackageType

String

Yes

No

The type of the application package.

Valid values:

  • FatJar

  • War

  • Image

Timezone

String

No

Yes

The time zone.

Default value: Asia/Shanghai.

AppDescription

String

No

No

The description of the application.

The description can be up to 1,024 characters in length.

MountDesc

String

No

Yes

The mount description.

None

NasId

String

No

Yes

The ID of the NAS file system to mount.

The NAS file system must have an available mount target quota, or its mount target must be on a vSwitch in the VPC. If you do not specify this parameter but specify the MountDesc parameter, a NAS file system is automatically purchased and mounted to a vSwitch in the VPC.

WarStartOptions

String

No

Yes

The startup options for the WAR package.

The default startup command is: java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

Liveness

String

No

Yes

The container health check. A container that fails the health check is restarted.

Currently, only commands can be run in a container to perform health checks. Example: {"exec":{"command":["sleep","5s"]},"initialDelaySeconds":10,"timeoutSeconds":11}.

WebContainer

String

No

Yes

The version of the Tomcat container that the deployment package depends on.

This parameter is not supported for images.

SlsConfigs

String

No

Yes

The file log collection configuration.

None

Deploy

Boolean

No

No

Specifies whether to deploy the application immediately.

Valid values:

  • true: Deploy immediately.

  • false (default): Do not deploy immediately.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see Tags syntax and Tags properties.

PackageVersion

String

No

Yes

The version number of the deployment package.

This parameter is required when PackageType is set to War or FatJar.

Jdk

String

No

Yes

The version of the JDK that the deployment package depends on.

This parameter is not supported for images.

JarStartArgs

String

No

Yes

The startup arguments for the JAR package.

The default startup command is: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

PreStop

String

No

Yes

The script to run before the container is stopped.

The script to run before the container is stopped. Example: {"exec":{"command":"cat","/etc/group"}}.

Readiness

String

No

Yes

The script for the readiness check.

The script for the readiness check. Example: {"exec":{"command":["sleep","6s"]},"initialDelaySeconds":15,"timeoutSeconds":12}.

A container that fails the health check multiple times is restarted. A container that does not pass the health check does not receive traffic from SLB.

CommandArgs

String

No

Yes

The arguments for the image startup command.

None

Envs

String

No

Yes

The environment variables for the container.

The format for the environment variables is: [{"name":"envtmp","value":"0"}].

  • name: The name of the environment variable.

  • value: The value of or a reference to the environment variable.

VSwitchId

String

No

No

The vSwitch where the ENI of the application instance is located.

The vSwitch must be in the specified VPC. The vSwitch is bound to the EDAS namespace. If you do not specify this parameter, the VSwitchId bound to the namespace is used.

ImageUrl

String

No

Yes

The address of the image.

You can configure an image address only for applications of the Image type.

PostStart

String

No

Yes

The script to run after the container starts.

The script to run after the container starts. Example: {"exec":{"command":"cat","/etc/group"}}.

JarStartOptions

String

No

Yes

The startup options for the JAR package.

The default startup command is: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

MountHost

String

No

Yes

The mount target of the NAS file system in the VPC.

None

CustomHostAlias

String

No

Yes

The custom host mapping in the container.

The format for the custom host mapping is: [{"hostName":"samplehost","ip":"127.0.XX.XX"}] .

  • hostName: The domain name or hostname.

  • ip: The IP address.

VpcId

String

No

No

The VPC corresponding to the SAE namespace.

In SAE, a namespace can correspond to only one VPC and cannot be changed. The first time you create an SAE application in a namespace, a binding relationship is formed. Multiple namespaces can correspond to one VPC. If you do not fill in this parameter, the VpcId bound to the namespace is used by default.

SecurityGroupId

String

No

No

The security group ID.

None

Command

String

No

Yes

The startup command for the image.

The command must be an executable object that exists in the container. For example: sleep.

Setting this command will override the original startup command of the image.

EdasContainerVersion

String

No

Yes

The runtime environment used by the EDAS Pandora application.

None

PackageUrl

String

No

Yes

The address of the deployment package.

This parameter is valid when PackageType is set to War or FatJar.

NamespaceId

String

Yes

No

The ID of the EDAS namespace.

Only namespaces whose names consist of lowercase letters and hyphens (-) are supported. The name must start with a lowercase letter.

AssociateEip

Boolean

No

No

Specifies whether to bind an EIP.

Valid values:

  • true: Bind.

  • false: Do not bind.

AcrInstanceId

String

No

Yes

The ID of the ACR Enterprise instance.

None

OssAkId

String

No

No

The AccessKey ID for reading from and writing to OSS.

None

ProgrammingLanguage

String

No

No

The technology stack language for creating the application.

Valid values:

  • java: Java language.

  • php: PHP language.

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

OssAkSecret

String

No

No

The AccessKey secret for reading from and writing to OSS.

None

Python

String

No

No

The Python environment.

PYTHON 3.9.15 is supported.

BaseAppId

String

No

No

The ID of the base application.

None

EnableEbpf

String

No

No

Enables application monitoring for non-Java applications based on eBPF technology.

Valid values:

  • true: Enable.

  • false: Disable. This is the default value.

PhpArmsConfigLocation

String

No

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 manage the configuration content. SAE automatically renders the correct configuration file.

PhpConfig

String

No

No

The content of the PHP configuration file.

None

MicroRegistrationConfig

String

No

No

The configuration information for the registry.

None

TerminationGracePeriodSeconds

Integer

No

No

The timeout period for graceful shutdown.

The default value is 30. Unit: seconds. The value must be in the range of 1 to 300.

ConfigMapMountDesc

String

No

No

The description of the ConfigMap mount.

Use the configuration items created on the namespace configuration page to inject configuration information into the container. The parameters are as follows:

  • configMapId: The ID of the ConfigMap instance.

  • key: The key value.

  • mountPath: The mount path.

Note

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

PvtzDiscoverySvc

String

No

No

Enables K8s Service registration and discovery.

The parameters are as follows:

  • serviceName: The name of the service, which must be in the format custom-namespace ID. The suffix -namespace ID cannot be customized and must be based on the namespace where the application resides. For example, for an application in the default namespace of the China North 2 (Beijing) region, the suffix is -cn-beijing-default.

  • namespaceId: The namespace ID.

  • portProtocols: The port and protocol. The port value must be in the range of 1 to 65535. The protocol supports TCP and UDP.

  • portAndProtocol: The port and protocol. The port value must be in the range of 1 to 65535. The protocol supports TCP and UDP. We recommend that you use portProtocols. If you set both portProtocols and portAndProtocol, only portProtocols takes effect.

  • enable: Enables K8s Service registration and discovery.

AcrAssumeRoleArn

String

No

No

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

For more information, see Grant permissions to a RAM role.

TomcatConfig

String

No

No

The Tomcat file configuration.

Set to "" or "{}" to delete the configuration:

  • port: The port number. The value must be in the range of 1024 to 65535. Ports smaller than 1024 require root permissions. Because the container is configured with admin permissions, specify a port number greater than 1024. If you do not configure this parameter, the default value is 8080.

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

  • maxThreads: The size of the connection pool. The default size 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: Specifies whether to use BodyEncoding for URL. The default is true.

AppSource

String

No

No

The microservice application.

Valid value:

  • micro_service

PythonModules

String

No

No

The custom installation module dependencies.

By default, dependencies defined in the requirements.txt file in the root directory are installed. If no package is configured or customized, you can specify the dependencies to install.

NasConfigs

String

No

No

The configuration for mounting NAS.

The parameters are as follows:

  • mountPath: The container mount path.

  • readOnly: A value of false indicates read and write permissions.

  • nasId: The NAS ID.

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

  • nasPath: The relative file directory in NAS.

MicroRegistration

String

No

No

Select the Nacos registry.

Valid values:

  • 0: SAE built-in Nacos.

  • 1: User-created Nacos.

  • 2: MSE Nacos.

ServiceTags

String

No

No

The grayscale tags configured for the application.

None

ImagePullSecrets

String

No

No

The corresponding secret ID.

None

AutoConfig

Boolean

No

No

Specifies whether to automatically configure the network environment.

Valid values:

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

  • false: Manually configure the network environment when creating the application.

Note

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

KafkaConfigs

String

No

No

The summary of configurations for collecting logs to Kafka.

The parameters are as follows:

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

  • kafkaInstanceId: The ID of the Kafka instance.

  • kafkaConfigs: The summary of configurations for one or more logs. For information about the values, see the KafkaConfigs request parameter in this topic.

Php

String

No

No

The PHP version that the PHP deployment package depends on.

None.

OssMountDescs

List

No

No

The OSS mount description.

The parameters are as follows:

  • bucketName: The name of the bucket.

  • 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 already exists, it is overwritten. If the path does not exist, it is created.

  • readOnly: Specifies whether the container path has read permission for the mounted directory resources. Valid values:

    • true: Read-only permission.

    • false: Read-write permission.

PhpConfigLocation

String

No

No

The mount path for the PHP application startup configuration.

Ensure that the PHP server uses this configuration file to start.

SaeVersion

String

No

No

The SAE version.

Supported versions:

  • v1

  • v2

NewSaeVersion

String

No

No

The new SAE version.

Valid values:

  • lite

  • std

  • pro

EnableNewArms

Boolean

No

No

Specifies whether to enable the new Arms feature.

Valid values:

  • true: Enable

  • false: Do not enable

EnableSidecarResourceIsolated

Boolean

No

Yes

Specifies whether to enable resource isolation for sidecar containers.

Valid values:

  • true: Isolate resources.

  • false: Do not isolate resources.

SidecarContainersConfig

List

No

Yes

The configurations of the sidecar containers.

For more information, see SidecarContainersConfig properties.

InitContainersConfig

List

No

Yes

The configurations of the init containers.

For more information, see InitContainersConfig properties.

SidecarContainersConfig syntax

"SidecarContainersConfig": [
  {
    "CommandArgs": String,
    "AcrInstanceId": String,
    "Memory": Integer,
    "Name": String,
    "EmptyDirDesc": String,
    "Command": String,
    "ImageUrl": String,
    "Cpu": Integer,
    "Envs": String,
    "ConfigMapMountDesc": String
  }
]  

SidecarContainersConfig properties

Property

Type

Required

Editable

Description

Constraint

CommandArgs

String

No

Yes

The parameters for the command run in the init container.

None

AcrInstanceId

String

No

Yes

The ID of the ACR instance.

None

Memory

Integer

Yes

Yes

The amount of memory allocated to the sidecar container.

None

Name

String

Yes

Yes

The name of the sidecar container.

None

EmptyDirDesc

String

No

Yes

The description of the emptyDir volume mount.

None

Command

String

No

Yes

The command to be run in the init container.

None

ImageUrl

String

No

Yes

The address of the image.

You can configure an image address only for applications of the Image type.

Cpu

Integer

Yes

Yes

The number of CPU cores allocated to the sidecar container.

None

Envs

String

No

Yes

The environment variables of the container.

Example:

[{ "name": "envtmp", "value": "0"}]

ConfigMapMountDesc

String

No

Yes

The description of the ConfigMap mount.

None

InitContainersConfig syntax

"InitContainersConfig": [
  {
    "Command": String,
    "ConfigMapMountDesc": String,
    "ImageUrl": String,
    "CommandArgs": String,
    "Envs": String,
    "Name": String
  }
]  

InitContainersConfig properties

Property

Type

Required

Allow Updates

Description

Constraint

Command

String

No

Yes

The command to run in the init container.

None

ConfigMapMountDesc

String

No

No

The description of the ConfigMap mount.

None

ImageUrl

String

No

Yes

The address of the image.

You can configure an image address only for applications of the Image type.

CommandArgs

String

No

Yes

The arguments of the command to run in the init container.

None

Envs

String

No

Yes

The environment variables of the container.

Example:

[{ "name": "envtmp", "value": "0"}]

Name

String

Yes

Yes

The name of the init container.

None

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

Property

Type

Required

Allow Updates

Description

Constraint

Key

String

Yes

No

The tag key.

The key must be 1 to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Value

String

No

No

The tag value.

The value must be 0 to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Return values

Fn::GetAtt

  • AppId: The application ID.

  • ChangeOrderId: The ID of the release order. You can use this ID to query the task execution status.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NamespaceId:
    Type: String
    Description: |-
      The ID of the EDAS namespace. The name of the namespace can contain only lowercase letters and hyphens (-), and must start with a letter.
      You can obtain the namespace ID from the response of the DescribeNamespaceList operation.
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
  SecurityGroupId:
    Type: String
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
Resources:
  Application:
    Type: ALIYUN::SAE::Application
    Properties:
      AppName: TestApp
      NamespaceId:
        Ref: NamespaceId
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      SecurityGroupId:
        Ref: SecurityGroupId
      Cpu: 500
      Memory: 1024
      Replicas: 2
      PackageType: War
      Deploy: true
      Timezone: Asia/Shanghai
Outputs: {}
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NamespaceId": {
      "Type": "String",
      "Description": "The ID of the EDAS namespace. The name of the namespace can contain only lowercase letters and hyphens (-), and must start with a letter.\nYou can obtain the namespace ID from the response of the DescribeNamespaceList operation."
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      }
    },
    "SecurityGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      }
    }
  },
  "Resources": {
    "Application": {
      "Type": "ALIYUN::SAE::Application",
      "Properties": {
        "AppName": "TestApp",
        "NamespaceId": {
          "Ref": "NamespaceId"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "Cpu": 500,
        "Memory": 1024,
        "Replicas": 2,
        "PackageType": "War",
        "Deploy": true,
        "Timezone": "Asia/Shanghai"
      }
    }
  },
  "Outputs": {
  }
}

For an example of how to create a namespace, create an SAE application, and bind an SLB instance, see YAML example.