ALIYUN::SAE::Application is used to create Serverless App Engine Application.

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,
    "Command": String,
    "EdasContainerVersion": String,
    "PackageUrl": String,
    "NamespaceId": String
  }
}

Properties

Property Type Required Editable Description Constraint
Timezone String No No The time zone of the instance. Default value: Asia/Shanghai.
AppDescription String No No The description of the application. Length cannot exceed 1,024 characters.
MountDesc String No No The description of the Mount. None
NasId String No No The ID of the NAS file system on which the file system is mounted. You must specify a quota for each available mount point. Alternatively, you must use a vSwitch in the VPC. If you specify the MountDesc parameter but do not specify the parameter, the system automatically purchases a NAS file system and mounts the file system to a vSwitch in the VPC.
WarStartOptions String No No War package startup option. Use the default startup command: java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start. None
Liveness String No No The container health check. The container that failed to be health check will be restarted. Currently, you can issue commands only within a container. For example: {"exec":{"command":["sleep","5s"]},"initialDelaySeconds":10,"timeoutSeconds":11}.
Memory Integer Yes No The memory required by each instance. Currently, only fixed instance types are supported. Valid values:
  • When the Cpu value is 500: 1024.
  • When the Cpu value is 1000: 2048.
  • When the Cpu value is 2000: 4096.
  • When the Cpu value is 4000: 8192.
  • When the Cpu value is 8000: 16384.

Unit: MB.

WebContainer String No No The version of tomcat that the deployment package is dependent on. The error message returned because the specified image does not support this parameter.
SlsConfigs String No No File log collection configuration. None
Cpu Integer Yes No The required Cpu for each instance. Currently, only fixed instance types are supported. Valid values:
  • 500
  • 1000
  • 2000
  • 4,000
  • 8000

Unit: millinucleus.

Deploy Boolean No No Specifies whether the deployment takes effect immediately. Valid values:
  • true
  • false(default)
PackageVersion String No No The version of the deployment package. This parameter must be set to War or FatJar. You need to customize its meaning.
AppName String Yes No The name of the application. The name must be 1 to 36 characters in length and start with a letter. It can contain letters, digits, and hyphens (-).
Jdk String No No The JDK Version of the package. The error message returned because the specified image does not support this parameter.
JarStartArgs String No No Jar package to obtain the parameters for running the application. Use the default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs. None
PreStop String No No Run the script before stopping, for example: {"exec":{"command":"cat","/etc/group"}}. None
Readiness String No No Checks the application startup status. Containers that fail to start multiple health check will be restarted. Containers that do not pass through health check will not receive any SLB traffic. For example: {"exec":{"command":["sleep","6s"]},"initialDelaySeconds":15,"timeoutSeconds":12}. None
PackageType String Yes No The type of the app package. Valid values:
  • FatJar
  • War
  • Image
CommandArgs String No No Image startup command parameters. For example: ["1d"]. None
Envs String No No The environment variables of the container. For example: [{"name":"envtmp","value":"0"}]. None
VSwitchId String No No The vSwitch of the application instance Elastic Network Interface. The vSwitch must belong to the VPC. The vSwitch is bound to the EDAS namespace. If this parameter is not specified, the VSwitchId of the namespace is returned.
ImageUrl String No No The address of the image. You can only configure an Image address for an Image application.
PostStart String No No Run the script after startup, for example: {"exec":{"command":"cat","/etc/group"}}. None
JarStartOptions String No No Jar package to start the application. Use the default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs. None
MountHost String No No The Mount point of the Apsara file storage NAS file system in the VPC. None
Replicas Integer Yes No The initial number of instances. None
CustomHostAlias String No No Custom host mapping in the container. For example: [{"hostName":"samplehost","ip":"127.0.XX.XX"}]. None
VpcId String No No The VPC network corresponding to the EDAS namespace. In Serverless architecture, one namespace can only correspond to one VPC and cannot be modified. When you create a Serverless application for the first time in a namespace, the binding relationship is established. One VPC can have multiple namespaces. If this parameter is not specified, the namespace is bound to the VpcId.
Command String No No The command for starting the image. An executable object must exist in the container. Example: sleep. If this command is set, the original startup command of the image becomes invalid.
EdasContainerVersion String No No The runtime environment used by EDAS pandora applications. None
PackageUrl String No No The address where the deployment package of the application is located. You can only configure a deployment package address for a FatJar or War application.
NamespaceId String Yes No The ID of the EDAS namespace. The name of the namespace can only contain lowercase letters and hyphens (-). It must start with a lowercase letter.

Response parameters

Fn::GetAtt

  • AppId: the ID of the application.
  • ChangeOrderId: the ID of the deployment order, used to query the task execution status.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Timezone": {
      "Type": "String",
      "Description": "Application time zone. Default Asia/Shanghai."
    },
    "AppDescription": {
      "Type": "String",
      "Description": "Application description. No more than 1024 characters.",
      "MaxLength": 1024
    },
    "MountDesc": {
      "Type": "String",
      "Description": "Mount Description"
    },
    "NasId": {
      "Type": "String",
      "Description": "Mount the NAS ID, you must be in the same region and cluster. It must be available to create a mount point limit, or switch on its mount point already in the VPC. If you do not fill, and there mountDescs field, the default will automatically purchase a NAS and mount it onto the switch within the VPC."
    },
    "WarStartOptions": {
      "Type": "String",
      "Description": "War Start the application package option. Apply the default startup command: java $ JAVA_OPTS $ CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap \"$ @\" start"
    },
    "Liveness": {
      "Type": "String",
      "Description": "Container health check, health check fails container will be killed and recovery. Currently only supports mode command issued in the container. The columns: { \"exec\": { \"command\": [ \"sleep\", \"5s\"]}, \"initialDelaySeconds\": 10, \"timeoutSeconds\": 11}"
    },
    "Memory": {
      "Type": "Number",
      "Description": "Each instance of the required memory, in units of MB, can not be zero. Currently only supports fixed specifications instance type.",
      "MinValue": 1
    },
    "WebContainer": {
      "Type": "String",
      "Description": "Tomcat deployment of the package depends on the version. Mirroring not supported."
    },
    "SlsConfigs": {
      "Type": "String",
      "Description": "Log collection configuration file"
    },
    "Cpu": {
      "Type": "Number",
      "Description": "Each instance of the CPU required, in units of milli core, can not be zero. Currently only supports fixed specifications instance type.",
      "MinValue": 1
    },
    "Deploy": {
      "Type": "Boolean",
      "Description": "Whether deployed immediately take effect, the default is false.",
      "AllowedValues": [
        "true",
        "false"
      ]
    },
    "PackageVersion": {
      "Type": "String",
      "Description": "The version number of the deployed package, War FatJar type required. Please customize it meaning."
    },
    "AppName": {
      "Type": "String",
      "Description": "Application Name. Allowed numbers, letters and underlined combinations thereof. We must begin with the letters, the maximum length of 36 characters."
    },
    "Jdk": {
      "Type": "String",
      "Description": "Deployment of JDK version of the package depends on. Mirroring not supported."
    },
    "JarStartArgs": {
      "Type": "String",
      "Description": "Jar package startup application parameters. Apply the default startup command: $ JAVA_HOME / bin / java $ JarStartOptions -jar $ CATALINA_OPTS \"$ package_path\"\n$ JarStartArgs"
    },
    "PreStop": {
      "Type": "String",
      "Description": "Script is executed before stopping the format as: { \"exec\": { \"command\": \"cat\", \"/ etc / group\"}}"
    },
    "Readiness": {
      "Type": "String",
      "Description": "Application launch status check, health check fails repeatedly container will be killed and restarted. Do not pass health check of the vessel will not have to enter SLB traffic. For example: { \"exec\": { \"command\": [ \"sleep\", \"6s\"]}, \"initialDelaySeconds\": 15, \"timeoutSeconds\": 12}"
    },
    "PackageType": {
      "Type": "String",
      "Description": "Application package type. Support FatJar, War, Image."
    },
    "CommandArgs": {
      "Type": "String",
      "Description": "Mirroring the start command parameters. Parameters required for the start-command. For example: [ \"1d\"]"
    },
    "Envs": {
      "Type": "String",
      "Description": "Container environment variable parameters. For example: [{ \"name\": \"envtmp\", \"value\": \"0\"}]"
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "Application examples where the elastic card virtual switch. The switch must be located above the VPC. The same switch with EDAS namespace binding relationship. Do not fill was VSwitchId namespace binding."
    },
    "ImageUrl": {
      "Type": "String",
      "Description": "Mirroring address. Image only type of application can be configured to mirror address."
    },
    "PostStart": {
      "Type": "String",
      "Description": "Executing the script, such as after starting the format: { \"exec\": { \"command\": \"cat\", \"/ etc / group\"}}"
    },
    "JarStartOptions": {
      "Type": "String",
      "Description": "Jar start the application package option. Apply the default startup command: $ JAVA_HOME / bin / java $ JarStartOptions -jar $ CATALINA_OPTS \"$ package_path\"\n$ JarStartArgs"
    },
    "MountHost": {
      "Type": "String",
      "Description": "nas mount point in the application of vpc."
    },
    "Replicas": {
      "Type": "Number",
      "Description": "The initial number of instances."
    },
    "CustomHostAlias": {
      "Type": "String",
      "Description": "Custom mapping host vessel. For example: [{ \"hostName\": \"samplehost\", \"ip\": \"127.0.0.1\"}]"
    },
    "VpcId": {
      "Type": "String",
      "Description": "EDAS namespace corresponding VPC. In Serverless in a corresponding one of the VPC namespace only, and can not be modified. Serverless first created in the application name space will form a binding relationship. You may correspond to a plurality of namespaces VPC. Do not fill was VpcId namespace binding."
    },
    "Command": {
      "Type": "String",
      "Description": "Mirroring the start command. The command object in memory executable container must be. For example: sleep. This command will cause the image to set the original startup command failure."
    },
    "EdasContainerVersion": {
      "Type": "String",
      "Description": "EDAS pandora runtime environment used by the application."
    },
    "PackageUrl": {
      "Type": "String",
      "Description": "Deployment packages address. Only FatJar War or the type of application can be configured to deploy packet address."
    },
    "NamespaceId": {
      "Type": "String",
      "Description": "EDAS namespace corresponding to ID. Canada supports only the name of the scribe lowercase namespace must begin with a letter.\nNamespace can interface to obtain from DescribeNamespaceList."
    }
  },
  "Resources": {
    "Application": {
      "Type": "ALIYUN::SAE::Application",
      "Properties": {
        "Timezone": {
          "Ref": "Timezone"
        },
        "AppDescription": {
          "Ref": "AppDescription"
        },
        "MountDesc": {
          "Ref": "MountDesc"
        },
        "NasId": {
          "Ref": "NasId"
        },
        "WarStartOptions": {
          "Ref": "WarStartOptions"
        },
        "Liveness": {
          "Ref": "Liveness"
        },
        "Memory": {
          "Ref": "Memory"
        },
        "WebContainer": {
          "Ref": "WebContainer"
        },
        "SlsConfigs": {
          "Ref": "SlsConfigs"
        },
        "Cpu": {
          "Ref": "Cpu"
        },
        "Deploy": {
          "Ref": "Deploy"
        },
        "PackageVersion": {
          "Ref": "PackageVersion"
        },
        "AppName": {
          "Ref": "AppName"
        },
        "Jdk": {
          "Ref": "Jdk"
        },
        "JarStartArgs": {
          "Ref": "JarStartArgs"
        },
        "PreStop": {
          "Ref": "PreStop"
        },
        "Readiness": {
          "Ref": "Readiness"
        },
        "PackageType": {
          "Ref": "PackageType"
        },
        "CommandArgs": {
          "Ref": "CommandArgs"
        },
        "Envs": {
          "Ref": "Envs"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ImageUrl": {
          "Ref": "ImageUrl"
        },
        "PostStart": {
          "Ref": "PostStart"
        },
        "JarStartOptions": {
          "Ref": "JarStartOptions"
        },
        "MountHost": {
          "Ref": "MountHost"
        },
        "Replicas": {
          "Ref": "Replicas"
        },
        "CustomHostAlias": {
          "Ref": "CustomHostAlias"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "Command": {
          "Ref": "Command"
        },
        "EdasContainerVersion": {
          "Ref": "EdasContainerVersion"
        },
        "PackageUrl": {
          "Ref": "PackageUrl"
        },
        "NamespaceId": {
          "Ref": "NamespaceId"
        }
      }
    }
  },
  "Outputs": {
    "AppId": {
      "Description": "Creating successful application ID.",
      "Value": {
        "Fn::GetAtt": [
          "Application",
          "AppId"
        ]
      }
    },
    "ChangeOrderId": {
      "Description": "Return to release a single ID, used to query task execution status.",
      "Value": {
        "Fn::GetAtt": [
          "Application",
          "ChangeOrderId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Timezone:
    Type: String
    Description: Application time zone. Default Asia/Shanghai.
  AppDescription:
    Type: String
    Description: Application description. No more than 1024 characters.
    MaxLength: 1024
  MountDesc:
    Type: String
    Description: Mount Description
  NasId:
    Type: String
    Description: >-
      Mount the NAS ID, you must be in the same region and cluster. It must be
      available to create a mount point limit and or switch on its mount point
      already in the VPC. If you do not fill, and there mountDescs field, the
      default will automatically purchase a NAS and mount it onto the switch
      within the VPC.
  WarStartOptions:
    Type: String
    Description: >-
      War Start the application package option. Apply the default startup
      command: java $ JAVA_OPTS $ CATALINA_OPTS -Options
      org.apache.catalina.startup.Bootstrap "$ @" start
  Liveness:
    Type: String
    Description: >-
      Container health check and health check fails container will be killed and
      recovery. Currently only supports mode command issued in the container.
      The columns: { "exec": { "command": [ "sleep", "5s"]},
      "initialDelaySeconds": 10, "timeoutSeconds": 11}
  Memory:
    Type: Number
    Description: >-
      Each instance of the required memory, in units of MB, can not be zero.
      Currently only supports fixed specifications instance type.
    MinValue: 1
  WebContainer:
    Type: String
    Description: >-
      Tomcat deployment of the package depends on the version. Mirroring not
      supported.
  SlsConfigs:
    Type: String
    Description: Log collection configuration file
  Cpu:
    Type: Number
    Description: >-
      Each instance of the CPU required, in units of milli core, and can not be
      zero. Currently only supports fixed specifications instance type.
    MinValue: 1
  Deploy:
    Type: Boolean
    Description: 'Whether deployed immediately take effect, the default is false.'
    AllowedValues:
      - 'true'
      - 'false'
  PackageVersion:
    Type: String
    Description: >-
      The version number of the deployed package, War FatJar type required.
      Please customize it meaning.
  AppName:
    Type: String
    Description: >-
      Application Name. Allowed numbers, letters and underlined combinations
      thereof. We must begin with the letters and the maximum length of 36
      characters.
  Jdk:
    Type: String
    Description: >-
      Deployment of JDK version of the package depends on. Mirroring not
      supported.
  JarStartArgs:
    Type: String
    Description: >-
      Jar package startup application parameters. Apply the default startup
      command: $ JAVA_HOME / bin / java $ JarStartOptions -jar $ CATALINA_OPTS
      "$ package_path"

      $JarStartArgs
  PreStop:
    Type: String
    Description: >-
      Script is executed before stopping the format as: { "exec": { "command":
      "cat", "/ etc / group"}}
  Readiness:
    Type: String
    Description: >-
      Application launch status check and health check fails repeatedly container
      will be killed and restarted. Do not pass health check of the vessel will
      not have to enter SLB traffic. For example: { "exec": { "command": [
      "sleep", "6s"]}, "initialDelaySeconds": 15, "timeoutSeconds": 12}
  PackageType:
    Type: String
    Description: 'Application package type. Support FatJar, War, Image.'
  CommandArgs:
    Type: String
    Description: >-
      Mirroring the start command parameters. Parameters required for the
      start-command. For example: [ "1d"]
  Envs:
    Type: String
    Description: >-
      Container environment variable parameters. For example: [{ "name":
      "envtmp", "value": "0"}]
  VSwitchId:
    Type: String
    Description: >-
      Application examples where the elastic card virtual switch. The switch
      must be located above the VPC. The same switch with EDAS namespace binding
      relationship. Do not fill was VSwitchId namespace binding.
  ImageUrl:
    Type: String
    Description: >-
      Mirroring address. Image only type of application can be configured to
      mirror address.
  PostStart:
    Type: String
    Description: >-
      Executing the script, such as after starting the format: { "exec": {
      "command": "cat", "/ etc / group"}}
  JarStartOptions:
    Type: String
    Description: >-
      Jar start the application package option. Apply the default startup
      command: $ JAVA_HOME / bin / java $ JarStartOptions -jar $ CATALINA_OPTS
      "$ package_path"

      $JarStartArgs
  MountHost:
    Type: String
    Description: nas mount point in the application of vpc.
  Replicas:
    Type: Number
    Description: The initial number of instances.
  CustomHostAlias:
    Type: String
    Description: >-
      Custom mapping host vessel. For example: [{ "hostName": "samplehost",
      "ip": "127.0.0.1"}]
  VpcId:
    Type: String
    Description: >-
      EDAS namespace corresponding VPC. In Serverless in a corresponding one of
      the VPC namespace only, and can not be modified. Serverless first created
      in the application name space will form a binding relationship. You may
      correspond to a plurality of namespaces VPC. Do not fill was VpcId
      namespace binding.
  Command:
    Type: String
    Description: >-
      Mirroring the start command. The command object in memory executable
      container must be. For example: sleep. This command will cause the image
      to set the original startup command failure.
  EdasContainerVersion:
    Type: String
    Description: EDAS pandora runtime environment used by the application.
  PackageUrl:
    Type: String
    Description: >-
      Deployment packages address. Only FatJar War or the type of application
      can be configured to deploy packet address.
  NamespaceId:
    Type: String
    Description: >-
      EDAS namespace corresponding to ID. Canada supports only the name of the
      scribe lowercase namespace must begin with a letter.

      Namespace can interface to obtain from DescribeNamespaceList.
Resources:
  Application:
    Type: 'ALIYUN::SAE::Application'
    Properties:
      Timezone:
        Ref: Timezone
      AppDescription:
        Ref: AppDescription
      MountDesc:
        Ref: MountDesc
      NasId:
        Ref: NasId
      WarStartOptions:
        Ref: WarStartOptions
      Liveness:
        Ref: Liveness
      Memory:
        Ref: Memory
      WebContainer:
        Ref: WebContainer
      SlsConfigs:
        Ref: SlsConfigs
      Cpu:
        Ref: Cpu
      Deploy:
        Ref: Deploy
      PackageVersion:
        Ref: PackageVersion
      AppName:
        Ref: AppName
      Jdk:
        Ref: Jdk
      JarStartArgs:
        Ref: JarStartArgs
      PreStop:
        Ref: PreStop
      Readiness:
        Ref: Readiness
      PackageType:
        Ref: PackageType
      CommandArgs:
        Ref: CommandArgs
      Envs:
        Ref: Envs
      VSwitchId:
        Ref: VSwitchId
      ImageUrl:
        Ref: ImageUrl
      PostStart:
        Ref: PostStart
      JarStartOptions:
        Ref: JarStartOptions
      MountHost:
        Ref: MountHost
      Replicas:
        Ref: Replicas
      CustomHostAlias:
        Ref: CustomHostAlias
      VpcId:
        Ref: VpcId
      Command:
        Ref: Command
      EdasContainerVersion:
        Ref: EdasContainerVersion
      PackageUrl:
        Ref: PackageUrl
      NamespaceId:
        Ref: NamespaceId
Outputs:
  AppId:
    Description: Creating successful application ID.
    Value:
      'Fn::GetAtt':
        -Application
        -AppId
  ChangeOrderId:
    Description: 'Return to release a single ID, used to query task execution status.'
    Value:
      'Fn::GetAtt':
        -Application
        -ChangeOrderId