Tipe resource ALIYUN::POLARDB::DBCluster digunakan untuk membuat kluster PolarDB.
Sintaksis
{
"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
}
}Properti
Nama Properti | Type | Wajib | Pembaruan diizinkan | Deskripsi | Batasan |
DBType | String | Ya | Tidak | Jenis mesin database. | Nilai yang valid:
|
DBNodeClass | String | Ya | Tidak | Spesifikasi node. | Untuk informasi lebih lanjut mengenai spesifikasi node, lihat topik berikut:
Catatan Untuk membuat kluster Serverless di PolarDB for MySQL Edisi Kluster, atur parameter ini ke polar.mysql.sl.small. Untuk membuat kluster Serverless di PolarDB for MySQL Edisi Standar, atur parameter ini ke polar.mysql.sl.small.c. Untuk membuat kluster Serverless di PolarDB for PostgreSQL (Kompatibel dengan Oracle) atau PolarDB for PostgreSQL, atur parameter ini ke polar.pg.sl.small.c. |
DBVersion | String | Ya | Tidak | Versi database. | Nilai yang valid:
|
PayType | String | Ya | Ya | Metode penagihan. | Nilai yang valid:
|
AutoRenewPeriod | Integer | Tidak | Ya | Periode perpanjangan otomatis untuk instans. | Nilai yang valid:
Unit: bulan. |
DBClusterDescription | String | Tidak | Ya | Deskripsi kluster. | Deskripsi harus terdiri dari 2 hingga 256 karakter. Deskripsi harus dimulai dengan huruf atau karakter Tionghoa dan tidak boleh dimulai dengan |
ClusterNetworkType | String | Tidak | Tidak | Jenis jaringan kluster. | Hanya VPC yang didukung. Nilai yang valid: VPC. |
RenewalStatus | String | Tidak | Ya | Status perpanjangan otomatis. | Nilai yang valid:
|
Period | Integer | Tidak | Ya | Durasi langganan. Parameter ini hanya berlaku ketika PayType diatur ke Prepaid. | Nilai yang valid:
Unit: bulan. |
ZoneId | String | Tidak | Tidak | ID zona. | Anda dapat memanggil operasi DescribeRegions untuk menanyakan zona yang tersedia. |
SourceResourceId | String | Tidak | Tidak | ID instans RDS sumber atau kluster PolarDB sumber. | ID instans RDS sumber atau kluster PolarDB sumber. Parameter ini wajib hanya ketika CreationOption diatur ke MigrationFromRDS, CloneFromRDS, CloneFromPolarDB, atau RecoverFromRecyclebin.
|
SecurityGroupIds | List | Tidak | Ya | Daftar ID grup keamanan. | Anda dapat menentukan hingga tiga grup keamanan. |
Tags | List | Tidak | Ya | Tag. | Anda dapat menambahkan hingga 20 tag. Untuk informasi selengkapnya, lihat Properti Tags. |
MaintainTime | String | Tidak | Ya | Jendela pemeliharaan kluster. | Format: HH:mmZ-HH:mmZ. Contoh: 16:00Z-17:00Z, yang menunjukkan jendela pemeliharaan dari pukul 00:00 hingga 01:00 (UTC+8). |
CreationOption | String | Tidak | Tidak | Metode pembuatan. | Nilai yang valid:
Nilai default: Normal. Catatan Jika DBType diatur ke MySQL dan DBVersion diatur ke 8.0, Anda dapat mengatur parameter ini ke CreateGdnStandby. |
VSwitchId | String | Tidak | Tidak | ID vSwitch. | Tidak ada |
SecurityIPList | String | Tidak | Tidak | Daftar putih alamat IP kluster PolarDB. | Catatan Anda dapat menentukan beberapa alamat IP dalam daftar putih. Pisahkan beberapa alamat IP dengan koma (,). |
CloneDataPoint | String | Tidak | Tidak | Titik waktu untuk kloning data. | Nilai yang valid:
Catatan Jika CreationOption diatur ke CloneFromRDS, parameter ini harus diatur ke LATEST. |
CreationCategory | String | Tidak | Tidak | Edisi kluster. | Nilai yang valid:
Catatan Basic didukung untuk MySQL 5.6, 5.7, 8.0, PostgreSQL 14, dan Oracle syntax-compatible 2.0. ArchiveNormal dan NormalMultimaster didukung untuk MySQL 8.0. SENormal didukung untuk MySQL 5.6, 5.7, 8.0, dan PostgreSQL 14. |
BackupRetentionPolicyOnClusterDeletion | String | Tidak | Tidak | Kebijakan retensi backup saat kluster dihapus. | Nilai yang valid:
Secara default, parameter ini diatur ke NONE, yang berarti tidak ada backup yang dipertahankan saat kluster dihapus. Catatan
|
ResourceGroupId | String | Tidak | Ya | ID kelompok sumber daya. | Tidak ada |
DefaultTimeZone | String | Tidak | Tidak | Zona waktu kluster (UTC). | Nilai default: SYSTEM. Zona waktu default sama dengan zona waktu wilayah. Nilai yang valid berkisar dari -12:00 hingga +13:00, seperti 00:00. Catatan Parameter ini hanya berlaku ketika DBType diatur ke MySQL. |
GDNId | String | Tidak | Tidak | ID Jaringan Basis Data Global. | Parameter ini wajib ketika CreationOption diatur ke CreateGdnStandby. |
LowerCaseTableNames | Integer | Tidak | Tidak | Menentukan apakah nama tabel peka terhadap huruf besar/kecil. | Nilai yang valid:
Catatan Parameter ini hanya berlaku ketika DBType diatur ke MySQL. |
DBClusterParameters | Map | Tidak | Ya | Parameter kluster PolarDB. | Untuk informasi selengkapnya, lihat Properti DBClusterParameters. |
DeletionProtection | Boolean | Tidak | Ya | Menentukan apakah perlindungan penghapusan diaktifkan. | Nilai yang valid:
|
TDEStatus | Boolean | Tidak | Ya | Menentukan apakah Enkripsi Data Transparan (TDE) diaktifkan. | Nilai yang valid:
Catatan Parameter ini hanya berlaku ketika DBType diatur ke PostgreSQL atau Oracle. |
PeriodUnit | String | Tidak | Ya | Unit waktu. | Nilai yang valid:
|
ScaleRoNumMin | Integer | Tidak | Tidak | Jumlah minimum node read-only untuk skala keluar dan skala-masuk. | Nilai yang valid: 0 hingga 15. Catatan Parameter ini hanya didukung untuk kluster Serverless. |
ScaleMax | Integer | Tidak | Tidak | Kapasitas maksimum untuk skala keluar dan skala-masuk satu node. | Nilai yang valid: 1 PCU hingga 32 PCU. Catatan Parameter ini hanya didukung untuk kluster Serverless. |
AllowShutDown | Boolean | Tidak | Tidak | Menentukan apakah Penangguhan Tanpa Aktivitas diaktifkan. | Nilai yang valid:
Catatan Parameter ini hanya didukung untuk kluster Serverless. |
ServerlessType | String | Tidak | Tidak | Jenis layanan Serverless. | Nilai yang valid: AgileServerless. Catatan Parameter ini hanya didukung untuk kluster Serverless. |
ScaleRoNumMax | Integer | Tidak | Tidak | Jumlah maksimum node read-only untuk skala keluar dan skala-masuk. | Nilai yang valid: 0 hingga 15. Catatan Parameter ini hanya didukung untuk kluster Serverless. |
ScaleMin | Integer | Tidak | Tidak | Kapasitas minimum untuk skala keluar dan skala-masuk satu node. | Nilai yang valid: 1 PCU hingga 31 PCU. Catatan Parameter ini hanya didukung untuk kluster Serverless. |
SSLEnabled | String | Tidak | Ya | Ubah status SSL. | Nilai yang valid:
|
StorageType | String | Tidak | Tidak | Kelas penyimpanan. | Nilai yang valid untuk Edisi Perusahaan:
Nilai yang valid untuk Edisi Standar:
|
LooseXEngine | String | Tidak | Tidak | Aktifkan mesin penyimpanan X-Engine. | Nilai yang valid:
Catatan Parameter ini hanya berlaku ketika CreationOption tidak diatur ke CreateGdnStandby, DBType diatur ke MySQL, dan DBVersion diatur ke 8.0. Memori node dengan X-Engine yang diaktifkan harus minimal 16 GB. |
LoosePolarLogBin | String | Tidak | Tidak | Aktifkan binary logging. | Nilai yang valid:
Catatan Parameter ini hanya berlaku ketika DBType diatur ke MySQL. |
StorageSpace | Integer | Tidak | Tidak | Ruang penyimpanan untuk penagihan langganan. | Unit: GB. Catatan
|
ProxyType | String | Tidak | Tidak | Jenis proksi database. | Nilai yang valid:
Catatan Jenis proksi harus sesuai dengan spesifikasi node: Jika spesifikasi node bersifat general-purpose, atur ProxyType ke Edisi Perusahaan Standar. Jika spesifikasi node bersifat dedicated, atur ProxyType ke Edisi Perusahaan Khusus. |
StandbyAZ | String | Tidak | Tidak | Zona klaster penyimpanan siaga panas. | Parameter ini berlaku untuk kluster Edisi Standar dalam skenario tiga zona. Catatan Parameter ini hanya berlaku ketika konsistensi kuat lintas beberapa zona diaktifkan. |
LooseXEngineUseMemoryPct | Integer | Tidak | Tidak | Atur persentase untuk mengaktifkan mesin penyimpanan X-Engine. | Nilai yang valid: bilangan bulat dari 10 hingga 90. Catatan Parameter ini hanya berlaku ketika LooseXEngine diatur ke ON. |
StorageUpperBound | Integer | Tidak | Tidak | Batas atas untuk penskalaan penyimpanan otomatis kluster Edisi Standar. | Unit: GB. Catatan Nilai maksimum adalah 32000. |
StrictConsistency | String | Tidak | Tidak | Menentukan apakah konsistensi kuat lintas beberapa zona diaktifkan. | Nilai yang valid:
|
StoragePayType | String | Tidak | Tidak | Metode penagihan penyimpanan. | Nilai yang valid:
|
DBNodeNum | Integer | Tidak | Tidak | Jumlah node untuk kluster Edisi Standar dan Edisi Perusahaan. | Nilai yang valid:
Catatan
|
ProxyClass | String | Tidak | Tidak | Spesifikasi proksi database untuk kluster Edisi Standar. | Nilai yang valid:
|
HotStandbyCluster | String | Tidak | Tidak | Menentukan apakah kluster hot standby diaktifkan. | Nilai yang valid:
Catatan Nilai default untuk kluster Edisi Standar adalah STANDBY. |
StorageAutoScale | String | Tidak | Tidak | Menentukan apakah penskalaan penyimpanan otomatis diaktifkan untuk kluster Edisi Standar. | Nilai yang valid:
|
Architecture | String | Tidak | Tidak | Arsitektur CPU. | Nilai yang valid:
|
DBMinorVersion | String | Tidak | Tidak | Versi minor mesin database. | Nilai yang valid:
Catatan Parameter ini hanya berlaku ketika DBType diatur ke MySQL dan DBVersion diatur ke 8.0. |
VpcId | String | Tidak | Tidak | ID VPC. | Tidak ada |
ParameterGroupId | String | Tidak | Tidak | ID template parameter. | Anda dapat memanggil operasi DescribeParameterGroups untuk melihat daftar template parameter dan ID-nya di wilayah tujuan. |
RestartMasterNode | Boolean | Tidak | Tidak | Menentukan apakah akan me-restart node primary. | Nilai yang valid:
|
ColdStorageOption | Map | Tidak | Tidak | Opsi pengarsipan data dingin. | Untuk informasi selengkapnya, lihat Properti ColdStorageOption. |
ProvisionedIops | Integer | Tidak | Tidak | IOPS yang disediakan untuk disk ESSD AutoPL. | Nilai yang valid: 0 hingga min{50.000, 1000 × kapasitas − kinerja dasar}. Kinerja dasar = min{1.800 + 50 × kapasitas, 50.000}. Catatan Parameter ini hanya didukung ketika StorageType diatur ke ESSDAUTOPL. |
Sintaksis Tags
"Tags": [
{
"Key": String,
"Value": String
}
] Properti Tags
Nama properti | Tipe | Wajib | Pembaruan diizinkan | Deskripsi | Batasan |
Key | String | Ya | Tidak | Kunci tag. | Kunci harus terdiri dari 1 hingga 128 karakter. Kunci tidak boleh dimulai dengan |
Value | String | Tidak | Tidak | Nilai tag. | Nilai harus terdiri dari 0 hingga 128 karakter. Nilai tidak boleh dimulai dengan |
Sintaksis DBClusterParameters
"DBClusterParameters": {
"Parameters": String,
"EffectiveTime": String
}Properti DBClusterParameters
Nama Properti | Tipe | Wajib | Pembaruan diizinkan | Deskripsi | Batasan |
Parameters | String | Tidak | Ya | String JSON berisi parameter dan nilainya. | Semua nilai parameter berupa string. |
EffectiveTime | String | Tidak | Ya | Waktu efektif parameter. | Nilai yang valid:
|
Sintaksis ColdStorageOption
"ColdStorageOption": {
"Description": String,
"Enable": Boolean
}Properti ColdStorageOption
Nama Properti | Tipe | Wajib | Pembaruan diizinkan | Deskripsi | Batasan |
Description | String | Tidak | Tidak | Deskripsi. | Jika deskripsi ditentukan, pengarsipan data dingin diaktifkan. Deskripsi dapat terdiri dari maksimal 256 karakter. |
Enable | Boolean | Tidak | Tidak | Aktifkan pengarsipan data dingin. | Nilai yang valid:
|
Nilai kembalian
Fn::GetAtt
DBClusterId: ID kluster.
OrderId: ID pesanan.
DBNodeIds: ID node kluster.
PrimaryEndpointId: ID titik akhir utama.
CustomEndpointIds: ID titik akhir kluster kustom.
CustomConnectionStrings: string koneksi kustom.
PrimaryConnectionString: string koneksi utama.
ClusterConnectionString: string koneksi kluster.
ClusterEndpointId: ID titik akhir kluster.
PrimaryEndpointIds: Daftar ID titik akhir utama.
PrimaryConnectionStrings: Daftar string koneksi titik akhir utama.
ColdStorageInstanceId: ID instans database dingin.
DBClusterDescription: Deskripsi kluster.
Arn: Nama Resource Alibaba Cloud.
Contoh
Skenario 1: Buat kluster PolarDB jenis 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"
]
}
}
}
}Skenario 2: Buat kluster PolarDB jenis 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"
}
}
}
}Skenario 3: Gunakan SQL native untuk menerapkan pengambilan cerdas 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"
]
}
}
}Untuk contoh lainnya, lihat Templat publik yang berisi resource ini.