O tipo de recurso ALIYUN::POLARDB::DBCluster crie um cluster do PolarDB.
Sintaxe
{
"Type": "ALIYUN::POLARDB::DBCluster",
"Properties": {
"VpcId": String,
"DBClusterDescription": String,
"DBType": String,
"ClusterNetworkType": String,
"RenewalStatus": String,
"AutoRenewPeriod": Integer,
"Period": Integer,
"ZoneId": String,
"SecurityGroupIds": List,
"Tags": List,
"SourceResourceId": String,
"MaintainTime": String,
"DBVersion": String,
"CreationOption": String,
"DBNodeClass": String,
"VSwitchId": String,
"SecurityIPList": String,
"CloneDataPoint": String,
"PayType": String,
"CreationCategory": String,
"BackupRetentionPolicyOnClusterDeletion": String,
"ResourceGroupId": String,
"DefaultTimeZone": String,
"GDNId": String,
"LowerCaseTableNames": Integer,
"DBClusterParameters": Map,
"TDEStatus": Boolean,
"PeriodUnit": String,
"ScaleRoNumMin": Integer,
"ScaleMax": Integer,
"AllowShutDown": Boolean,
"ServerlessType": String,
"ScaleRoNumMax": Integer,
"ScaleMin": Integer,
"StorageType": String,
"LooseXEngine": String,
"LoosePolarLogBin": String,
"StorageSpace": Integer,
"ProxyType": String,
"StandbyAZ": String,
"LooseXEngineUseMemoryPct": Integer,
"StorageUpperBound": Integer,
"StrictConsistency": String,
"StoragePayType": String,
"DBNodeNum": Integer,
"ProxyClass": String,
"HotStandbyCluster": String,
"StorageAutoScale": String,
"Architecture": String,
"DBMinorVersion": String,
"ParameterGroupId": String,
"RestartMasterNode": Boolean,
"ColdStorageOption": Map,
"ProvisionedIops": Integer,
"DeletionProtection": Boolean,
"SSLEnabled": String
}
}
Propriedades
Nome da propriedade | Tipo | Obrigatório | Permite atualização | Descrição | Restrições |
DBType | String | Sim | Não | O tipo de mecanismo de banco de dados. | Valores válidos:
|
DBNodeClass | String | Sim | Não | As especificações do nó. | Para obter mais informações sobre as especificações do nó, consulte os seguintes tópicos:
Nota Para criar um cluster Serverless no PolarDB for MySQL Cluster Edition, defina este parâmetro como polar.mysql.sl.small. Para criar um cluster Serverless no PolarDB for MySQL Standard Edition, defina este parâmetro como polar.mysql.sl.small.c. Para criar um cluster Serverless no PolarDB for PostgreSQL (compatível com Oracle) ou PolarDB for PostgreSQL, defina este parâmetro como polar.pg.sl.small.c. |
DBVersion | String | Sim | Não | A versão do banco de dados. | Valores válidos:
|
PayType | String | Sim | Sim | O método de faturamento. | Valores válidos:
|
AutoRenewPeriod | Integer | Não | Sim | O período de renovação automática da instância. | Valores válidos:
Unidade: meses. |
DBClusterDescription | String | Não | Sim | A descrição do cluster. | A descrição deve ter de 2 a 256 caracteres. Deve começar com uma letra ou um caractere chinês e não pode começar com |
ClusterNetworkType | String | Não | Não | O tipo de rede do cluster. | Apenas VPC é suportado. Valor válido: VPC. |
RenewalStatus | String | Não | Sim | O status de renovação automática. | Valores válidos:
|
Period | Integer | Não | Sim | A duração da assinatura. Este parâmetro só entra em vigor quando PayType é definido como Prepaid. | Valores válidos:
Unidade: meses. |
ZoneId | String | Não | Não | O id da zona. | Você pode chamar a operação DescribeRegions para consultar as zonas disponíveis. |
SourceResourceId | String | Não | Não | O id da instância RDS de origem ou do cluster PolarDB de origem. | O id da instância RDS de origem ou do cluster PolarDB de origem. Este parâmetro é obrigatório apenas quando CreationOption é definido como MigrationFromRDS, CloneFromRDS, CloneFromPolarDB ou RecoverFromRecyclebin.
|
SecurityGroupIds | List | Não | Sim | A lista de ids de grupos de segurança. | Especifique até três grupos de segurança. |
Tags | List | Não | Sim | As tags. | Você pode adicionar até 20 tags. Para obter mais informações, consulte Tags properties. |
MaintainTime | String | Não | Sim | A janela de manutenção do cluster. | Formato: HH:mmZ-HH:mmZ. Exemplo: 16:00Z-17:00Z, que indica a janela de manutenção das 00:00 às 01:00 (UTC+8). |
CreationOption | String | Não | Não | O método de criação. | Valores válidos:
Valor padrão: Normal. Nota Se DBType for definido como MySQL e DBVersion como 8.0, você poderá definir este parâmetro como CreateGdnStandby. |
VSwitchId | String | Não | Não | O id do vSwitch. | Nenhuma |
SecurityIPList | String | Não | Não | A lista de permissões de endereços IP do cluster PolarDB. | Nota Especifique vários endereços IP na lista de permissões. Separe vários endereços IP com vírgulas (,). |
CloneDataPoint | String | Não | Não | O ponto no tempo para clonagem de dados. | Valores válidos:
Nota Se CreationOption for definido como CloneFromRDS, este parâmetro deverá ser definido como LATEST. |
CreationCategory | String | Não | Não | A edição do cluster. | Valores válidos:
Nota Basic é suportado para MySQL 5.6, 5.7, 8.0, PostgreSQL 14 e Oracle com sintaxe compatível 2.0. ArchiveNormal e NormalMultimaster são suportados para MySQL 8.0. SENormal é suportado para MySQL 5.6, 5.7, 8.0 e PostgreSQL 14. |
BackupRetentionPolicyOnClusterDeletion | String | Não | Não | A política de retenção de backup quando o cluster é excluído. | Valores válidos:
Por padrão, este parâmetro é definido como NONE, o que significa que nenhum backup é retido quando o cluster é excluído. Nota
|
ResourceGroupId | String | Não | Sim | O id do grupo de recursos. | Nenhuma |
DefaultTimeZone | String | Não | Não | O fuso horário do cluster (UTC). | Valor padrão: SYSTEM. O fuso horário padrão é o mesmo da região. Os valores válidos variam de -12:00 a +13:00, como 00:00. Nota Este parâmetro só entra em vigor quando DBType é definido como MySQL. |
GDNId | String | Não | Não | O id da Global Database Network. | Este parâmetro é obrigatório quando CreationOption é definido como CreateGdnStandby. |
LowerCaseTableNames | Integer | Não | Não | Especifica se os nomes das tabelas diferenciam maiúsculas de minúsculas. | Valores válidos:
Nota Este parâmetro só entra em vigor quando DBType é definido como MySQL. |
DBClusterParameters | Map | Não | Sim | Os parâmetros do cluster PolarDB. | Para obter mais informações, consulte DBClusterParameters properties. |
DeletionProtection | Boolean | Não | Sim | Especifica se a proteção contra exclusão está ativada. | Valores válidos:
|
TDEStatus | Boolean | Não | Sim | Especifica se a criptografia transparente de dados (TDE) está ativada. | Valores válidos:
Nota Este parâmetro só entra em vigor quando DBType é definido como PostgreSQL ou Oracle. |
PeriodUnit | String | Não | Sim | A unidade de tempo. | Valores válidos:
|
ScaleRoNumMin | Integer | Não | Não | O número mínimo de nós somente leitura para expansão e redução. | Valores válidos: 0 a 15. Nota Este parâmetro é suportado apenas para clusters Serverless. |
ScaleMax | Integer | Não | Não | A capacidade máxima para expansão e redução de um único nó. | Valores válidos: 1 PCU a 32 PCU. Nota Este parâmetro é suportado apenas para clusters Serverless. |
AllowShutDown | Boolean | Não | Não | Especifica se a suspensão por inatividade está ativada. | Valores válidos:
Nota Este parâmetro é suportado apenas para clusters Serverless. |
ServerlessType | String | Não | Não | O tipo de service Serverless. | Valor válido: AgileServerless. Nota Este parâmetro é suportado apenas para clusters Serverless. |
ScaleRoNumMax | Integer | Não | Não | O número máximo de nós somente leitura para expansão e redução. | Valores válidos: 0 a 15. Nota Este parâmetro é suportado apenas para clusters Serverless. |
ScaleMin | Integer | Não | Não | A capacidade mínima para expansão e redução de um único nó. | Valores válidos: 1 PCU a 31 PCU. Nota Este parâmetro é suportado apenas para clusters Serverless. |
SSLEnabled | String | Não | Sim | Modifique o status do SSL. | Valores válidos:
|
StorageType | String | Não | Não | A classe de armazenamento. | Valores válidos para a Enterprise Edition:
Valores válidos para a Standard Edition:
|
LooseXEngine | String | Não | Não | Ative o mecanismo de armazenamento X-Engine. | Valores válidos:
Nota Este parâmetro só entra em vigor quando CreationOption não é definido como CreateGdnStandby, DBType é definido como MySQL e DBVersion é definido como 8.0. A memória dos nós com o X-Engine ativado deve ser de pelo menos 16 GB. |
LoosePolarLogBin | String | Não | Não | Ative o log binário. | Valores válidos:
Nota Este parâmetro só entra em vigor quando DBType é definido como MySQL. |
StorageSpace | Integer | Não | Não | O espaço de armazenamento para faturamento por assinatura. | Unidade: GB. Nota
|
ProxyType | String | Não | Não | O tipo de proxy de banco de dados. | Valores válidos:
Nota O tipo de proxy deve corresponder às especificações do nó: Se as especificações do nó forem de uso geral, defina ProxyType como Standard Enterprise Edition. Se as especificações do nó forem dedicadas, defina ProxyType como Dedicated Enterprise Edition. |
StandbyAZ | String | Não | Não | A zona do cluster de armazenamento hot standby. | Este parâmetro se aplica a clusters da Standard Edition em um cenário de três zonas. Nota Este parâmetro só entra em vigor quando a consistência forte entre várias zonas está ativada. |
LooseXEngineUseMemoryPct | Integer | Não | Não | Define a porcentagem na qual o mecanismo de armazenamento X-Engine é ativado. | Valores válidos: números inteiros de 10 a 90. Nota Este parâmetro só entra em vigor quando LooseXEngine é definido como ON. |
StorageUpperBound | Integer | Não | Não | O limite superior para o dimensionamento automático de armazenamento de clusters da Standard Edition. | Unidade: GB. Nota O valor máximo é 32000. |
StrictConsistency | String | Não | Não | Especifica se a consistência forte entre várias zonas está ativada. | Valores válidos:
|
StoragePayType | String | Não | Não | O método de faturamento de armazenamento. | Valores válidos:
|
DBNodeNum | Integer | Não | Não | O número de nós para clusters da Standard Edition e Enterprise Edition. | Valores válidos:
Nota
|
ProxyClass | String | Não | Não | As especificações do proxy de banco de dados para clusters da Standard Edition. | Valores válidos:
|
HotStandbyCluster | String | Não | Não | Especifica se o cluster hot standby está ativado. | Valores válidos:
Nota O valor padrão para clusters da Standard Edition é STANDBY. |
StorageAutoScale | String | Não | Não | Especifica se o dimensionamento automático de armazenamento está ativado para clusters da Standard Edition. | Valores válidos:
|
Architecture | String | Não | Não | A arquitetura da cpu. | Valores válidos:
|
DBMinorVersion | String | Não | Não | A versão secundária do mecanismo de banco de dados. | Valores válidos:
Nota Este parâmetro só entra em vigor quando DBType é definido como MySQL e DBVersion é definido como 8.0. |
VpcId | String | Não | Não | O id da VPC. | Nenhuma |
ParameterGroupId | String | Não | Não | O id do modelo de parâmetro. | Você pode chamar a operação DescribeParameterGroups para visualize a lista e os ids de modelos de parâmetro na região de destino. |
RestartMasterNode | Boolean | Não | Não | Especifica se o nó primário deve ser reiniciado. | Valores válidos:
|
ColdStorageOption | Map | Não | Não | As opções de arquivamento de dados frios. | Para obter mais informações, consulte ColdStorageOption properties. |
ProvisionedIops | Integer | Não | Não | As IOPS provisionadas para discos ESSD AutoPL. | Valores válidos: 0 a min{50.000, 1000 × capacidade − desempenho de linha de base}. Desempenho de linha de base = min{1.800 + 50 × capacidade, 50.000}. Nota Este parâmetro é suportado apenas quando StorageType é definido como ESSDAUTOPL. |
Sintaxe de Tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriedades de Tags
|
Nome da propriedade |
Tipo |
Obrigatório |
Permite atualização |
Descrição |
Restrições |
|
Key |
String |
Sim |
Não |
A chave da tag. |
A chave deve ter de 1 a 128 caracteres. Não pode começar com |
|
Value |
String |
Não |
Não |
O valor da tag. |
O valor deve ter de 0 a 128 caracteres. Não pode começar com |
Sintaxe de DBClusterParameters
"DBClusterParameters": {
"Parameters": String,
"EffectiveTime": String
}
Propriedades de DBClusterParameters
Nome da propriedade | Tipo | Obrigatório | Permite atualização | Descrição | Restrições |
Parameters | String | Não | Sim | Uma string JSON de parâmetros e seus valores. | Todos os valores de parâmetro são strings. |
EffectiveTime | String | Não | Sim | O horário de vigência dos parâmetros. | Valores válidos:
|
Sintaxe de ColdStorageOption
"ColdStorageOption": {
"Description": String,
"Enable": Boolean
}
Propriedades de ColdStorageOption
Nome da propriedade | Tipo | Obrigatório | Permite atualização | Descrição | Restrições |
Description | String | Não | Não | A descrição. | Se uma descrição for especificada, o arquivamento de dados frios será ativado. A descrição pode ter até 256 caracteres. |
Enable | Boolean | Não | Não | Ative o arquivamento de dados frios. | Valores válidos:
|
Valores de retorno
Fn::GetAtt
DBClusterId: o id do cluster.
OrderId: o id do pedido.
DBNodeIds: os ids dos nós do cluster.
PrimaryEndpointId: o id do endpoint primário.
CustomEndpointIds: os ids dos endpoints personalizados do cluster.
CustomConnectionStrings: as strings de conexão personalizadas.
PrimaryConnectionString: a string de conexão primária.
ClusterConnectionString: a string de conexão do cluster.
ClusterEndpointId: o id do endpoint do cluster.
PrimaryEndpointIds: a lista de ids de endpoints primários.
PrimaryConnectionStrings: a lista de strings de conexão de endpoints primários.
ColdStorageInstanceId: o id da instância de banco de dados frio.
DBClusterDescription: a descrição do cluster.
Arn: o Alibaba Cloud Resource Name.
Exemplos
Cenário 1: criar um cluster PolarDB do tipo MySQL.
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud
zh-cn: Existing VPC instance ID
Label:
en: VPC ID
zh-cn: VPC instance ID
VSwitchZoneId:
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
Type: String
Description:
zh-cn: vSwitch zone
en: VSwitch Availability Zone
Label:
zh-cn: vSwitch zone
en: VSwitch Availability Zone
VSwitchId:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${VSwitchZoneId}
Type: String
Description:
en: Instance ID of existing business network switches, console-Virtual Private Cloud-VSwitches under query
zh-cn: Existing business network vSwitch instance ID
Label:
en: VSwitch ID
zh-cn: vSwitch instance ID
DBType:
Type: String
Description: |-
Database type, value:
MySQL
PostgreSQL
Oracle
Default: MySQL
DBVersion:
Type: String
Description: |-
The version of the database. Valid values:
MySQL: 5.6 or 8.0
PostgreSQL: 11
Oracle: 11
Default: '5.6'
DBNodeClass:
Type: String
Description: The node specifications of the cluster. For more information, see Specifications and pricing.
Default: polar.mysql.x4.medium
Resources:
DBCluster:
Type: ALIYUN::POLARDB::DBCluster
Properties:
VpcId:
Ref: VpcId
DBType:
Ref: DBType
ClusterNetworkType: VPC
ZoneId:
Ref: VSwitchZoneId
VSwitchId:
Ref: VSwitchId
DBVersion:
Ref: DBVersion
DBNodeClass:
Ref: DBNodeClass
PayType: Postpaid
Outputs:
DBClusterId:
Description: The ID of the ApsaraDB for POLARDB cluster.
Value:
Fn::GetAtt:
- DBCluster
- DBClusterId{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud",
"zh-cn": "Existing VPC instance ID"
},
"Label": {
"en": "VPC ID",
"zh-cn": "VPC instance ID"
}
},
"VSwitchZoneId": {
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
"Type": "String",
"Description": {
"zh-cn": "vSwitch zone",
"en": "VSwitch Availability Zone"
},
"Label": {
"zh-cn": "vSwitch zone",
"en": "VSwitch Availability Zone"
}
},
"VSwitchId": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${VSwitchZoneId}"
},
"Type": "String",
"Description": {
"en": "Instance ID of existing business network switches, console-Virtual Private Cloud-VSwitches under query",
"zh-cn": "Existing business network vSwitch instance ID"
},
"Label": {
"en": "VSwitch ID",
"zh-cn": "vSwitch instance ID"
}
},
"DBType": {
"Type": "String",
"Description": "Database type, value:\nMySQL\nPostgreSQL\nOracle",
"Default": "MySQL"
},
"DBVersion": {
"Type": "String",
"Description": "The version of the database. Valid values:\nMySQL: 5.6 or 8.0\nPostgreSQL: 11\nOracle: 11",
"Default": "5.6"
},
"DBNodeClass": {
"Type": "String",
"Description": "The node specifications of the cluster. For more information, see Specifications and pricing.",
"Default": "polar.mysql.x4.medium"
}
},
"Resources": {
"DBCluster": {
"Type": "ALIYUN::POLARDB::DBCluster",
"Properties": {
"VpcId": {
"Ref": "VpcId"
},
"DBType": {
"Ref": "DBType"
},
"ClusterNetworkType": "VPC",
"ZoneId": {
"Ref": "VSwitchZoneId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"DBVersion": {
"Ref": "DBVersion"
},
"DBNodeClass": {
"Ref": "DBNodeClass"
},
"PayType": "Postpaid"
}
}
},
"Outputs": {
"DBClusterId": {
"Description": "The ID of the ApsaraDB for POLARDB cluster.",
"Value": {
"Fn::GetAtt": [
"DBCluster",
"DBClusterId"
]
}
}
}
}Cenário 2: criar um cluster PolarDB do tipo PostgreSQL.
ROSTemplateFormatVersion: '2015-09-01'
Resources:
VPC:
Type: ALIYUN::ECS::VPC
Properties:
VpcName: polardb-test
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
VSwitchName: polardb-test
VpcId:
Ref: VPC
CidrBlock: 192.168.1.0/24
ZoneId: cn-beijing-k
PolardbCluster:
Type: ALIYUN::POLARDB::DBCluster
Properties:
VpcId:
Ref: VPC
CreationCategory: Normal
StorageType: PSL5
DBType: PostgreSQL
ClusterNetworkType: VPC
DBVersion: '16'
PayType: Postpaid
ZoneId: cn-beijing-k
VSwitchId:
Ref: VSwitch
DBNodeClass: polar.pg.sl.small
SecurityIPList: 0.0.0.0/0
ServerlessType: AgileServerless
ScaleMin: 1
ScaleMax: 3
ScaleRoNumMin: 1
ScaleRoNumMax: 2
HotStandbyCluster: 'OFF'
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"VPC": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"VpcName": "polardb-test",
"CidrBlock": "192.168.0.0/16"
}
},
"VSwitch": {
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"VSwitchName": "polardb-test",
"VpcId": {
"Ref": "VPC"
},
"CidrBlock": "192.168.1.0/24",
"ZoneId": "cn-beijing-k"
}
},
"PolardbCluster": {
"Type": "ALIYUN::POLARDB::DBCluster",
"Properties": {
"VpcId": {
"Ref": "VPC"
},
"CreationCategory": "Normal",
"StorageType": "PSL5",
"DBType": "PostgreSQL",
"ClusterNetworkType": "VPC",
"DBVersion": "16",
"PayType": "Postpaid",
"ZoneId": "cn-beijing-k",
"VSwitchId": {
"Ref": "VSwitch"
},
"DBNodeClass": "polar.pg.sl.small",
"SecurityIPList": "0.0.0.0/0",
"ServerlessType": "AgileServerless",
"ScaleMin": 1,
"ScaleMax": 3,
"ScaleRoNumMin": 1,
"ScaleRoNumMax": 2,
"HotStandbyCluster": "OFF"
}
}
}
}Cenário 3: usar SQL nativo para implementar recuperação inteligente multimodal.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Native SQL easily realizes multimodal intelligent retrieval.
en: Native SQL easily realizes multimodal intelligent retrieval.
Parameters:
CommonName:
Type: String
Default: SmartSearch
BucketName:
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 6
Prefix: test-bucket-
CharacterClasses:
- Class: lowercase
min: 1
Type: String
Label:
zh-cn: Bucket name
en: Bucket Name
ZoneId:
Type: String
Label:
zh-cn: Zone ID
en: Available Zone ID
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
AccountName:
Type: String
Label:
zh-cn: Database username
en: Account Name
Description:
zh-cn: The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).
en: The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).
ConstraintDescription:
zh-cn: The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).
en: The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).
AllowedPattern: '^[a-z][a-z0-9_]{0.30}[a-z0-9]$'
Default: polar_ai
MaxLength: 16
MinLength: 2
AccountPassword:
Type: String
Description:
en: Server login password, Length 8-32, must contain three(Capital letters, lowercase letters, numbers, !@#$%^&*()_+-= Special symbol in)
zh-cn: Database access password, length 8-32, must contain three (uppercase letters, lowercase letters, digits, and special characters from !@#$%^&*()_+-=)
Label:
en: Account Password
zh-cn: Database password
ConstraintDescription:
en: Length 8-32, must contain three(Capital letters, lowercase letters, numbers, !@#$%^&*()_+-=Special symbol in)
zh-cn: Length 8-32, must contain three (uppercase letters, lowercase letters, digits, and special characters from !@#$%^&*()_+-=)
AllowedPattern: '^[0-9A-Za-z_!@#$%^&*()_+\-=\+]+$'
MinLength: 8
MaxLength: 32
NoEcho: true
DBName:
Type: String
Label:
en: Database Name
zh-cn: Database name
AllowedPattern: ^[a-z][a-z0-9_-]{0,62}[a-z0-9]$
Description:
en: It is composed of lowercase letters, numbers, an underscore (-), and an underscore (_), ending with a lowercase letter or number, beginning with a letter, and ending with a letter or number, with a maximum of 64 characters.
zh-cn: Composed of lowercase letters, digits, hyphens (-), and underscores (_). It must start with a letter and end with a lowercase letter or digit. Maximum length: 64 characters.
ConstraintDescription:
en: It is composed of lowercase letters, numbers, an underscore (-), and an underscore (_), ending with a lowercase letter or number, beginning with a letter, and ending with a letter or number, with a maximum of 64 characters.
zh-cn: Composed of lowercase letters, digits, hyphens (-), and underscores (_). It must start with a letter and end with a lowercase letter or digit. Maximum length: 64 characters.
Default: db-test
PolarDBNodeClass:
Type: String
Label:
en: PolarDB Node Specifications
zh-cn: Specifications and proxy
AssociationProperty: ALIYUN::POLARDB::DBCluster::DBNodeClass
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
DBVersion: "14"
DBType: PostgreSQL
PayType: Postpaid
CommodityCode: polardb_payg
Default: polar.pg.g2.2xlarge.c
Resources:
VPC:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Fn::Sub: VPC_${CommonName}
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
VpcId:
Ref: VPC
CidrBlock: 192.168.1.0/24
ZoneId:
Ref: ZoneId
VSwitchName:
Fn::Sub: vsw_001_${CommonName}
PolardbCluster:
Type: ALIYUN::POLARDB::DBCluster
Properties:
VpcId:
Ref: VPC
SecurityIPList: 0.0.0.0/0
DBType: PostgreSQL
ClusterNetworkType: VPC
ZoneId:
Ref: ZoneId
VSwitchId:
Ref: VSwitch
DBVersion: "14"
CreationCategory: SENormal
StorageSpace: 20
HotStandbyCluster: 'OFF'
DBNodeClass:
Ref: PolarDBNodeClass
PayType: Postpaid
DBNodeNum: 2
StorageType: ESSDPL1
Account:
Type: ALIYUN::POLARDB::Account
Properties:
DBClusterId:
Ref: PolardbCluster
AccountName:
Ref: AccountName
AccountPassword:
Ref: AccountPassword
AccountType: Super
Database:
DependsOn: Account
Type: ALIYUN::POLARDB::Database
Properties:
CharacterSetName: utf8
AccountPrivilege: ReadWrite
AccountName:
Ref: AccountName
DBClusterId:
Ref: PolardbCluster
DBName:
Ref: DBName
Collate: C
Ctype: C
DBClusterEndpointAddress:
Type: ALIYUN::POLARDB::DBClusterEndpointAddress
DependsOn: Account
Properties:
DBClusterId:
Ref: PolardbCluster
DBEndpointId:
Fn::GetAtt:
- PolardbCluster
- ClusterEndpointId
OSSBucket:
Type: ALIYUN::OSS::Bucket
Properties:
BucketName:
Ref: BucketName
DeletionForce: true
RedundancyType: ZRS
Outputs:
BucketName:
Description:
en: OSS Bucket Name.
zh-cn: OSS bucket name.
Value:
Ref: BucketName
AccountName:
Description:
en: PolarDB account name.
zh-cn: PolarDB database username.
Value:
Ref: AccountName
AccountPassword:
NoEcho: true
Description:
en: PolarDB account password.
zh-cn: PolarDB database password.
Value:
Ref: AccountPassword
DBName:
Description:
en: PolarDB database name.
zh-cn: PolarDB database name.
Value:
Ref: DBName
ConnectionString:
Description:
en: PolarDB database connection string.
zh-cn: Public endpoint of the PolarDB database.
Value:
Fn::Sub: ${DBClusterEndpointAddress.ConnectionString}:5432
Metadata:
ALIYUN::ROS::Interface:
Outputs:
- BucketName
- AccountName
- AccountPassword
- DBName
- ConnectionString
ParameterGroups:
- Parameters:
- ZoneId
Label:
default:
en: Network Configuration
zh-cn: Basic network configuration
- Parameters:
- BucketName
Label:
default:
en: OSS Configuration
zh-cn: OSS basic configuration
- Parameters:
- PolarDBNodeClass
- DBName
- AccountName
- AccountPassword
Label:
default:
en: PolarDB PostgreSQL Configuration
zh-cn: ApsaraDB PolarDB for PostgreSQL configuration
TemplateTags:
- acs:technical-solution:internet-application-development:Native SQL easily realizes multimodal intelligent retrieval-tech_solu_262
Hidden:
- CommonName{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Native SQL easily realizes multimodal intelligent retrieval.",
"en": "Native SQL easily realizes multimodal intelligent retrieval."
},
"Parameters": {
"CommonName": {
"Type": "String",
"Default": "SmartSearch"
},
"BucketName": {
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 6,
"Prefix": "test-bucket-",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
},
"Type": "String",
"Label": {
"zh-cn": "Bucket name",
"en": "Bucket Name"
}
},
"ZoneId": {
"Type": "String",
"Label": {
"zh-cn": "Zone ID",
"en": "Available Zone ID"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"AccountName": {
"Type": "String",
"Label": {
"zh-cn": "Database username",
"en": "Account Name"
},
"Description": {
"zh-cn": "The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).",
"en": "The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_)."
},
"ConstraintDescription": {
"zh-cn": "The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_).",
"en": "The length should not exceed 16 characters. It begins with a lowercase English letter and can contain lowercase English letters, numbers and underscores (_)."
},
"AllowedPattern": "^[a-z][a-z0-9_]{0.30}[a-z0-9]$",
"Default": "polar_ai",
"MaxLength": 16,
"MinLength": 2
},
"AccountPassword": {
"Type": "String",
"Description": {
"en": "Server login password, Length 8-32, must contain three(Capital letters, lowercase letters, numbers, !@#$%^&*()_+-= Special symbol in)",
"zh-cn": "Database access password, length 8-32, must contain three (uppercase letters, lowercase letters, digits, and special characters from !@#$%^&*()_+-=)"
},
"Label": {
"en": "Account Password",
"zh-cn": "Database password"
},
"ConstraintDescription": {
"en": "Length 8-32, must contain three(Capital letters, lowercase letters, numbers, !@#$%^&*()_+-=Special symbol in)",
"zh-cn": "Length 8-32, must contain three (uppercase letters, lowercase letters, digits, and special characters from !@#$%^&*()_+-=)"
},
"AllowedPattern": "^[0-9A-Za-z_!@#$%^&*()_+\\-=\\+]+$",
"MinLength": 8,
"MaxLength": 32,
"NoEcho": true
},
"DBName": {
"Type": "String",
"Label": {
"en": "Database Name",
"zh-cn": "Database name"
},
"AllowedPattern": "^[a-z][a-z0-9_-]{0.62}[a-z0-9]$",
"Description": {
"en": "It is composed of lowercase letters, numbers, an underscore (-), and an underscore (_), ending with a lowercase letter or number, beginning with a letter, and ending with a letter or number, with a maximum of 64 characters.",
"zh-cn": "Composed of lowercase letters, digits, hyphens (-), and underscores (_). It must start with a letter and end with a lowercase letter or digit. Maximum length: 64 characters."
},
"ConstraintDescription": {
"en": "It is composed of lowercase letters, numbers, an underscore (-), and an underscore (_), ending with a lowercase letter or number, beginning with a letter, and ending with a letter or number, with a maximum of 64 characters.",
"zh-cn": "Composed of lowercase letters, digits, hyphens (-), and underscores (_). It must start with a letter and end with a lowercase letter or digit. Maximum length: 64 characters."
},
"Default": "db-test"
},
"PolarDBNodeClass": {
"Type": "String",
"Label": {
"en": "PolarDB Node Specifications",
"zh-cn": "Specifications and proxy"
},
"AssociationProperty": "ALIYUN::POLARDB::DBCluster::DBNodeClass",
"AssociationPropertyMetadata": {
"ZoneId": "${ZoneId}",
"DBVersion": "14",
"DBType": "PostgreSQL",
"PayType": "Postpaid",
"CommodityCode": "polardb_payg"
},
"Default": "polar.pg.g2.2xlarge.c"
}
},
"Resources": {
"VPC": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"VpcName": {
"Fn::Sub": "VPC_${CommonName}"
},
"CidrBlock": "192.168.0.0/16"
}
},
"VSwitch": {
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"VpcId": {
"Ref": "VPC"
},
"CidrBlock": "192.168.1.0/24",
"ZoneId": {
"Ref": "ZoneId"
},
"VSwitchName": {
"Fn::Sub": "vsw_001_${CommonName}"
}
}
},
"PolardbCluster": {
"Type": "ALIYUN::POLARDB::DBCluster",
"Properties": {
"VpcId": {
"Ref": "VPC"
},
"SecurityIPList": "0.0.0.0/0",
"DBType": "PostgreSQL",
"ClusterNetworkType": "VPC",
"ZoneId": {
"Ref": "ZoneId"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"DBVersion": "14",
"CreationCategory": "SENormal",
"StorageSpace": 20,
"HotStandbyCluster": "OFF",
"DBNodeClass": {
"Ref": "PolarDBNodeClass"
},
"PayType": "Postpaid",
"DBNodeNum": 2,
"StorageType": "ESSDPL1"
}
},
"Account": {
"Type": "ALIYUN::POLARDB::Account",
"Properties": {
"DBClusterId": {
"Ref": "PolardbCluster"
},
"AccountName": {
"Ref": "AccountName"
},
"AccountPassword": {
"Ref": "AccountPassword"
},
"AccountType": "Super"
}
},
"Database": {
"DependsOn": "Account",
"Type": "ALIYUN::POLARDB::Database",
"Properties": {
"CharacterSetName": "utf8",
"AccountPrivilege": "ReadWrite",
"AccountName": {
"Ref": "AccountName"
},
"DBClusterId": {
"Ref": "PolardbCluster"
},
"DBName": {
"Ref": "DBName"
},
"Collate": "C",
"Ctype": "C"
}
},
"DBClusterEndpointAddress": {
"Type": "ALIYUN::POLARDB::DBClusterEndpointAddress",
"DependsOn": "Account",
"Properties": {
"DBClusterId": {
"Ref": "PolardbCluster"
},
"DBEndpointId": {
"Fn::GetAtt": [
"PolardbCluster",
"ClusterEndpointId"
]
}
}
},
"OSSBucket": {
"Type": "ALIYUN::OSS::Bucket",
"Properties": {
"BucketName": {
"Ref": "BucketName"
},
"DeletionForce": true,
"RedundancyType": "ZRS"
}
}
},
"Outputs": {
"BucketName": {
"Description": {
"en": "OSS Bucket Name.",
"zh-cn": "OSS bucket name."
},
"Value": {
"Ref": "BucketName"
}
},
"AccountName": {
"Description": {
"en": "PolarDB account name.",
"zh-cn": "PolarDB database username."
},
"Value": {
"Ref": "AccountName"
}
},
"AccountPassword": {
"NoEcho": true,
"Description": {
"en": "PolarDB account password.",
"zh-cn": "PolarDB database password."
},
"Value": {
"Ref": "AccountPassword"
}
},
"DBName": {
"Description": {
"en": "PolarDB database name.",
"zh-cn": "PolarDB database name."
},
"Value": {
"Ref": "DBName"
}
},
"ConnectionString": {
"Description": {
"en": "PolarDB database connection string.",
"zh-cn": "Public endpoint of the PolarDB database."
},
"Value": {
"Fn::Sub": "${DBClusterEndpointAddress.ConnectionString}:5432"
}
}
},
"Metadata": {
"ALIYUN::ROS::Interface": {
"Outputs": [
"BucketName",
"AccountName",
"AccountPassword",
"DBName",
"ConnectionString"
],
"ParameterGroups": [
{
"Parameters": [
"ZoneId"
],
"Label": {
"default": {
"en": "Network Configuration",
"zh-cn": "Basic network configuration"
}
}
},
{
"Parameters": [
"BucketName"
],
"Label": {
"default": {
"en": "OSS Configuration",
"zh-cn": "OSS basic configuration"
}
}
},
{
"Parameters": [
"PolarDBNodeClass",
"DBName",
"AccountName",
"AccountPassword"
],
"Label": {
"default": {
"en": "PolarDB PostgreSQL Configuration",
"zh-cn": "ApsaraDB PolarDB for PostgreSQL configuration"
}
}
}
],
"TemplateTags": [
"acs:technical-solution:internet-application-development:Native SQL easily realizes multimodal intelligent retrieval-tech_solu_262"
],
"Hidden": [
"CommonName"
]
}
}
}Para obter mais exemplos, consulte Modelos públicos que contêm este recurso.