ALIYUN::POLARDB::DBCluster リソースタイプを使用すると、PolarDB クラスターを作成できます。
構文
{
"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
}
}プロパティ
プロパティ名 | 型 | 必須 | 更新可否 | 説明 | 制約条件 |
DBType | String | はい | いいえ | データベースエンジンの種類です。 | 有効な値:
|
DBNodeClass | String | はい | いいえ | ノード仕様です。 | ノード仕様の詳細については、以下のトピックをご参照ください。
説明 PolarDB for MySQL Cluster Edition で Serverless クラスターを作成する場合、このパラメーターを polar.mysql.sl.small に設定します。 PolarDB for MySQL Standard Edition で Serverless クラスターを作成する場合、このパラメーターを polar.mysql.sl.small.c に設定します。 PolarDB for PostgreSQL(Oracle 互換)または PolarDB for PostgreSQL で Serverless クラスターを作成する場合、このパラメーターを polar.pg.sl.small.c に設定します。 |
DBVersion | String | はい | いいえ | データベースのバージョンです。 | 有効な値:
|
PayType | String | はい | はい | 課金方法です。 | 有効な値:
|
AutoRenewPeriod | Integer | いいえ | はい | インスタンスの自動更新期間です。 | 有効な値:
単位:月。 |
DBClusterDescription | String | いいえ | はい | クラスターの説明です。 | 説明は 2 文字以上 256 文字以内で、英字または漢字で始める必要があります。また、 |
ClusterNetworkType | String | いいえ | いいえ | クラスターのネットワークタイプです。 | VPC のみがサポートされています。有効な値:VPC。 |
RenewalStatus | String | いいえ | はい | 自動更新ステータスです。 | 有効な値:
|
Period | Integer | いいえ | はい | サブスクリプション期間です。このパラメーターは、PayType が Prepaid に設定されている場合にのみ有効です。 | 有効な値:
単位:月。 |
ZoneId | String | いいえ | いいえ | ゾーン ID です。 | 利用可能なゾーンを照会するには、DescribeRegions 操作を呼び出します。 |
SourceResourceId | String | いいえ | いいえ | ソース RDS インスタンスまたはソース PolarDB クラスターの ID です。 | ソース RDS インスタンスまたはソース PolarDB クラスターの ID です。このパラメーターは、CreationOption が MigrationFromRDS、CloneFromRDS、CloneFromPolarDB、または RecoverFromRecyclebin に設定されている場合にのみ必須です。
|
SecurityGroupIds | List | いいえ | はい | セキュリティグループ ID のリストです。 | 最大 3 つのセキュリティグループを指定できます。 |
Tags | List | いいえ | はい | タグです。 | 最大 20 個のタグを追加できます。 詳細については、「タグのプロパティ」をご参照ください。 |
MaintainTime | String | いいえ | はい | クラスターのメンテナンスウィンドウです。 | フォーマット:HH:mmZ-HH:mmZ。例:16:00Z-17:00Z(これは UTC+08:00 における 00:00~01:00 のメンテナンスウィンドウを示します)。 |
CreationOption | String | いいえ | いいえ | 作成方法です。 | 有効な値:
デフォルト値:Normal。 説明 DBType が MySQL に設定され、DBVersion が 8.0 に設定されている場合、このパラメーターを CreateGdnStandby に設定できます。 |
VSwitchId | String | いいえ | いいえ | vSwitch ID です。 | なし |
SecurityIPList | String | いいえ | いいえ | PolarDB クラスターの IP アドレスホワイトリストです。 | 説明 ホワイトリストには複数の IP アドレスを指定できます。複数の IP アドレスはカンマ(,)で区切ります。 |
CloneDataPoint | String | いいえ | いいえ | データクローンの時点です。 | 有効な値:
説明 CreationOption が CloneFromRDS に設定されている場合、このパラメーターは LATEST に設定する必要があります。 |
CreationCategory | String | いいえ | いいえ | クラスターのエディションです。 | 有効な値:
説明 Basic は MySQL 5.6、5.7、8.0、PostgreSQL 14、および Oracle 構文互換 2.0 でサポートされています。 ArchiveNormal および NormalMultimaster は MySQL 8.0 でサポートされています。 SENormal は MySQL 5.6、5.7、8.0、および PostgreSQL 14 でサポートされています。 |
BackupRetentionPolicyOnClusterDeletion | String | いいえ | いいえ | クラスター削除時のバックアップ保持ポリシーです。 | 有効な値:
デフォルトでは、このパラメーターは NONE に設定されており、クラスター削除時にバックアップを保持しないことを意味します。 説明
|
ResourceGroupId | String | いいえ | はい | リソースグループ ID です。 | なし |
DefaultTimeZone | String | いいえ | いいえ | クラスターのタイムゾーン(UTC)です。 | デフォルト値:SYSTEM。デフォルトのタイムゾーンは、リージョンのタイムゾーンと同じです。 有効な値の範囲は -12:00 ~ +13:00 で、たとえば 00:00 などがあります。 説明 このパラメーターは、DBType が MySQL に設定されている場合にのみ有効です。 |
GDNId | String | いいえ | いいえ | グローバルデータベースネットワーク ID です。 | CreationOption が CreateGdnStandby に設定されている場合に、このパラメーターは必須です。 |
LowerCaseTableNames | Integer | いいえ | いいえ | テーブル名の大文字・小文字の区別を有効にするかどうかを指定します。 | 有効な値:
説明 このパラメーターは、DBType が MySQL に設定されている場合にのみ有効です。 |
DBClusterParameters | Map | いいえ | はい | PolarDB クラスターのパラメーターです。 | 詳細については、「DBClusterParameters のプロパティ」をご参照ください。 |
DeletionProtection | Boolean | いいえ | はい | 削除保護を有効にするかどうかを指定します。 | 有効な値:
|
TDEStatus | Boolean | いいえ | はい | 透過的データ暗号化(TDE)を有効にするかどうかを指定します。 | 有効な値:
説明 このパラメーターは、DBType が PostgreSQL または Oracle に設定されている場合にのみ有効です。 |
PeriodUnit | String | いいえ | はい | 時間単位です。 | 有効な値:
|
ScaleRoNumMin | Integer | いいえ | いいえ | スケールアウトおよびスケールイン時の読み取り専用ノードの最小数です。 | 有効な値:0~15。 説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
ScaleMax | Integer | いいえ | いいえ | 単一ノードのスケールアウトおよびスケールインの最大容量です。 | 有効な値:1 PCU~32 PCU。 説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
AllowShutDown | Boolean | いいえ | いいえ | 非アクティブ時サスペンドを有効にするかどうかを指定します。 | 有効な値:
説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
ServerlessType | String | いいえ | いいえ | Serverless サービスタイプです。 | 有効な値:AgileServerless。 説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
ScaleRoNumMax | Integer | いいえ | いいえ | スケールアウトおよびスケールイン時の読み取り専用ノードの最大数です。 | 有効な値:0~15。 説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
ScaleMin | Integer | いいえ | いいえ | 単一ノードのスケールアウトおよびスケールインの最小容量です。 | 有効な値:1 PCU~31 PCU。 説明 このパラメーターは、Serverless クラスターでのみサポートされます。 |
SSLEnabled | String | いいえ | はい | SSL ステータスを変更します。 | 有効な値:
|
StorageType | String | いいえ | いいえ | ストレージクラスです。 | Enterprise Edition の有効な値:
Standard Edition の有効な値:
|
LooseXEngine | String | いいえ | いいえ | X-Engine ストレージエンジンを有効にします。 | 有効な値:
説明 このパラメーターは、CreationOption が CreateGdnStandby に設定されておらず、DBType が MySQL に設定され、DBVersion が 8.0 に設定されている場合にのみ有効です。X-Engine を有効にしたノードのメモリは、最低でも 16 GB である必要があります。 |
LoosePolarLogBin | String | いいえ | いいえ | バイナリログを有効にします。 | 有効な値:
説明 このパラメーターは、DBType が MySQL に設定されている場合にのみ有効です。 |
StorageSpace | Integer | いいえ | いいえ | サブスクリプション課金のストレージ容量です。 | 単位:GB。 説明
|
ProxyType | String | いいえ | いいえ | データベースプロキシのタイプです。 | 有効な値:
説明 プロキシのタイプは、ノード仕様と一致させる必要があります。 ノード仕様が汎用の場合、ProxyType を Standard Enterprise Edition に設定します。 ノード仕様が専用の場合、ProxyType を Dedicated Enterprise Edition に設定します。 |
StandbyAZ | String | いいえ | いいえ | ホットスタンバイストレージクラスターのゾーンです。 | このパラメーターは、3 ゾーンシナリオにおける Standard Edition クラスターに適用されます。 説明 このパラメーターは、マルチゾーン間の強力な整合性が有効になっている場合にのみ有効です。 |
LooseXEngineUseMemoryPct | Integer | いいえ | いいえ | X-Engine ストレージエンジンを有効にする割合を設定します。 | 有効な値:10~90 の整数。 説明 このパラメーターは、LooseXEngine が ON に設定されている場合にのみ有効です。 |
StorageUpperBound | Integer | いいえ | いいえ | Standard Edition クラスターの自動ストレージスケーリングの上限です。 | 単位:GB。 説明 最大値は 32000 です。 |
StrictConsistency | String | いいえ | いいえ | マルチゾーン間の強力な整合性を有効にするかどうかを指定します。 | 有効な値:
|
StoragePayType | String | いいえ | いいえ | ストレージの課金方法です。 | 有効な値:
|
DBNodeNum | Integer | いいえ | いいえ | Standard Edition および Enterprise Edition クラスターのノード数です。 | 有効な値:
説明
|
ProxyClass | String | いいえ | いいえ | Standard Edition クラスターのデータベースプロキシ仕様です。 | 有効な値:
|
HotStandbyCluster | String | いいえ | いいえ | ホットスタンバイクラスターを有効にするかどうかを指定します。 | 有効な値:
説明 Standard Edition クラスターのデフォルト値は STANDBY です。 |
StorageAutoScale | String | いいえ | いいえ | Standard Edition クラスターの自動ストレージスケーリングを有効にするかどうかを指定します。 | 有効な値:
|
Architecture | String | いいえ | いいえ | CPU アーキテクチャです。 | 有効な値:
|
DBMinorVersion | String | いいえ | いいえ | データベースエンジンのマイナーバージョンです。 | 有効な値:
説明 このパラメーターは、DBType が MySQL に設定され、DBVersion が 8.0 に設定されている場合にのみ有効です。 |
VpcId | String | いいえ | いいえ | VPC ID です。 | なし |
ParameterGroupId | String | いいえ | いいえ | パラメーターテンプレート ID です。 | 宛先リージョンにおけるパラメーターテンプレートの一覧および ID を表示するには、DescribeParameterGroups 操作を呼び出します。 |
RestartMasterNode | Boolean | いいえ | いいえ | プライマリノードを再起動するかどうかを指定します。 | 有効な値:
|
ColdStorageOption | Map | いいえ | いいえ | コールドデータアーカイブのオプションです。 | 詳細については、「ColdStorageOption のプロパティ」をご参照ください。 |
ProvisionedIops | Integer | いいえ | いいえ | ESSD AutoPL ディスクのプロビジョニング IOPS です。 | 有効な値:0~min{50,000, 1000 × 容量 − ベースラインパフォーマンス}。 ベースラインパフォーマンス = min{1,800 + 50 × 容量, 50,000}。 説明 このパラメーターは、StorageType が ESSDAUTOPL に設定されている場合にのみサポートされます。 |
タグの構文
"Tags": [
{
"Key": String,
"Value": String
}
]タグのプロパティ
プロパティ名 | 型 | 必須 | 更新が許可されています | 説明 | 制約条件 |
Key | String | はい | いいえ | タグキーです。 | キーは 1~128 文字の長さである必要があります。 |
Value | String | いいえ | いいえ | タグ値です。 | 値は 0~128 文字の長さである必要があります。 |
DBClusterParameters の構文
"DBClusterParameters": {
"Parameters": String,
"EffectiveTime": String
}DBClusterParameters のプロパティ
プロパティ名 | 型 | 必須 | 更新可否 | 説明 | 制約条件 |
Parameters | String | いいえ | はい | パラメーターとその値の JSON 文字列です。 | すべてのパラメーター値は文字列です。 |
EffectiveTime | String | いいえ | はい | パラメーターの有効時間です。 | 有効な値:
|
ColdStorageOption の構文
"ColdStorageOption": {
"Description": String,
"Enable": Boolean
}ColdStorageOption のプロパティ
プロパティ名 | 型 | 必須 | 更新可否 | 説明 | 制約条件 |
Description | String | いいえ | いいえ | 説明です。 | 説明が指定されている場合、コールドデータアーカイブが有効になります。説明は最大 256 文字まで可能です。 |
Enable | Boolean | いいえ | いいえ | コールドデータアーカイブを有効にします。 | 有効な値:
|
戻り値
Fn::GetAtt
DBClusterId:クラスター ID。
OrderId:注文 ID。
DBNodeIds:クラスターのノード ID。
PrimaryEndpointId:プライマリエンドポイント ID。
CustomEndpointIds:カスタムクラスターエンドポイント ID。
CustomConnectionStrings:カスタム接続文字列。
PrimaryConnectionString:プライマリ接続文字列。
ClusterConnectionString:クラスター接続文字列。
ClusterEndpointId:クラスターエンドポイント ID。
PrimaryEndpointIds:プライマリエンドポイント ID の一覧。
PrimaryConnectionStrings:プライマリエンドポイント接続文字列の一覧。
ColdStorageInstanceId:コールドデータベースインスタンス ID。
DBClusterDescription:クラスターの説明。
Arn:Alibaba Cloud Resource Name。
サンプル
シナリオ 1:MySQL タイプの PolarDB クラスターを作成します。
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"
]
}
}
}
}シナリオ 2:PostgreSQL タイプの PolarDB クラスターを作成します。
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"
}
}
}
}シナリオ 3:ネイティブ SQL を使用してマルチモーダルなインテリジェント検索を実装します。
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"
]
}
}
}その他のサンプルについては、「このリソースを含むパブリックテンプレート」をご参照ください。