Crie uma aplicação PolarDB.
Sintaxe
{
"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
}
}
Propriedades
|
Nome da propriedade |
Tipo |
Obrigatório |
Atualizável |
Descrição |
Restrição |
|
Architecture |
String |
Sim |
Não |
Arquitetura da CPU. |
Valor válido:
|
|
ApplicationType |
String |
Sim |
Não |
Tipo da aplicação. |
Valores válidos:
|
|
DBClusterId |
String |
Sim |
Não |
ID da instância PolarDB da qual a aplicação depende. |
Nenhuma |
|
AutoCreatePolarFs |
Boolean |
Não |
Não |
Define se uma instância de PolarFileSystem (PolarFS) para armazenamento frio deve ser criada automaticamente. |
Valores válidos:
|
|
Components |
List |
Não |
Não |
Subcomponentes da aplicação definidos pelo usuário. |
Para mais informações, consulte Propriedades de Components. |
|
Description |
String |
Não |
Não |
Descrição da aplicação. |
Nenhuma |
|
Period |
Integer |
Não |
Não |
Tipo de assinatura. |
Nenhuma |
|
PayType |
String |
Não |
Não |
Método de faturamento. |
Valores válidos:
|
|
PolarFSInstanceId |
String |
Não |
Não |
ID da instância PolarFS de armazenamento frio ou alto desempenho. |
Padrão: vazio. Se especificado, o armazenamento correspondente é montado na aplicação. Atualmente compatível apenas com as seguintes aplicações:
|
|
SecurityGroupId |
String |
Não |
Não |
ID do grupo de segurança. |
Nenhuma |
|
SecurityIPList |
String |
Não |
Não |
Endereços IP na lista de permissões dos subcomponentes da aplicação. |
Nenhuma |
|
VSwitchId |
String |
Não |
Não |
ID do vSwitch. |
Nenhuma |
|
VpcId |
String |
Não |
Não |
ID da Virtual Private Cloud (VPC). |
Nenhuma |
|
ZoneId |
String |
Não |
Não |
ID da zona. |
Nenhuma |
Sintaxe de Components
"Components": [
{
"SecurityGroups": String,
"ComponentType": String,
"SecurityIPType": String,
"SecurityIPList": String,
"ComponentReplica": String,
"SecurityIPArrayName": String,
"ScaleMin": Integer,
"ScaleMax": Integer,
"ComponentMaxReplica": Integer,
"ComponentClass": String
}
]
Propriedades de Components
|
Nome da propriedade |
Tipo |
Obrigatório |
Permite atualizações |
Descrição |
Restrição |
|
ComponentClass |
String |
Não |
Não |
Especificação do subcomponente da aplicação. |
Nenhuma |
|
ComponentMaxReplica |
Integer |
Não |
Não |
Número máximo de subcomponentes da aplicação com a mesma especificação. |
Padrão: igual a ComponentReplica.
|
|
ComponentReplica |
String |
Não |
Não |
Número de réplicas do subcomponente da aplicação. |
Padrão: 1. |
|
ComponentType |
String |
Não |
Não |
Tipo do subcomponente da aplicação. |
Para supabase, os valores válidos são:
Para raycluster, os valores válidos são:
|
|
ScaleMax |
Integer |
Não |
Não |
Número máximo de réplicas do componente. |
Nenhuma |
|
ScaleMin |
Integer |
Não |
Não |
Número mínimo de réplicas do componente. |
Nenhuma |
|
SecurityGroups |
String |
Não |
Não |
Grupos de segurança do subcomponente da aplicação. |
Nenhuma |
|
SecurityIPArrayName |
String |
Não |
Não |
Nome do grupo de endereços IP na lista de permissões do subcomponente da aplicação. |
Padrão: default. |
|
SecurityIPList |
String |
Não |
Não |
Endereços IP na lista de permissões do subcomponente da aplicação. |
Nenhuma |
|
SecurityIPType |
String |
Não |
Não |
Tipo dos endereços IP na lista de permissões do subcomponente da aplicação. |
Padrão: ipv4. |
Valores de retorno
Fn::GetAtt
Application ID: o ID da aplicação.
Exemplos
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"
]
}
}
}
}