All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::EDAS::Application

Last Updated:May 17, 2023

ALIYUN::EDAS::Application is used to create an application in an Elastic Compute Service (ECS) cluster in Enterprise Distributed Application Service (EDAS).

Syntax

{
  "Type": "ALIYUN::EDAS::Application",
  "Properties": {
    "ApplicationName": String,
    "HealthCheckURL": String,
    "Description": String,
    "ClusterId": String,
    "PackageType": String,
    "BuildPackId": Integer,
    "EcuInfo": String,
    "ComponentIds": String,
    "LogicalRegionId": String,
    "ResourceGroupId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ApplicationName

String

Yes

Yes

The name of the application.

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

HealthCheckURL

String

No

No

The health check URL of the application.

None.

Description

String

No

Yes

The description of the application.

None.

ClusterId

String

Yes

No

The ID of the ECS cluster in which you want to create the application. If you leave this property empty, the application is created in the default ECS cluster.

None.

PackageType

String

No

No

The type of the deployment package.

Valid values:

  • war

  • jar

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

BuildPackId

Integer

No

No

The build package number of EDAS Container.

To obtain the build package number of EDAS container, you can call the ListBuildPack operation or see the "Build package number" column of the Release notes for EDAS Container topic.

This property must be specified when you create a High-Speed Service Framework (HSF) application.

EcuInfo

String

No

No

The IDs of the Elastic Compute Units (ECUs) that you want to scale out. The ID of an ECU indicates the unique identifier of an ECS instance that is imported to EDAS.

Separate multiple ECU IDs with commas (,).

You can call the ListScaleOutEcu operation to query the ECU IDs.

ComponentIds

String

No

No

The ID of the application component.

Note

If you use EDAS SDK for Java or EDAS SDK for Python, make sure that the SDK version is V2.57.3 or later when you specify this property. If you do not use EDAS SDK, you can directly specify this property. For example, you can directly set this property to aliyun-python-sdk-core, aliyun-java-sdk-core, or aliyun cli if you use the relevant component.

This property must be specified when you use the Apache Tomcat runtime to create a Dubbo application based on a WAR package or use the standard Java runtime to create a Spring Boot or Spring Cloud application based on a JAR package. Valid values:

  • 4: Apache Tomcat 7.0.91

  • 7: Apache Tomcat 8.5.42

  • 5: OpenJDK 1.8.x

  • 6: OpenJDK 1.7.x

LogicalRegionId

String

No

No

The namespace ID. Example: cn-beijing:prod.

  • This property must be specified when the cluster that you specify does not belong to the default namespace. Otherwise, the application regionId is different with cluster regionId! error message is returned.

  • You can leave this property empty when the cluster that you specify belongs to the default namespace.

Set this property to the ID of the namespace to which the cluster that you specify belongs. To obtain the namespace ID, perform the following operations: Log on to the EDAS console. Choose Resource Management > Microservice Namespaces. On the page that appears, view the namespace ID.

Return values

Fn::GetAtt

  • Port: the port number of the application. Default value: 8080.

  • AppId: the application ID. An application ID uniquely identifies an EDAS application.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Type: String
    Description: Cluster ID of ECS application
    Default: '****'
  RegionTag:
    Type: String
    Description: Allowed letters and numbers
    Default: mytest
  ApplicationName:
    Type: String
    Default: mytest
Resources:
  App:
    Type: ALIYUN::EDAS::Application
    Properties:
      ApplicationName:
        Ref: ApplicationName
      LogicalRegionId:
        Fn::Join:
          - ':'
          - - Ref: ALIYUN::Region
            - Ref: RegionTag
      ClusterId:
        Ref: ClusterId
      PackageType: jar
Outputs:
  ClusterName:
    Value:
      Fn::GetAtt:
        - Cluster
        - ClusterName
  IaasProvider:
    Value:
      Fn::GetAtt:
        - Cluster
        - IaasProvider
  ClusterId:
    Value:
      Fn::GetAtt:
        - Cluster
        - ClusterId
  ClusterType:
    Value:
      Fn::GetAtt:
        - Cluster
        - ClusterType
  Port:
    Value:
      Fn::GetAtt:
        - App
        - Port
  AppId:
    Value:
      Fn::GetAtt:
        - App
        - AppId
  GroupName:
    Value:
      Fn::GetAtt:
        - DeployGroup
        - GroupName
  Id:
    Value:
      Fn::GetAtt:
        - DeployGroup
        - Id
  DeployGroupAppId:
    Value:
      Fn::GetAtt:
        - DeployGroup
        - AppId
  BelongRegion:
    Value:
      Fn::GetAtt:
        - LogicalRegion
        - BelongRegion
  DebugEnable:
    Value:
      Fn::GetAtt:
        - LogicalRegion
        - DebugEnable
  UserId:
    Value:
      Fn::GetAtt:
        - LogicalRegion
        - UserId
  LogicalRegionId:
    Value:
      Fn::GetAtt:
        - LogicalRegion
        - Id
  RegionName:
    Value:
      Fn::GetAtt:
        - LogicalRegion
        - RegionName

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": "Cluster ID of ECS application",
      "Default": "****"
    },
    "RegionTag": {
      "Type": "String",
      "Description": "Allowed letters and numbers",
      "Default": "mytest"
    },
    "ApplicationName": {
      "Type": "String",
      "Default": "mytest"
    }
  },
  "Resources": {
    "App": {
      "Type": "ALIYUN::EDAS::Application",
      "Properties": {
        "ApplicationName": {
          "Ref": "ApplicationName"
        },
        "LogicalRegionId": {
          "Fn::Join": [
            ":",
            [
              {
                "Ref": "ALIYUN::Region"
              },
              {
                "Ref": "RegionTag"
              }
            ]
          ]
        },
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "PackageType": "jar"
      }
    }
  },
  "Outputs": {
    "ClusterName": {
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterName"
        ]
      }
    },
    "IaasProvider": {
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "IaasProvider"
        ]
      }
    },
    "ClusterId": {
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterId"
        ]
      }
    },
    "ClusterType": {
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterType"
        ]
      }
    },
    "Port": {
      "Value": {
        "Fn::GetAtt": [
          "App",
          "Port"
        ]
      }
    },
    "AppId": {
      "Value": {
        "Fn::GetAtt": [
          "App",
          "AppId"
        ]
      }
    },
    "GroupName": {
      "Value": {
        "Fn::GetAtt": [
          "DeployGroup",
          "GroupName"
        ]
      }
    },
    "Id": {
      "Value": {
        "Fn::GetAtt": [
          "DeployGroup",
          "Id"
        ]
      }
    },
    "DeployGroupAppId": {
      "Value": {
        "Fn::GetAtt": [
          "DeployGroup",
          "AppId"
        ]
      }
    },
    "BelongRegion": {
      "Value": {
        "Fn::GetAtt": [
          "LogicalRegion",
          "BelongRegion"
        ]
      }
    },
    "DebugEnable": {
      "Value": {
        "Fn::GetAtt": [
          "LogicalRegion",
          "DebugEnable"
        ]
      }
    },
    "UserId": {
      "Value": {
        "Fn::GetAtt": [
          "LogicalRegion",
          "UserId"
        ]
      }
    },
    "LogicalRegionId": {
      "Value": {
        "Fn::GetAtt": [
          "LogicalRegion",
          "Id"
        ]
      }
    },
    "RegionName": {
      "Value": {
        "Fn::GetAtt": [
          "LogicalRegion",
          "RegionName"
        ]
      }
    }
  }
}