Todos los productos
Search
Centro de documentos

CloudOps Orchestration Service:ACS-SAE-CreateDemoApp

Última actualización: Sep 05, 2026

Cree una aplicación de Serverless App Engine (SAE) y le vincula una instancia de Server Load Balancer (SLB).

Template name

ACS-SAE-CreateDemoApp: Create an SAE application

Ejecutar ahora

Template description

Creates an SAE application and binds an SLB instance to it.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Type

Required

Default value

Limit

applicationInfos

The SAE application information.

Json

No

[{'appName': 'appName', 'imageUrl': 'imageUrl'}]

Output parameters

None

Required permission policy

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "sae:BindSlb",
                "sae:CreateApplication",
                "sae:DescribeChangeOrder"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

Para obtener más información, consulte ACS-SAE-CreateDemoApp en GitHub.

Template content
FormatVersion: OOS-2019-06-01
Description:
  en: Create SAE application and bind them to SLB
  name-en: ACS-SAE-CreateDemoApp
Parameters:
  applicationInfos:
    Label:
      en: SAEApplicationInfos
    Type: Json
    Default:
      - appName: appName
        imageUrl: imageUrl
Tasks:
  - Name: createApplications
    Action: 'ACS::SAE::CreateApplication'
    Description:
      en: Create SAE application
    Properties:
      applicationInfo: '{{ ACS::TaskLoopItem }}'
    Loop:
      Items: '{{ applicationInfos }}'
      RateControl:
        Mode: Concurrency
        MaxErrors: 0
        Concurrency: 3
      Outputs:
        appIds:
          AggregateType: 'Fn::ListJoin'
          AggregateField: appId
    Outputs:
      appId:
        Type: String
        ValueSelector: appId
  - Name: bindSlb
    Action: 'ACS::ExecuteApi'
    Description:
      en: Bind app to SLB
    Properties:
      Service: SAE
      API: BindSlb
      Parameters:
        AppId:
          'Fn::Select':
            - 0
            - '{{ createApplications.appIds }}'
        Internet: '[{"port":80,"targetPort":9999,"protocol":"TCP"}]'
    Outputs:
      ChangeOrderId:
        ValueSelector: .Data.ChangeOrderId
        Type: String
  - Name: describeBindSlbChangeOrder
    Action: 'ACS::WaitFor'
    Description:
      en: Waits for the APP bind to SLB
    Properties:
      Service: SAE
      API: DescribeChangeOrder
      Parameters:
        ChangeOrderId: '{{ bindSlb.ChangeOrderId }}'
      StopRetryValues:
        - 2
        - 3
        - 6
        - 10
      DesiredValues:
        - 2
      PropertySelector: .Data.Status
    DelayType: Constant
    Delay: 6
    Retries: 10