All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::POLARDB::DBCluster

Last Updated:Nov 12, 2025

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

Type

Required

Update allowed

Description

Constraints

DBType

String

Yes

No

The type of the database engine.

Valid values:

  • MySQL

  • PostgreSQL

  • Oracle

DBNodeClass

String

Yes

No

The specifications of the node.

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

Note

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

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

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

DBVersion

String

Yes

No

The version of the database engine.

Valid values:

  • Valid values for MySQL:

    • 5.6

    • 5.7

    • 8.0

  • Valid values for PostgreSQL:

    • 11

    • 14

    • 15

      Note

      If you create a Serverless cluster for PolarDB for PostgreSQL, you can set this parameter only to 14.

  • Valid values for Oracle:

    • 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 of the instance.

Valid values:

  • 1 (default)

  • 2

  • 3

  • 6

  • 12

  • 24

  • 36

Unit: month.

DBClusterDescription

String

No

Yes

The description of the cluster.

The description must be 2 to 256 characters in length. It must start with a letter or a Chinese character. It 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. Set the value to VPC.

RenewalStatus

String

No

Yes

The auto-renewal status.

Valid values:

  • AutoRenewal: The instance is automatically renewed.

  • Normal (default): The instance is manually renewed.

  • NotRenewal: The instance is not renewed.

    Note

    If you set this parameter to NotRenewal, the system does not send an expiration reminder but sends a non-renewal reminder three days before the expiration date.

Period

Integer

No

Yes

The subscription duration of the instance if you set PayType to Prepaid.

Valid values:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unit: month.

ZoneId

String

No

No

The ID of the zone.

You can call the DescribeRegions operation to query the available zones.

SourceResourceId

String

No

No

The ID of the source RDS instance or PolarDB cluster.

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

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

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

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

SecurityGroupIds

List

No

Yes

The IDs of the security groups.

You can specify a maximum of three security groups.

Tags

List

No

Yes

The tags.

You can add a maximum of 20 tags.

For more information, see Tags properties.

MaintainTime

String

No

Yes

The maintenance window of the cluster.

The time is in the HH:mmZ-HH:mmZ format. For example, 16:00Z-17:00Z indicates that routine maintenance can be performed from 00:00 to 01:00 (UTC+8).

CreationOption

String

No

No

The method that is used to create the cluster.

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 ID of the vSwitch.

None

SecurityIPList

String

No

No

The IP address whitelist of the PolarDB cluster.

Note

You can add multiple IP addresses to the whitelist. Separate the IP addresses with commas (,).

CloneDataPoint

String

No

No

The point in time from which you want to clone data.

Valid values:

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

    Note

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

  • BackupID: the ID of a historical backup set.

  • Timestamp: a historical point in time. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note

If CreationOption is set to CloneFromRDS, you can set this parameter only to LATEST.

CreationCategory

String

No

No

The edition of the cluster.

Valid values:

  • Normal: Cluster Edition (default)

  • Basic: Single Node Edition

  • ArchiveNormal: X-Engine

  • NormalMultimaster: Multi-master Cluster Edition

  • SENormal: Standard Edition

Note

The Basic edition is supported for PolarDB for MySQL 5.6, 5.7, and 8.0, PolarDB for PostgreSQL 14, and PolarDB for PostgreSQL (Compatible with Oracle) 2.0.

MySQL 8.0 supports ArchiveNormal and NormalMultimaster.

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

BackupRetentionPolicyOnClusterDeletion

String

No

No

The data retention policy for backup sets when you delete the cluster.

Valid values:

  • ALL: permanently retains all backups.

  • LATEST: permanently retains the last backup. A backup is automatically created before you delete the cluster.

  • NONE (default): does not retain backup sets when the cluster is deleted.

When you create a cluster, the default value is NONE. This means that backup sets are not retained when the cluster is deleted.

Note
  • This parameter is valid only if DBType is set to MySQL.

  • This parameter is not supported for Serverless clusters.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None

DefaultTimeZone

String

No

No

The time zone of the cluster. The time must be in UTC.

The default value is SYSTEM, which indicates that the time zone is the same as the time zone of the region.

You can set this parameter to a value that is on the hour from -12:00 to +13:00, such as 00:00.

Note

This parameter is valid only if DBType is set to MySQL.

GDNId

String

No

No

The ID of the Global Database Network (GDN).

This parameter is required if CreationOption is set to CreateGdnStandby.

LowerCaseTableNames

Integer

No

No

Specifies whether table names are case-sensitive.

Valid values:

  • 1 (default): case-insensitive.

  • 0: case-sensitive.

Note

This parameter is valid only if 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 to enable deletion protection.

Valid values:

  • true: enables deletion protection.

  • false (default): does not enable deletion protection.

TDEStatus

Boolean

No

Yes

Specifies whether to enable transparent data encryption (TDE).

Valid values:

  • true: enables TDE.

    Note

    You cannot disable TDE after you enable it.

  • false (default): disables TDE.

Note

This parameter is valid only if DBType is set to PostgreSQL or Oracle.

PeriodUnit

String

No

Yes

The unit of the subscription duration.

Valid values:

  • Year

  • Month

ScaleRoNumMin

Integer

No

No

The minimum number of read-only nodes for scaling.

Valid values: 0 to 15.

Note

This parameter is supported only for Serverless clusters.

ScaleMax

Integer

No

No

Maximum single-node scale-out and scale-in limits.

Valid values: 1 PCU to 32 PCU.

Note

This parameter is supported only for Serverless clusters.

AllowShutDown

Boolean

No

No

Specifies whether to enable No-activity Suspension.

Valid values:

  • true: enables No-activity Suspension.

  • false: disables No-activity Suspension.

Note

This parameter is supported only for Serverless clusters.

ServerlessType

String

No

No

The type of the Serverless service.

Set the value to AgileServerless.

Note

This parameter is supported only for Serverless clusters.

ScaleRoNumMax

Integer

No

No

The maximum number of read-only nodes for scaling.

Valid values: 0 to 15.

Note

This parameter is supported only for Serverless clusters.

ScaleMin

Integer

No

No

The minimum number of PCUs for a single node for scaling.

Valid values: 1 PCU to 31 PCU.

Note

This parameter is supported only for Serverless clusters.

SSLEnabled

String

No

Yes

Modifies the SSL status.

Valid values:

  • Disable: disables SSL encryption.

  • Enable: enables SSL encryption.

  • Update: updates the SSL certificate.

StorageType

String

No

No

The storage class.

Valid values for Enterprise Edition clusters:

  • PSL5

  • PSL4

Valid values for Standard Edition clusters:

  • ESSDPL0

  • ESSDPL1

  • ESSDPL2

  • ESSDPL3

  • ESSDAUTOPL

LooseXEngine

String

No

No

Specifies whether to enable the X-Engine storage engine.

Valid values:

  • ON: enables the X-Engine engine for the cluster.

  • OFF: disables the X-Engine engine for the cluster.

Note

This parameter is valid only if CreationOption is not set to CreateGdnStandby, DBType is set to MySQL, and DBVersion is set to 8.0. The memory of a node on which X-Engine is enabled must be 16 GB or larger.

LoosePolarLogBin

String

No

No

Specifies whether to enable binary logging.

Valid values:

  • ON: enables binary logging for the cluster.

  • OFF: disables binary logging for the cluster.

Note

This parameter is valid only if DBType is set to MySQL.

StorageSpace

Integer

No

No

The storage space of the subscription cluster.

Unit: GB.

Note
  • For a PolarDB for MySQL Standard Edition cluster, the valid values are 20 to 32000.

  • If StorageType is set to ESSDAUTOPL for a Standard Edition cluster, the valid values are 40 to 64000. The step size is 10. You can set this parameter to 40, 50, 60, and so on.

ProxyType

String

No

No

The edition of the database proxy.

Valid values:

  • EXCLUSIVE: Dedicated Enterprise Edition

  • GENERAL: Standard Enterprise Edition

Note

The proxy edition must be the same as the edition of the cluster nodes.

If the nodes are of the General-purpose specification, set the proxy edition to Standard Enterprise Edition.

If the nodes are of the Dedicated specification, set the proxy edition to Dedicated Enterprise Edition.

StandbyAZ

String

No

No

The zone of the hot standby storage cluster.

This parameter is applicable to three-zone Standard Edition clusters.

Note

This parameter is valid only if strong consistency is enabled for the multi-zone cluster.

LooseXEngineUseMemoryPct

Integer

No

No

Set the proportion for the X-Engine storage engine.

An integer from 10 to 90.

Note

This parameter is valid only if LooseXEngine is set to ON.

StorageUpperBound

Integer

No

No

The upper limit for the automatic storage expansion of a Standard Edition cluster.

Unit: GB.

Note

The maximum value is 32000.

StrictConsistency

String

No

No

Specifies whether to enable strong consistency for the multi-zone cluster.

Valid values:

  • ON: enables strong consistency for the multi-zone cluster. This value is applicable to three-zone Standard Edition clusters.

  • OFF: disables strong consistency for the multi-zone cluster.

StoragePayType

String

No

No

The billing method for storage.

Valid values:

  • Postpaid: pay-as-you-go.

  • Prepaid: subscription.

DBNodeNum

Integer

No

No

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

Valid values:

  • Standard Edition: 1 to 8. A Standard Edition cluster supports one read/write node and up to seven read-only nodes.

  • Enterprise Edition: 1 to 16. An Enterprise Edition cluster supports one read/write node and up to 15 read-only nodes.

Note
  • By default, an Enterprise Edition cluster has two nodes, and a Standard Edition cluster has one node.

  • This parameter is supported only for PolarDB for MySQL.

  • You cannot change the number of nodes for a Multi-master Cluster.

ProxyClass

String

No

No

The specifications of the database proxy for a Standard Edition cluster.

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 to enable the Hot Standby Cluster feature.

Valid values:

  • ON (default): enables the Hot Standby Cluster feature.

  • OFF: disables the Hot Standby Cluster feature.

  • STANDBY: enables the Hot Standby Cluster feature for a Standard Edition cluster.

Note

The default value for Standard Edition clusters is STANDBY.

StorageAutoScale

String

No

No

Specifies whether to enable automatic storage expansion for a Standard Edition cluster.

Valid values:

  • Enable: enables automatic storage expansion.

  • Disable: disables automatic storage expansion.

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 is valid only if DBType is set to MySQL and DBVersion is set to 8.0.

VpcId

String

No

No

The ID of the virtual private cloud (VPC).

None

ParameterGroupId

String

No

No

The ID of the parameter template.

You can call the DescribeParameterGroups operation to query the parameter templates in the destination region, including the parameter template IDs.

RestartMasterNode

Boolean

No

No

Specifies whether to restart the primary node.

Valid values:

  • true: restarts the primary node.

  • false: does not restart the primary node.

ColdStorageOption

Map

No

No

The options for cold data archiving.

For more information, see ColdStorageOption properties.

ProvisionedIops

Integer

No

No

The provisioned read/write IOPS of the ESSD AutoPL disk.

Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}.

Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}.

Note

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

Tags syntax

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

Tags properties

Property

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

The key of the tag.

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

Value

String

No

No

The value of the tag.

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

DBClusterParameters syntax

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

DBClusterParameters properties

Property

Type

Required

Update allowed

Description

Constraints

Parameters

String

No

Yes

The JSON string that consists of the parameters and their values.

The parameter values are of the string type.

EffectiveTime

String

No

Yes

The time when the parameter takes effect.

Valid values:

  • Auto: The system automatically determines when the parameter takes effect.

  • Immediately: The parameter takes effect immediately.

  • MaintainTime: The parameter takes effect during the maintenance window of the cluster.

ColdStorageOption syntax

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

ColdStorageOption properties

Property

Type

Required

Update allowed

Description

Constraints

Description

String

No

No

The description.

If you specify a description, the cold data archiving feature is enabled. The description can be up to 256 characters in length.

Enable

Boolean

No

No

Specifies whether to enable the cold data archiving feature.

Valid values:

  • true

  • false

Return values

Fn::GetAtt

  • DBClusterId: The ID of the cluster.

  • OrderId: The ID of the order.

  • DBNodeIds: The IDs of the cluster nodes.

  • PrimaryEndpointId: The ID of the primary endpoint.

  • CustomEndpointIds: The IDs of the custom endpoints.

  • CustomConnectionStrings: The custom connection strings.

  • PrimaryConnectionString: The primary connection string.

  • ClusterConnectionString: The cluster connection string.

  • ClusterEndpointId: The ID of the cluster endpoint.

  • PrimaryEndpointIds: The list of primary endpoint IDs.

  • PrimaryConnectionStrings: The list of primary connection strings.

  • ColdStorageInstanceId: The ID of the cold storage instance.

  • DBClusterDescription: The description of the cluster.

  • Arn: The Alibaba Cloud Resource Name (ARN) of the cluster.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The ID of the VPC. You can find the ID that starts with vpc- in the Virtual Private Cloud console.
    Label:
      en: VPC ID
  VSwitchZoneId:
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
    Type: String
    Description:
      en: VSwitch Availability Zone
    Label:
      en: VSwitch Availability Zone
  VSwitchId:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${VSwitchZoneId}
    Type: String
    Description:
      en: The ID of the vSwitch. You can find the ID in the Virtual Private Cloud console.
    Label:
      en: VSwitch ID
  DBType:
    Type: String
    Description: |-
      Database type. Valid values:
      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 PolarDB cluster.
    Value:
      Fn::GetAtt:
        - DBCluster
        - DBClusterId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VPC. You can find the ID that starts with vpc- in the Virtual Private Cloud console."
      },
      "Label": {
        "en": "VPC ID"
      }
    },
    "VSwitchZoneId": {
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
      "Type": "String",
      "Description": {
        "en": "VSwitch Availability Zone"
      },
      "Label": {
        "en": "VSwitch Availability Zone"
      }
    },
    "VSwitchId": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${VSwitchZoneId}"
      },
      "Type": "String",
      "Description": {
        "en": "The ID of the vSwitch. You can find the ID in the Virtual Private Cloud console."
      },
      "Label": {
        "en": "VSwitch ID"
      }
    },
    "DBType": {
      "Type": "String",
      "Description": "Database type. Valid values:\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 PolarDB cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "DBClusterId"
        ]
      }
    }
  }
}

PolarDB for PostgreSQL Serverless example

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

For more examples that show how to create a PolarDB cluster, create a database account, create a database, add a node, grant a standard account permissions to access a database, modify the IP address whitelist, and create a public endpoint, see YAML examples.