El tipo de recurso ALIYUN::POLARDB::DBCluster crea un clúster de PolarDB.
Sintaxis
{
"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
}
}
Propiedades
Nombre de la propiedad | Tipo | Obligatorio | Actualización permitida | Descripción | Restricciones |
DBType | String | Sí | No | El tipo de motor de base de datos. | Valores válidos:
|
DBNodeClass | String | Sí | No | Las especificaciones del nodo. | Para obtener más información sobre las especificaciones de los nodos, consulte los siguientes temas:
Nota Para crear un clúster serverless en PolarDB for MySQL Cluster Edition, establezca este parámetro en polar.mysql.sl.small. Para crear un clúster serverless en PolarDB for MySQL Standard Edition, establezca este parámetro en polar.mysql.sl.small.c. Para crear un clúster serverless en PolarDB for PostgreSQL (compatible con Oracle) o PolarDB for PostgreSQL, establezca este parámetro en polar.pg.sl.small.c. |
DBVersion | String | Sí | No | La versión de la base de datos. | Valores válidos:
|
PayType | String | Sí | Sí | El método de facturación. | Valores válidos:
|
AutoRenewPeriod | Integer | No | Sí | El periodo de renovación automática de la instancia. | Valores válidos:
Unidad: meses. |
DBClusterDescription | String | No | Sí | La descripción del clúster. | La descripción debe tener entre 2 y 256 caracteres. Debe comenzar con una letra o un carácter chino y no puede empezar con |
ClusterNetworkType | String | No | No | El tipo de red del clúster. | Solo se admite VPC. Valor válido: VPC. |
RenewalStatus | String | No | Sí | El estado de la renovación automática. | Valores válidos:
|
Period | Integer | No | Sí | La duración de la suscripción. Este parámetro surte efecto solo cuando PayType se establece en Prepaid. | Valores válidos:
Unidad: meses. |
ZoneId | String | No | No | El identificador de la zona. | Puede llamar a la operación DescribeRegions para consultar las zonas disponibles. |
SourceResourceId | String | No | No | El identificador de la instancia RDS de origen o del clúster PolarDB de origen. | El identificador de la instancia RDS de origen o del clúster PolarDB de origen. Este parámetro es obligatorio solo cuando CreationOption se establece en MigrationFromRDS, CloneFromRDS, CloneFromPolarDB o RecoverFromRecyclebin.
|
SecurityGroupIds | List | No | Sí | La lista de identificadores de security group. | Se pueden especificar hasta tres security groups. |
Tags | List | No | Sí | Las etiquetas. | Se pueden agregar hasta 20 etiquetas. Para obtener más información, consulte Tags properties. |
MaintainTime | String | No | Sí | La ventana de mantenimiento del clúster. | Formato: HH:mmZ-HH:mmZ. Ejemplo: 16:00Z-17:00Z, lo que indica una ventana de mantenimiento de 00:00 a 01:00 (UTC+8). |
CreationOption | String | No | No | El método de creación. | Valores válidos:
Valor predeterminado: Normal. Nota Si DBType se establece en MySQL y DBVersion en 8.0, este parámetro se puede configurar en CreateGdnStandby. |
VSwitchId | String | No | No | El identificador del vSwitch. | Ninguna |
SecurityIPList | String | No | No | La lista blanca de direcciones IP del clúster PolarDB. | Nota Se pueden especificar varias direcciones IP en la lista blanca. Sepárelas con comas (,). |
CloneDataPoint | String | No | No | El punto en el tiempo para clonar los datos. | Valores válidos:
Nota Si CreationOption se establece en CloneFromRDS, este parámetro debe configurarse en LATEST. |
CreationCategory | String | No | No | La edición del clúster. | Valores válidos:
Nota Basic es compatible con MySQL 5.6, 5.7, 8.0, PostgreSQL 14 y sintaxis compatible con Oracle 2.0. ArchiveNormal y NormalMultimaster son compatibles con MySQL 8.0. SENormal es compatible con MySQL 5.6, 5.7, 8.0 y PostgreSQL 14. |
BackupRetentionPolicyOnClusterDeletion | String | No | No | La política de retención de copias de seguridad al eliminar el clúster. | Valores válidos:
De forma predeterminada, este parámetro se establece en NONE, lo que significa que no se conservan copias de seguridad al eliminar el clúster. Nota
|
ResourceGroupId | String | No | Sí | El identificador del resource group. | Ninguna |
DefaultTimeZone | String | No | No | La zona horaria del clúster (UTC). | Valor predeterminado: SYSTEM. La zona horaria predeterminada coincide con la de la región. Los valores válidos van de -12:00 a +13:00, por ejemplo, 00:00. Nota Este parámetro surte efecto solo cuando DBType se establece en MySQL. |
GDNId | String | No | No | El identificador de Global Database Network. | Este parámetro es obligatorio cuando CreationOption se establece en CreateGdnStandby. |
LowerCaseTableNames | Integer | No | No | Indica si los nombres de las tablas distinguen entre mayúsculas y minúsculas. | Valores válidos:
Nota Este parámetro surte efecto solo cuando DBType se establece en MySQL. |
DBClusterParameters | Map | No | Sí | Los parámetros del clúster PolarDB. | Para obtener más información, consulte DBClusterParameters properties. |
DeletionProtection | Boolean | No | Sí | Indica si la protección contra eliminación está habilitada. | Valores válidos:
|
TDEStatus | Boolean | No | Sí | Indica si el cifrado transparente de datos (TDE) está habilitado. | Valores válidos:
Nota Este parámetro surte efecto solo cuando DBType se establece en PostgreSQL u Oracle. |
PeriodUnit | String | No | Sí | La unidad de tiempo. | Valores válidos:
|
ScaleRoNumMin | Integer | No | No | El número mínimo de nodos de solo lectura para escalar horizontalmente. | Valores válidos: de 0 a 15. Nota Este parámetro solo es compatible con los clústeres serverless. |
ScaleMax | Integer | No | No | La capacidad máxima para escalar un solo nodo. | Valores válidos: de 1 PCU a 32 PCU. Nota Este parámetro solo es compatible con los clústeres serverless. |
AllowShutDown | Boolean | No | No | Indica si la suspensión por inactividad está habilitada. | Valores válidos:
Nota Este parámetro solo es compatible con los clústeres serverless. |
ServerlessType | String | No | No | El tipo de servicio serverless. | Valor válido: AgileServerless. Nota Este parámetro solo es compatible con los clústeres serverless. |
ScaleRoNumMax | Integer | No | No | El número máximo de nodos de solo lectura para escalar horizontalmente. | Valores válidos: de 0 a 15. Nota Este parámetro solo es compatible con los clústeres serverless. |
ScaleMin | Integer | No | No | La capacidad mínima para escalar un solo nodo. | Valores válidos: de 1 PCU a 31 PCU. Nota Este parámetro solo es compatible con los clústeres serverless. |
SSLEnabled | String | No | Sí | Modifica el estado de SSL. | Valores válidos:
|
StorageType | String | No | No | La clase de almacenamiento. | Valores válidos para Enterprise Edition:
Valores válidos para Standard Edition:
|
LooseXEngine | String | No | No | Habilita el motor de almacenamiento X-Engine. | Valores válidos:
Nota Este parámetro surte efecto solo cuando CreationOption no se establece en CreateGdnStandby, DBType se configura en MySQL y DBVersion en 8.0. La memoria de los nodos con X-Engine habilitado debe ser como mínimo de 16 GB. |
LoosePolarLogBin | String | No | No | Habilita el registro binario. | Valores válidos:
Nota Este parámetro surte efecto solo cuando DBType se establece en MySQL. |
StorageSpace | Integer | No | No | El espacio de almacenamiento para la facturación por suscripción. | Unidad: GB. Nota
|
ProxyType | String | No | No | El tipo de proxy de la base de datos. | Valores válidos:
Nota El tipo de proxy debe coincidir con las especificaciones del nodo: Si las especificaciones del nodo son de uso general, establezca ProxyType en Standard Enterprise Edition. Si las especificaciones del nodo son dedicadas, establezca ProxyType en Dedicated Enterprise Edition. |
StandbyAZ | String | No | No | La zona del clúster de almacenamiento en espera activa. | Este parámetro aplica a los clústeres Standard Edition en un escenario de tres zonas. Nota Este parámetro surte efecto solo cuando la consistencia fuerte entre varias zonas está habilitada. |
LooseXEngineUseMemoryPct | Integer | No | No | Establezca el porcentaje de memoria a partir del cual se habilita el motor de almacenamiento X-Engine. | Valores válidos: números enteros del 10 al 90. Nota Este parámetro surte efecto solo cuando LooseXEngine se establece en ON. |
StorageUpperBound | Integer | No | No | El límite superior para el escalado automático de almacenamiento en clústeres Standard Edition. | Unidad: GB. Nota El valor máximo es 32000. |
StrictConsistency | String | No | No | Indica si la consistencia fuerte entre varias zonas está habilitada. | Valores válidos:
|
StoragePayType | String | No | No | El método de facturación del almacenamiento. | Valores válidos:
|
DBNodeNum | Integer | No | No | El número de nodos para los clústeres Standard Edition y Enterprise Edition. | Valores válidos:
Nota
|
ProxyClass | String | No | No | Las especificaciones del proxy de base de datos para los clústeres Standard Edition. | Valores válidos:
|
HotStandbyCluster | String | No | No | Indica si el clúster en espera activa está habilitado. | Valores válidos:
Nota El valor predeterminado para los clústeres Standard Edition es STANDBY. |
StorageAutoScale | String | No | No | Indica si el escalado automático de almacenamiento está habilitado para los clústeres Standard Edition. | Valores válidos:
|
Architecture | String | No | No | La arquitectura de CPU. | Valores válidos:
|
DBMinorVersion | String | No | No | La versión secundaria del motor de base de datos. | Valores válidos:
Nota Este parámetro surte efecto solo cuando DBType se establece en MySQL y DBVersion en 8.0. |
VpcId | String | No | No | El identificador de la VPC. | Ninguna |
ParameterGroupId | String | No | No | El identificador de la plantilla de parámetros. | Puede llamar a la operación DescribeParameterGroups para consultar la lista y los identificadores de plantillas de parámetros en la región de destino. |
RestartMasterNode | Boolean | No | No | Indica si se debe reiniciar el nodo principal. | Valores válidos:
|
ColdStorageOption | Map | No | No | Las opciones de archivado de datos fríos. | Para obtener más información, consulte ColdStorageOption properties. |
ProvisionedIops | Integer | No | No | Las IOPS aprovisionadas para discos ESSD AutoPL. | Valores válidos: de 0 a min{50,000, 1000 × capacidad − rendimiento base}. Rendimiento base = min{1,800 + 50 × capacidad, 50,000}. Nota Este parámetro solo es compatible cuando StorageType se establece en ESSDAUTOPL. |
Sintaxis de Tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propiedades de Tags
|
Nombre de la propiedad |
Tipo |
Obligatorio |
Actualización permitida |
Descripción |
Restricciones |
|
Key |
String |
Sí |
No |
La clave de la etiqueta. |
La clave debe tener entre 1 y 128 caracteres. No puede comenzar con |
|
Value |
String |
No |
No |
El valor de la etiqueta. |
El valor debe tener entre 0 y 128 caracteres. No puede comenzar con |
Sintaxis de DBClusterParameters
"DBClusterParameters": {
"Parameters": String,
"EffectiveTime": String
}
Propiedades de DBClusterParameters
Nombre de la propiedad | Tipo | Obligatorio | Actualización permitida | Descripción | Restricciones |
Parameters | String | No | Sí | Cadena JSON con los parámetros y sus valores. | Todos los valores de los parámetros son cadenas. |
EffectiveTime | String | No | Sí | Hora en que los parámetros entran en vigor. | Valores válidos:
|
Sintaxis de ColdStorageOption
"ColdStorageOption": {
"Description": String,
"Enable": Boolean
}
Propiedades de ColdStorageOption
Nombre de la propiedad | Tipo | Obligatorio | Actualización permitida | Descripción | Restricciones |
Description | String | No | No | La descripción. | Si se especifica una descripción, se habilita el archivado de datos fríos. La descripción puede tener hasta 256 caracteres. |
Enable | Boolean | No | No | Habilite el archivado de datos fríos. | Valores válidos:
|
Valores de retorno
Fn::GetAtt
DBClusterId: el ID del clúster.
OrderId: el ID del pedido.
DBNodeIds: los ID de los nodos del clúster.
PrimaryEndpointId: el ID del endpoint principal.
CustomEndpointIds: los ID de los endpoints personalizados del clúster.
CustomConnectionStrings: las cadenas de conexión personalizadas.
PrimaryConnectionString: la cadena de conexión principal.
ClusterConnectionString: la cadena de conexión del clúster.
ClusterEndpointId: el ID del endpoint del clúster.
PrimaryEndpointIds: la lista de ID de endpoints principales.
PrimaryConnectionStrings: la lista de cadenas de conexión de los endpoints principales.
ColdStorageInstanceId: el ID de la instancia de base de datos fría.
DBClusterDescription: la descripción del clúster.
Arn: el Alibaba Cloud Resource Name.
Ejemplos
Escenario 1: cree un clúster de PolarDB de 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"
]
}
}
}
}Escenario 2: cree un clúster de PolarDB de 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"
}
}
}
}Escenario 3: use SQL nativo para implementar la recuperación 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 consultar más ejemplos, consulte Plantillas públicas que contienen este recurso.