The ALIYUN::POLARDB::Application resource type creates a PolarDB application.
Syntax
{
"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
}
}Properties
Property name | Type | Required | Updatable | Description | Constraint |
Architecture | String | Yes | No | CPU architecture. | Valid value:
|
ApplicationType | String | Yes | No | Application type. | Valid values:
|
DBClusterId | String | Yes | No | The ID of the PolarDB instance that the application depends on. | None |
AutoCreatePolarFs | Boolean | No | No | Specifies whether to automatically create a cold-storage PolarFileSystem (PolarFS) instance. | Valid values:
|
Components | List | No | No | A list of user-defined application subcomponents. | For more information, see Components properties. |
Description | String | No | No | Application description. | None |
Period | Integer | No | No | Subscription type | None |
PayType | String | No | No | Billing method. | Valid values:
|
PolarFSInstanceId | String | No | No | The ID of the PolarFS cold-storage or high-performance instance. | Default: empty. If specified, the corresponding storage is mounted to the application. Currently supported only by the following applications:
|
SecurityGroupId | String | No | No | Security group ID. | None |
SecurityIPList | String | No | No | The whitelist IP addresses for application subcomponents. | None |
VSwitchId | String | No | No | vSwitch | None |
VpcId | String | No | No | virtual private cloud (VPC). | None |
ZoneId | String | No | No | Zone. | None |
Components syntax
"Components": [
{
"SecurityGroups": String,
"ComponentType": String,
"SecurityIPType": String,
"SecurityIPList": String,
"ComponentReplica": String,
"SecurityIPArrayName": String,
"ScaleMin": Integer,
"ScaleMax": Integer,
"ComponentMaxReplica": Integer,
"ComponentClass": String
}
]Components properties
Property name | Type | Required | Allow Updates | Description | Constraint |
ComponentClass | String | No | No | Specification of the application subcomponent. | None |
ComponentMaxReplica | Integer | No | No | Maximum number of application subcomponents with the same specification. | Default: same as ComponentReplica.
|
ComponentReplica | String | No | No | Number of replicas for the application subcomponent. | Default: 1. |
ComponentType | String | No | No | Type of the application subcomponent. | For supabase, valid values are:
For raycluster, valid values are:
|
ScaleMax | Integer | No | No | Maximum number of component replicas. | None |
ScaleMin | Integer | No | No | Minimum number of component replicas. | None |
SecurityGroups | String | No | No | List of security groups for the application subcomponent. | None |
SecurityIPArrayName | String | No | No | Name of the IP address group in the whitelist for the application subcomponent. | Default: default. |
SecurityIPList | String | No | No | The whitelist IP addresses for the application subcomponent. | None |
SecurityIPType | String | No | No | Type of the whitelist IP addresses for the application subcomponent. | Default: ipv4. |
Return values
Fn::GetAtt
Application ID: The ID of the application.
Examples
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"
]
}
}
}
}