ALIYUN::POLARDB::Application类型用于创建PolarDB应用。
语法
{
"Type": "ALIYUN::POLARDB::Application",
"Properties": {
"Architecture": String,
"ApplicationType": String,
"DBClusterId": String,
"AutoCreatePolarFs": Boolean,
"Components": List,
"Description": String,
"Period": Integer,
"PayType": String,
"PolarFSInstanceId": String,
"SecurityGroupId": String,
"SecurityIPList": String,
"VSwitchId": String,
"VpcId": String,
"ZoneId": String
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Architecture | String | 是 | 否 | CPU 架构。 | 取值:
|
ApplicationType | String | 是 | 否 | 应用类型。 | 取值:
|
DBClusterId | String | 是 | 否 | 应用依赖的 PolarDB 实例 ID。 | 无 |
AutoCreatePolarFs | Boolean | 否 | 否 | 是否自动创建冷存版 PolarFs。 | 取值:
|
Components | List | 否 | 否 | 用户自定义的应用子组件列表。 | 更多信息,请参考Components属性。 |
Description | String | 否 | 否 | 应用描述。 | 无 |
Period | Integer | 否 | 否 | 包年包月类型。 | 无 |
PayType | String | 否 | 否 | 付费类型。 | 取值:
|
PolarFSInstanceId | String | 否 | 否 | PolarFS 冷存版/高性能版实例 ID。 | 默认为空,若传入则将相应存储挂载到应用中 目前仅如下应用支持
|
SecurityGroupId | String | 否 | 否 | 安全组ID。 | 无 |
SecurityIPList | String | 否 | 否 | 应用子组件的白名单 IP 地址。 | 无 |
VSwitchId | String | 否 | 否 | 交换机。 | 无 |
VpcId | String | 否 | 否 | 专有网络。 | 无 |
ZoneId | String | 否 | 否 | 可用区。 | 无 |
Components语法
"Components": [
{
"SecurityGroups": String,
"ComponentType": String,
"SecurityIPType": String,
"SecurityIPList": String,
"ComponentReplica": String,
"SecurityIPArrayName": String,
"ScaleMin": Integer,
"ScaleMax": Integer,
"ComponentMaxReplica": Integer,
"ComponentClass": String
}
]Components属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ComponentClass | String | 否 | 否 | 应用子组件的规格。 | 无 |
ComponentMaxReplica | Integer | 否 | 否 | 同一规格应用子组件的最大数量。 | 默认等于 ComponentReplica。
|
ComponentReplica | String | 否 | 否 | 应用子组件的副本数量。 | 默认为 1。 |
ComponentType | String | 否 | 否 | 应用子组件的类型。 | 对于 supabase,取值范围为
对于 raycluster,取值范围为
|
ScaleMax | Integer | 否 | 否 | 组件的最大副本数。 | 无 |
ScaleMin | Integer | 否 | 否 | 组件的最小副本数。 | 无 |
SecurityGroups | String | 否 | 否 | 应用子组件的安全组列表。 | 无 |
SecurityIPArrayName | String | 否 | 否 | 应用子组件白名单 IP 地址组的名称。 | 默认为 default。 |
SecurityIPList | String | 否 | 否 | 应用子组件的白名单 IP 地址。 | 无 |
SecurityIPType | String | 否 | 否 | 应用子组件的白名单 IP 的类型, | 默认为 ipv4。 |
返回值
Fn::GetAtt
ApplicationId:应用 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Architecture:
Type: String
Description:
en: The architecture of the application. This parameter is required.
AllowedValues:
- x86
Required: true
ZoneId:
AssociationProperty: ZoneId
Type: String
Description:
en: The ID of the zone.
Required: false
SecurityGroupId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
Type: String
Description:
en: The ID of the security group.
Required: false
VSwitchId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
Type: String
Description:
en: The ID of the VSwitch.
Required: false
DBClusterId:
Type: String
Description:
en: The ID of the database cluster.
Required: true
ApplicationType:
Type: String
Description:
en: The type of the application. This parameter is required.
AllowedValues:
- supabase
- raycluster
Required: true
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: The ID of the VPC.
Required: false
Resources:
Application:
Type: ALIYUN::POLARDB::Application
Properties:
Architecture:
Ref: Architecture
ZoneId:
Ref: ZoneId
SecurityGroupId:
Ref: SecurityGroupId
VSwitchId:
Ref: VSwitchId
DBClusterId:
Ref: DBClusterId
ApplicationType:
Ref: ApplicationType
VpcId:
Ref: VpcId
Outputs:
ApplicationId:
Description: The ID of the application.
Value:
Fn::GetAtt:
- Application
- ApplicationId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Architecture": {
"Type": "String",
"Description": {
"en": "The architecture of the application. This parameter is required."
},
"AllowedValues": [
"x86"
],
"Required": true
},
"ZoneId": {
"AssociationProperty": "ZoneId",
"Type": "String",
"Description": {
"en": "The ID of the zone."
},
"Required": false
},
"SecurityGroupId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"Type": "String",
"Description": {
"en": "The ID of the security group."
},
"Required": false
},
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "The ID of the VSwitch."
},
"Required": false
},
"DBClusterId": {
"Type": "String",
"Description": {
"en": "The ID of the database cluster."
},
"Required": true
},
"ApplicationType": {
"Type": "String",
"Description": {
"en": "The type of the application. This parameter is required."
},
"AllowedValues": [
"supabase",
"raycluster"
],
"Required": true
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "The ID of the VPC."
},
"Required": false
}
},
"Resources": {
"Application": {
"Type": "ALIYUN::POLARDB::Application",
"Properties": {
"Architecture": {
"Ref": "Architecture"
},
"ZoneId": {
"Ref": "ZoneId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"DBClusterId": {
"Ref": "DBClusterId"
},
"ApplicationType": {
"Ref": "ApplicationType"
},
"VpcId": {
"Ref": "VpcId"
}
}
}
},
"Outputs": {
"ApplicationId": {
"Description": "The ID of the application.",
"Value": {
"Fn::GetAtt": [
"Application",
"ApplicationId"
]
}
}
}
}