All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::POLARDB::DBCluster

Last Updated:Feb 06, 2026

The ALIYUN::POLARDB::DBCluster resource type creates a PolarDB cluster.

Syntax

{
  "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
  }
}

Properties

Property Name

Type

Required

Update allowed

Description

Constraints

DBType

String

Yes

No

The database engine type.

Valid values:

  • MySQL

  • PostgreSQL

  • Oracle

DBNodeClass

String

Yes

No

The node specifications.

For more information about node specifications, see the following topics:

Note

To create a Serverless cluster in PolarDB for MySQL Cluster Edition, set this parameter to polar.mysql.sl.small.

To create a Serverless cluster in PolarDB for MySQL Standard Edition, set this parameter to polar.mysql.sl.small.c.

To create a Serverless cluster in PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL, set this parameter to polar.pg.sl.small.c.

DBVersion

String

Yes

No

The database version.

Valid values:

  • The valid range for MySQL version numbers is as follows:

    • 5.6

    • 5.7

    • 8.0

  • The PostgreSQL version number range is as follows:

    • 11

    • 14

    • 15

      Note

      If you create a Serverless cluster in PolarDB for PostgreSQL, only version 14 is supported.

  • Oracle version numbers must be within the following range:

    • 11

    • 14

PayType

String

Yes

Yes

The billing method.

Valid values:

  • Postpaid: pay-as-you-go.

  • Prepaid: subscription.

AutoRenewPeriod

Integer

No

Yes

The auto-renewal period for the instance.

Valid values:

  • 1 (default)

  • 2

  • 3

  • 6

  • 12

  • 24

  • 36

Unit: months.

DBClusterDescription

String

No

Yes

The cluster description.

The description must be 2 to 256 characters in length. It must start with a letter or a Chinese character and cannot start with http:// or https://. It can contain letters, Chinese characters, digits, commas (,), and hyphens (-).

ClusterNetworkType

String

No

No

The network type of the cluster.

Only VPC is supported. Valid value: VPC.

RenewalStatus

String

No

Yes

The auto-renewal status.

Valid values:

  • AutoRenewal: auto-renewal is enabled.

  • Normal (default): manual renewal.

  • NotRenewal: auto-renewal is disabled.

    Note

    If you set this parameter to NotRenewal, the system stops sending expiration reminders and sends only one reminder three days before expiration.

Period

Integer

No

Yes

The subscription duration. This parameter takes effect only when PayType is set to Prepaid.

Valid values:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unit: months.

ZoneId

String

No

No

The zone ID.

You can call the DescribeRegions operation to query available zones.

SourceResourceId

String

No

No

The ID of the source RDS instance or source PolarDB cluster.

The ID of the source RDS instance or source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, CloneFromPolarDB, or RecoverFromRecyclebin.

  • If CreationOption is set to MigrationFromRDS or CloneFromRDS, specify the ID of the source RDS instance. The source RDS instance must run RDS for MySQL 5.6, 5.7, or 8.0 High-availability Edition.

  • If CreationOption is set to CloneFromPolarDB, specify the ID of the source PolarDB cluster. The DBType of the cloned cluster is the same as that of the source cluster by default. For example, if the source cluster runs MySQL 8.0, set DBType to MySQL and DBVersion to 8.0 for the cloned cluster.

  • If CreationOption is set to RecoverFromRecyclebin, specify the ID of the released source PolarDB cluster. The DBType of the recovered cluster must be the same as that of the source cluster. For example, if the source cluster runs MySQL 8.0, set DBType to MySQL and DBVersion to 8.0 for the recovered cluster.

SecurityGroupIds

List

No

Yes

The list of security group IDs.

You can specify up to three security groups.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see Tags properties.

MaintainTime

String

No

Yes

The maintenance window of the cluster.

Format: HH:mmZ-HH:mmZ. Example: 16:00Z-17:00Z, which indicates the maintenance window from 00:00 to 01:00 (UTC+8).

CreationOption

String

No

No

The creation method.

Valid values:

Default value: Normal.

Note

If DBType is set to MySQL and DBVersion is set to 8.0, you can set this parameter to CreateGdnStandby.

VSwitchId

String

No

No

The vSwitch ID.

None

SecurityIPList

String

No

No

The IP address whitelist of the PolarDB cluster.

Note

You can specify multiple IP addresses in the whitelist. Separate multiple IP addresses with commas (,).

CloneDataPoint

String

No

No

The point in time for cloning data.

Valid values:

  • LATEST (default): the latest point in time.

    Note

    If CreationOption is set to CloneFromRDS, this parameter must be set to LATEST.

  • BackupID: the ID of a historical backup set.

  • Timestamp: a historical point in time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).

Note

If CreationOption is set to CloneFromRDS, this parameter must be set to LATEST.

CreationCategory

String

No

No

The cluster edition.

Valid values:

  • Normal: Cluster Edition (default)

  • Basic: Single Node

  • ArchiveNormal: X-Engine with high compression

  • NormalMultimaster: Multi-master Cluster Edition

  • SENormal: Standard Edition

Note

Basic is supported for MySQL 5.6, 5.7, 8.0, PostgreSQL 14, and Oracle syntax-compatible 2.0.

ArchiveNormal and NormalMultimaster are supported for MySQL 8.0.

SENormal is supported for MySQL 5.6, 5.7, 8.0, and PostgreSQL 14.

BackupRetentionPolicyOnClusterDeletion

String

No

No

The backup retention policy when the cluster is deleted.

Valid values:

  • ALL: permanently retain all backups.

  • LATEST: permanently retain the last backup (automatic backup before deletion).

  • NONE (default): do not retain backups when the cluster is deleted.

By default, this parameter is set to NONE, which means that no backups are retained when the cluster is deleted.

Note
  • This parameter takes effect only when DBType is set to MySQL.

  • This parameter is not supported for Serverless clusters.

ResourceGroupId

String

No

Yes

The resource group ID.

None

DefaultTimeZone

String

No

No

The cluster time zone (UTC).

Default value: SYSTEM. The default time zone is the same as the region time zone.

Valid values range from -12:00 to +13:00, such as 00:00.

Note

This parameter takes effect only when DBType is set to MySQL.

GDNId

String

No

No

The Global Database Network ID.

This parameter is required when CreationOption is set to CreateGdnStandby.

LowerCaseTableNames

Integer

No

No

Specifies whether table names are case-sensitive.

Valid values:

  • 1 (default): case-insensitive.

  • 0: The operation is case-sensitive.

Note

This parameter takes effect only when DBType is set to MySQL.

DBClusterParameters

Map

No

Yes

The parameters of the PolarDB cluster.

For more information, see DBClusterParameters properties.

DeletionProtection

Boolean

No

Yes

Specifies whether deletion protection is enabled.

Valid values:

  • true: Deletion protection is enabled.

  • false (default): Deletion protection is disabled.

TDEStatus

Boolean

No

Yes

Specifies whether transparent data encryption (TDE) is enabled.

Valid values:

  • true: Enables the feature.

    Note

    After TDE is enabled, it cannot be disabled.

  • false (default): Shutdown.

Note

This parameter takes effect only when DBType is set to PostgreSQL or Oracle.

PeriodUnit

String

No

Yes

The time unit.

Valid values:

  • Year

  • Month

ScaleRoNumMin

Integer

No

No

The minimum number of read-only nodes for scale-out and scale-in.

Valid values: 0 to 15.

Note

This parameter is supported only for Serverless clusters.

ScaleMax

Integer

No

No

The maximum capacity for scale-out and scale-in of a single node.

Valid values: 1 PCU to 32 PCU.

Note

This parameter is supported only for Serverless clusters.

AllowShutDown

Boolean

No

No

Specifies whether No-activity Suspension is enabled.

Valid values:

  • true: No-activity Suspension is enabled.

  • false: No-activity Suspension is disabled.

Note

This parameter is supported only for Serverless clusters.

ServerlessType

String

No

No

The Serverless service type.

Valid value: AgileServerless.

Note

This parameter is supported only for Serverless clusters.

ScaleRoNumMax

Integer

No

No

The maximum number of read-only nodes for scale-out and scale-in.

Valid values: 0 to 15.

Note

This parameter is supported only for Serverless clusters.

ScaleMin

Integer

No

No

The minimum capacity for scale-out and scale-in of a single node.

Valid values: 1 PCU to 31 PCU.

Note

This parameter is supported only for Serverless clusters.

SSLEnabled

String

No

Yes

Modify the SSL status.

Valid values:

  • Disable: Disable SSL encryption.

  • Enable: Enable SSL encryption.

  • Update: Update the SSL certificate.

StorageType

String

No

No

The storage class.

Valid values for Enterprise Edition:

  • PSL5

  • PSL4

Valid values for Standard Edition:

  • ESSDPL0

  • ESSDPL1

  • ESSDPL2

  • ESSDPL3

  • ESSDAUTOPL

LooseXEngine

String

No

No

Enable the X-Engine storage engine.

Valid values:

  • ON: Enable the X-Engine storage engine.

  • OFF: Disable the X-Engine storage engine.

Note

This parameter takes effect only when CreationOption is not set to CreateGdnStandby, DBType is set to MySQL, and DBVersion is set to 8.0. The memory of nodes with X-Engine enabled must be at least 16 GB.

LoosePolarLogBin

String

No

No

Enable binary logging.

Valid values:

  • ON: Enable binary logging.

  • OFF: Disable binary logging.

Note

This parameter takes effect only when DBType is set to MySQL.

StorageSpace

Integer

No

No

The storage space for subscription billing.

Unit: GB.

Note
  • For PolarDB for MySQL Standard Edition, valid values range from 20 to 32000.

  • If StorageType is set to ESSDAUTOPL, valid values range from 40 to 64000 with a minimum step size of 10 (for example, 40, 50, 60, ...).

ProxyType

String

No

No

The database proxy type.

Valid values:

  • EXCLUSIVE: Dedicated Enterprise Edition

  • GENERAL: Standard Enterprise Edition

Note

The proxy type must match the node specifications:

If the node specifications are general-purpose, set ProxyType to Standard Enterprise Edition.

If the node specifications are dedicated, set ProxyType to Dedicated Enterprise Edition.

StandbyAZ

String

No

No

The zone of the hot standby storage cluster.

This parameter applies to Standard Edition clusters in a three-zone scenario.

Note

This parameter takes effect only when strong consistency across multiple zones is enabled.

LooseXEngineUseMemoryPct

Integer

No

No

Set the percentage at which to enable the X-Engine storage engine.

Valid values: integers from 10 to 90.

Note

This parameter takes effect only when LooseXEngine is set to ON.

StorageUpperBound

Integer

No

No

The upper limit for automatic storage scaling of Standard Edition clusters.

Unit: GB.

Note

The maximum value is 32000.

StrictConsistency

String

No

No

Specifies whether strong consistency across multiple zones is enabled.

Valid values:

  • ON: Strong consistency across multiple zones is enabled. This setting applies to Standard Edition clusters in a three-zone scenario.

  • OFF: Strong consistency across multiple zones is disabled.

StoragePayType

String

No

No

The storage billing method.

Valid values:

  • Postpaid: pay-as-you-go based on capacity.

  • Prepaid: subscription based on storage space.

DBNodeNum

Integer

No

No

The number of nodes for Standard Edition and Enterprise Edition clusters.

Valid values:

  • Standard Edition: 1 to 8 (1 read/write node and up to 7 read-only nodes).

  • Enterprise Edition: 1 to 16 (1 read/write node and up to 15 read-only nodes).

Note
  • Enterprise Edition clusters have 2 nodes by default. Standard Edition clusters have 1 node by default.

  • This parameter is supported only for PolarDB for MySQL.

  • Changing the number of nodes is not supported for multi-master clusters.

ProxyClass

String

No

No

The database proxy specifications for Standard Edition clusters.

Valid values:

  • polar.maxscale.g2.medium.c: 2 cores

  • polar.maxscale.g2.large.c: 4 cores

  • polar.maxscale.g2.xlarge.c: 8 cores

  • polar.maxscale.g2.2xlarge.c: 16 cores

  • polar.maxscale.g2.3xlarge.c: 24 cores

  • polar.maxscale.g2.4xlarge.c: 32 cores

  • polar.maxscale.g2.8xlarge.c: 64 cores

HotStandbyCluster

String

No

No

Specifies whether the hot standby cluster is enabled.

Valid values:

  • ON (default): Enable the hot standby cluster.

  • OFF: Disable the hot standby cluster.

  • STANDBY: Enable the hot standby cluster for Standard Edition.

Note

The default value for Standard Edition clusters is STANDBY.

StorageAutoScale

String

No

No

Specifies whether automatic storage scaling is enabled for Standard Edition clusters.

Valid values:

  • Enable: Enable automatic storage scaling.

  • Disable: Disable automatic storage scaling.

Architecture

String

No

No

The CPU architecture.

Valid values:

  • X86

  • ARM

DBMinorVersion

String

No

No

The minor version of the database engine.

Valid values:

  • 8.0.2

  • 8.0.1

Note

This parameter takes effect only when DBType is set to MySQL and DBVersion is set to 8.0.

VpcId

String

No

No

The VPC ID.

None

ParameterGroupId

String

No

No

The parameter template ID.

You can call the DescribeParameterGroups operation to view the parameter template list and IDs in the destination region.

RestartMasterNode

Boolean

No

No

Specifies whether to restart the primary node.

Valid values:

  • true: Restart the primary node.

  • false: Do not restart the primary node.

ColdStorageOption

Map

No

No

The cold data archiving options.

For more information, see ColdStorageOption properties.

ProvisionedIops

Integer

No

No

The provisioned IOPS for ESSD AutoPL disks.

Valid values: 0 to min{50,000, 1000 × capacity − baseline performance}.

Baseline performance = min{1,800 + 50 × capacity, 50,000}.

Note

This parameter is supported only when StorageType is set to ESSDAUTOPL.

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

Property name

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

The tag key.

The key must be 1 to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Value

String

No

No

The tag value.

The value must be 0 to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

DBClusterParameters syntax

"DBClusterParameters": {
  "Parameters": String,
  "EffectiveTime": String
}

DBClusterParameters properties

Property Name

Type

Required

Update allowed

Description

Constraints

Parameters

String

No

Yes

A JSON string of parameters and their values.

All parameter values are strings.

EffectiveTime

String

No

Yes

The effective time of the parameters.

Valid values:

  • Auto: Automatically determine when the parameters take effect.

  • Immediately: The effect is immediate.

  • MaintainTime: This setting takes effect during the cluster maintenance period.

ColdStorageOption syntax

"ColdStorageOption": {
  "Description": String,
  "Enable": Boolean
}

ColdStorageOption properties

Property Name

Type

Required

Update allowed

Description

Constraints

Description

String

No

No

The description.

If a description is specified, cold data archiving is enabled. The description can be up to 256 characters in length.

Enable

Boolean

No

No

Enable cold data archiving.

Valid values:

  • true

  • false

Return values

Fn::GetAtt

  • DBClusterId: The cluster ID.

  • OrderId: The order ID.

  • DBNodeIds: The cluster node IDs.

  • PrimaryEndpointId: The primary endpoint ID.

  • CustomEndpointIds: The custom cluster endpoint IDs.

  • CustomConnectionStrings: The custom connection strings.

  • PrimaryConnectionString: The primary connection string.

  • ClusterConnectionString: The cluster connection string.

  • ClusterEndpointId: The cluster endpoint ID.

  • PrimaryEndpointIds: The list of primary endpoint IDs.

  • PrimaryConnectionStrings: The list of primary endpoint connection strings.

  • ColdStorageInstanceId: The cold database instance ID.

  • DBClusterDescription: The cluster description.

  • Arn: The Alibaba Cloud Resource Name.

Examples

Scenario 1: Create a PolarDB cluster of the MySQL type.

Getting Started

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"
        ]
      }
    }
  }
}

Scenario 2: Create a PolarDB cluster of the PostgreSQL type.

Getting Started

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"
      }
    }
  }
}

Scenario 3: Use native SQL to implement multimodal intelligent retrieval.

Getting Started

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"
      ]
    }
  }
}

For more examples, see Public templates that contain this resource.