ALIYUN::EDAS::Application类型用于创建ECS集群的应用。
语法
{
"Type": "ALIYUN::EDAS::Application",
"Properties": {
"ApplicationName": String,
"HealthCheckURL": String,
"Description": String,
"ClusterId": String,
"PackageType": String,
"BuildPackId": Integer,
"EcuInfo": String,
"ComponentIds": String,
"LogicalRegionId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
ApplicationName | String | 是 | 是 | 应用名称 | 必须以字母开头,可包含数字、英文字母、短横线(-)和下划线(_),长度为1~36个字符。 |
HealthCheckURL | String | 否 | 否 | 健康检查URL | 无 |
Description | String | 否 | 是 | 描述信息 | 无 |
ClusterId | String | 是 | 否 | 向指定集群ID的ECS集群创建应用,不指定则向默认ECS集群创建应用。 | 无 |
PackageType | String | 否 | 否 | 应用包格式 | 取值范围:
|
BuildPackId | Integer | 否 | 否 | EDAS-Container构建包号。
您可以通过容器版本列表接口ListBuildPack或者根据容器版本说明 中的构建包序号列查询EDAS-Container构建包号。 |
当创建HSF应用时,必须指定该参数。 |
EcuInfo | String | 否 | 否 | 需要扩容机器的ecu_id(导入EDAS的 ECS实例在EDAS中的唯一身份) | 多个ecu_id用“,”分开。
您可以通过ListScaleOutEcu接口查询ecu_id。 |
ComponentIds | String | 否 | 否 | 应用组件ID。
说明 设置该参数需要将Java或者Python SDK版本更新到2.57.3及以上。未使用EDAS提供的SDK的用户可直接设置该参数。例如:用户在使用aliyun-python-sdk-core、aliyun-java-sdk-core、aliyun
cli等SDK时可以直接设置该参数。
|
当创建的应用运行环境使用Apache Tomcat(war包格式的 Dubbo应用使用)或者标准Java应用(jar包格式的Spring Boot/Spring Cloud应用使用)运行环境时需要指定。常用的应用组件
ID 及含义如下:
|
LogicalRegionId | String | 否 | 否 | 命名空间ID,示例值:cn-beijing:prod 。
|
|
返回值
Fn::GetAtt
- Port:创建成功的应用端口号,默认值:8080。
- AppId:应用ID,EDAS应用的唯一标识符。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Application": {
"Type": "ALIYUN::EDAS::Application",
"Properties": {
"ApplicationName": {
"Ref": "ApplicationName"
},
"HealthCheckURL": {
"Ref": "HealthCheckURL"
},
"Description": {
"Ref": "Description"
},
"ClusterId": {
"Ref": "ClusterId"
},
"PackageType": {
"Ref": "PackageType"
},
"BuildPackId": {
"Ref": "BuildPackId"
},
"EcuInfo": {
"Ref": "EcuInfo"
},
"ComponentIds": {
"Ref": "ComponentIds"
},
"LogicalRegionId": {
"Ref": "LogicalRegionId"
}
}
}
},
"Parameters": {
"ApplicationName": {
"MinLength": 1,
"Type": "String",
"Description": "The application name (only allow the use of numbers, letters, -, _, up to 36 characters)",
"MaxLength": 36
},
"HealthCheckURL": {
"Type": "String",
"Description": "Application Health Check URL"
},
"Description": {
"Type": "String",
"Description": "Descriptive information"
},
"ClusterId": {
"Type": "String",
"Description": "Cluster ID of ECS application"
},
"PackageType": {
"Default": "war",
"Type": "String",
"Description": "Application packet format, possible values: war or jar",
"AllowedValues": [
"war",
"jar"
]
},
"BuildPackId": {
"Type": "Number",
"Description": "EDAS-Container construct a packet number (available version list acquired through the ListBuildPack API (ConfigId of response) or \"container version\" table \"Building packet number\" column acquisition). When creating HSF application, this parameter must be specified"
},
"EcuInfo": {
"Type": "String",
"Description": "Machine capacity is needed ecu_id (ECS Examples introducing another unique identity EDAS EDAS), the plurality of \",\" separated (by querying ListScaleOutEcu wherein ecu_id\nInterface to obtain)."
},
"ComponentIds": {
"Type": "String",
"Description": "Application component ID (available through the query interface to obtain a list of components to the interface ListComponents), when creating the application runtime environment using Apache Tomcat (war packet format Dubbo\nApplication required) or standard Java application (jar package format Spring Boot / Spring Cloud applications require) you need to specify when the operating environment. Commonly used application component ID and meaning:\n4 represents Apache Tomcat 7.0.91,7 represented Apache Tomcat 8.5.42,5 represented OpenJDK 1.8.x, 6 represents OpenJDK\n1.7.x"
},
"LogicalRegionId": {
"Type": "String",
"Description": "Namespace ID"
}
},
"Outputs": {
"Port": {
"Description": "Application port",
"Value": {
"Fn::GetAtt": [
"Application",
"Port"
]
}
},
"AppId": {
"Description": "Application Id, a unique identifier EDAS application",
"Value": {
"Fn::GetAtt": [
"Application",
"AppId"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Resources:
Application:
Type: 'ALIYUN::EDAS::Application'
Properties:
ApplicationName:
Ref: ApplicationName
HealthCheckURL:
Ref: HealthCheckURL
Description:
Ref: Description
ClusterId:
Ref: ClusterId
PackageType:
Ref: PackageType
BuildPackId:
Ref: BuildPackId
EcuInfo:
Ref: EcuInfo
ComponentIds:
Ref: ComponentIds
LogicalRegionId:
Ref: LogicalRegionId
Parameters:
ApplicationName:
MinLength: 1
Type: String
Description: >-
The application name (only allow the use of numbers, letters, -, _, up to
36 characters)
MaxLength: 36
HealthCheckURL:
Type: String
Description: Application Health Check URL
Description:
Type: String
Description: Descriptive information
ClusterId:
Type: String
Description: Cluster ID of ECS application
PackageType:
Default: war
Type: String
Description: 'Application packet format, possible values: war or jar'
AllowedValues:
- war
- jar
BuildPackId:
Type: Number
Description: >-
EDAS-Container construct a packet number (available version list acquired
through the ListBuildPack API (ConfigId of response) or "container
version" table "Building packet number" column acquisition). When creating
HSF application, this parameter must be specified
EcuInfo:
Type: String
Description: >-
Machine capacity is needed ecu_id (ECS Examples introducing another unique
identity EDAS EDAS), the plurality of "," separated (by querying
ListScaleOutEcu wherein ecu_id
Interface to obtain).
ComponentIds:
Type: String
Description: >-
Application component ID (available through the query interface to obtain
a list of components to the interface ListComponents), when creating the
application runtime environment using Apache Tomcat (war packet format
Dubbo
Application required) or standard Java application (jar package format
Spring Boot / Spring Cloud applications require) you need to specify when
the operating environment. Commonly used application component ID and
meaning:
4 represents Apache Tomcat 7.0.91,7 represented Apache Tomcat 8.5.42,5
represented OpenJDK 1.8.x, 6 represents OpenJDK
1.7.x
LogicalRegionId:
Type: String
Description: Namespace ID
Outputs:
Port:
Description: Application port
Value:
'Fn::GetAtt':
- Application
- Port
AppId:
Description: 'Application Id, a unique identifier EDAS application'
Value:
'Fn::GetAtt':
- Application
- AppId
在文档使用中是否遇到以下问题
更多建议
匿名提交