ALIYUN::POLARDB::DBCluster is used to create 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
  }
}

Properties

Property Type Required Editable Description Constraint
VpcId String No No The ID of the virtual private cloud (VPC). None.
DBClusterDescription String No Yes The description of the cluster. The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), and hyphens (-). It must start with a letter but cannot start with http:// or https://.
DBType String Yes No The type of the database engine. Valid values:
  • MySQL
  • PostgreSQL
  • Oracle
ClusterNetworkType String No No The network type of the cluster. Set the value to VPC.
RenewalStatus String No Yes The auto-renewal status of the cluster. Default value: Normal. Valid values:
  • AutoRenewal: The cluster is automatically renewed.
  • Normal: The cluster is manually renewed.
  • NotRenewal: The cluster is not renewed.
    Note If you set this property is to NotRenewal, the system sends a notification that indicates the cluster is not renewed three days before the cluster expires. After the cluster expires, the system no longer sends a notification.
AutoRenewPeriod Integer No Yes The auto-renewal period of the cluster. Default value: 1. Valid values:
  • 1
  • 2
  • 3
  • 6
  • 12
  • 24
  • 36

Unit: months.

Period Integer No No The subscription duration of the cluster. Valid values:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 12
  • 24
  • 36

Unit: months.

ZoneId String No No The zone ID of the cluster. You can call the DescribeRegions operation to query the zone ID.
SourceResourceId String No No The ID of the existing ApsaraDB RDS instance or PolarDB cluster. This property only takes effect when the DBType property is set to MySQL and the DBVersion property is set to 5.6. If the CreationOption property is not set to Normal, you must specify the SourceResourceId property.
SecurityGroupIds List No Yes The IDs of security groups. You can specify up to three security groups.
Tags List No Yes The tags of the cluster. You can add up to 20 tags.

For more information, see Tags property.

MaintainTime String No Yes The maintenance window of the cluster. The value must be in the HH:mmZ-HH:mmZ format. For example, if you want to maintain the cluster from 00:00:00 to 01:00:00 (UTC+8), set this property to 16:00Z-17:00Z.
DBVersion String Yes No The version of the database engine.
  • Valid values if the DBType property is set to MySQL: 5.6 and 8.0.
  • Set the value to 11 if the DBType property is set to PostgreSQL.
  • Set the value to 11 if the DBType property is set to Oracle.
CreationOption String No No The method based on which you create the cluster. Default value: Normal. Valid values:
  • Normal: creates a PolarDB cluster.
  • CloneFromPolarDB: clones data from an existing PolarDB cluster to create a PolarDB cluster.
  • CloneFromRDS: clones data from an existing ApsaraDB RDS instance to create a PolarDB cluster.
  • MigrationFromRDS: migrates data from an exisitng ApsaraDB RDS instance to create a PolarDB cluster.
When you set the DBType property to MySQL and set the DBVersion property to 5.6, you must set the CreationOption property to CloneFromRDS or MigrationFromRDS.
DBNodeClass String Yes No The specifications of the node.

For more information, see Billable items.

VSwitchId String No No The vSwitch ID of the cluster. None.
SecurityIPList String No No The IP address whitelist of the cluster. None.
CloneDataPoint String No No The point in time at which you clone data. Default value: LATEST. Valid values:
  • LATEST: the latest point in time.
    Note When you set the CreationOption property to CloneFromRDS, you must set the CloneDataPoint property to LATEST.
  • BackupID: the point in time at which a backup set is created.
  • Timestamp: the historical point in time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
This property only takes effect when the DBType property is set to MySQL, the DBVersion property is set to 5.6, and the CreationOption property is set to CloneFromRDS or CloneFromPolarDB.
PayType String Yes No The billing method of the cluster. Valid values:
  • Postpaid: the pay-as-you-go billing method
  • Prepaid: the subscription billing method
CreationCategory String No No The edition of the cluster. Set the value to Normal, which specifies Cluster Edition.
BackupRetentionPolicyOnClusterDeletion String No No The policy based on which the system retains backup sets when the cluster is deleted. Default value: NONE. Valid values:
  • ALL: The system permanently retains all backup sets.
  • LATEST: The system permanently retains the latest backup set. A backup set for the cluster is automatically created before the cluster is deleted.
  • NONE: The system does not retain backup sets.
Note This property only takes effect when the DBType property is set to MySQL.
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.

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

You can select a time zone on the hour from -12:00 to +13:00. Example: 00:00.

Note This property only takes effect when the DBType property is set to MySQL.
GDNId String No No The ID of the Global Database Network (GDN). When you set the CreationOption property to CreateGdnStandby, you must specify the GDNId property.
LowerCaseTableNames Integer No No Specifies whether table names are case-sensitive. Default value: 1. Valid values:
  • 1: Table names are not case-sensitive.
  • 0: Table names are case-sensitive.
Note This property only takes effect when the DBType property is set to MySQL.
DBClusterParameters Map No Yes The parameters of the PolarDB cluster. For more information, see DBClusterParameters property.
TDEStatus Boolean No Yes Specifies whether to enable Transparent Data Encryption (TDE). Default value: false. Valid values:
  • true: enables TDE.
    Note You cannot disable TDE after TDE is enabled.
  • false: does not enable TDE.
Note The property only takes effect when the DBType property is set to PostgreSQL or Oracle.

Tags syntax

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

Tags property

Field Type Required Editable Description Constraint
Key String Yes No The key of the tag. The key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.
Value String No No The value of the tag. The value must be 0 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

DBClusterParameters syntax

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

DBClusterParameters property

Field Type Required Editable Description Constraint
Parameters String No Yes The JSON string that consists of the parameters of the cluster and the parameter values. All the parameter values are of the STRING type.
EffectiveTime String No Yes The point in time when the parameters take effect. Valid values:
  • Auto: The system determines when the parameters take effect.
  • Immediately: The parameters immediately take effect after you configure the parameters.
  • MaintainTime: The parameters take effect during the maintenance window of the cluster.

Return values

Fn::GetAtt

  • DBClusterId: the ID of the cluster.
  • OrderId: the order ID of the cluster.
  • DBNodeIds: the IDs of the nodes in the cluster.
  • PrimaryEndpointId: the primary endpoint ID of the cluster.
  • CustomEndpointIds: the IDs of custom cluster endpoints.
  • CustomConnectionStrings: the custom connection strings of the cluster.
  • PrimaryConnectionString: the primary connection string of the cluster.
  • ClusterConnectionString: the custom connection string of the cluster.
  • ClusterEndpointId: the endpoint ID of the cluster.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DefaultTimeZone": {
      "Type": "String",
      "Description": "Set up a time zone (UTC), the value range is as follows:\nSystem:  The default time zone is the same as the time zone where the region is located. This is default value.\nOther pickable value range is from -12:00 to +13:00, for example, 00:00.\nNote: This parameter takes effect only when DBType is MySQL."
    },
    "CloneDataPoint": {
      "Type": "String",
      "Description": "The time point of data to be cloned. Valid values:\nLATEST: clones data of the latest time point.\n<BackupID>: clones historical backup data. Specify the ID of the specific backup set.\n<Timestamp>: clones data of a historical time point. Specify the specific time in\nthe yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.\nDefault value: LATEST.\nNote\nThis parameter takes effect only when the DBType parameter is set to MySQL, the DBVersion parameter is set to 5.6, and the CreationOption parameter is set to CloneFromRDS or CloneFromPolarDB.\nIf the CreationOption parameter is set to CloneFromRDS, the value of this parameter must be LATEST.",
      "Default": "LATEST"
    },
    "GDNId": {
      "Type": "String",
      "Description": "The ID of the Global Database Network (GDN).\nNote: This parameter is required when the CreationOption is CreateGdnStandby."
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group."
    },
    "BackupRetentionPolicyOnClusterDeletion": {
      "Type": "String",
      "Description": "The backup set retention policy when deleting a cluster, the value range is as follows:\nALL: Keep all backups permanently.\nLATEST: Permanently keep the last backup (automatic backup before deletion).\nNONE: The backup set is not retained when the cluster is deleted.\nWhen creating a cluster, the default value is NONE, that is, the backup set is not retained when the cluster is deleted.\nNote: This parameter takes effect only when the value of DBType is MySQL.",
      "AllowedValues": [
        "ALL",
        "LATEST",
        "NONE"
      ]
    },
    "SourceResourceId": {
      "Type": "String",
      "Description": "The ID of the source RDS instance or source POLARDB cluster.\nNote\nThis parameter takes effect only when the DBType parameter is set to MySQL and the DBVersion parameter is set to 5.6.\nThis parameter is required if the CreationOption parameter is not set to Normal."
    },
    "DBType": {
      "Type": "String",
      "Description": "Database type, value:\nMySQL\nPostgreSQL\nOracle",
      "AllowedValues": [
        "MySQL",
        "Oracle",
        "PostgreSQL"
      ]
    },
    "DBVersion": {
      "Type": "String",
      "Description": "The version of the database. Valid values:\nMySQL: 5.6, 5.7 or 8.0\nPostgreSQL: 11\nOracle: 11"
    },
    "ClusterNetworkType": {
      "Type": "String",
      "Description": "The network type of the cluster. Currently, only VPC is supported. Default value: VPC.",
      "AllowedValues": [
        "VPC"
      ],
      "Default": "VPC"
    },
    "SecurityIPList": {
      "Type": "String",
      "Description": "The whitelist of the Apsara PolarDB cluster."
    },
    "DBClusterParameters": {
      "Type": "Json",
      "Description": "Modifies the parameters of a the PolarDB cluster."
    },
    "MaintainTime": {
      "Type": "String",
      "Description": "The maintainable time of the cluster:\nFormat: HH: mmZ- HH: mmZ.\nExample: 16:00Z-17:00Z, which means 0 to 1 (UTC+08:00) for routine maintenance."
    },
    "Tags": {
      "Type": "Json",
      "Description": "Tags to attach to instance. Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.",
      "MaxLength": 20
    },
    "LowerCaseTableNames": {
      "Type": "Number",
      "Description": "Whether the table name is case sensitive, the value range is as follows:\n1: Not case sensitive0: case sensitive\nThe default value is 1.\nNote: This parameter takes effect only when the value of DBType is MySQL.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "AutoRenewPeriod": {
      "Type": "Number",
      "Description": "Set the cluster auto renewal time. Valid values: 1, 2, 3, 6, 12, 24, 36. Default to 1.",
      "AllowedValues": [
        1,
        2,
        3,
        6,
        12,
        24,
        36
      ],
      "Default": 1
    },
    "TDEStatus": {
      "Type": "Boolean",
      "Description": "Specifies whether to enable Transparent Data Encryption (TDE). Valid values:\ntrue: enable TDE\nfalse: disable TDE (default)\nNote: The parameter takes effect only when DBType is PostgreSQL or Oracle. You cannot disable TDE after it is enabled.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The zone ID of the cluster. You can call the DescribeRegions operation to query available zones."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The ID of the VSwitch to connect to."
    },
    "RenewalStatus": {
      "Type": "String",
      "Description": "The auto renewal status of the cluster Valid values:\nAutoRenewal: automatically renews the cluster.\nNormal: manually renews the cluster.\nNotRenewal: does not renew the cluster.\nDefault value: Normal.\nNote If this parameter is set to NotRenewal, the system does not send a reminder for expiration,\nbut only sends an SMS message three days before the cluster expires to remind you\nthat the cluster is not renewed.",
      "AllowedValues": [
        "AutoRenewal",
        "Normal",
        "NotRenewal"
      ],
      "Default": "Normal"
    },
    "DBClusterDescription": {
      "Type": "String",
      "Description": "The description of the cluster. The description must comply with the following rules:\nIt must start with a Chinese character or an English letter.\nIt can contain Chinese and English characters, digits, underscores (_), and hyphens (-).\nIt cannot start with http:// or https://.\nIt must be 2 to 256 characters in length.",
      "MinLength": 2,
      "MaxLength": 256
    },
    "Period": {
      "Type": "Number",
      "Description": "The subscription period of the cluster in month. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.",
      "AllowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        12,
        24,
        36
      ]
    },
    "PayType": {
      "Type": "String",
      "Description": "The billing method of the cluster. Valid values:\nPostpaid: pay-as-you-go\nPrepaid: subscription",
      "AllowedValues": [
        "Postpaid",
        "Prepaid"
      ]
    },
    "CreationCategory": {
      "Type": "String",
      "Description": "Cluster series. The value could be Normal (standard version)."
    },
    "SecurityGroupIds": {
      "Type": "Json",
      "Description": "The ID of the security group. \nYou can add up to three security groups to a cluster.\n"
    },
    "DBNodeClass": {
      "Type": "String",
      "Description": "The node specifications of the cluster. For more information, see Specifications and pricing."
    },
    "CreationOption": {
      "Type": "String",
      "Description": "The method for creating an ApsaraDB for POLARDB cluster. Valid values:\nNormal: creates an ApsaraDB for POLARDB cluster.\nCloneFromPolarDB: clones data from an existing ApsaraDB for POLARDB cluster to a new ApsaraDB for POLARDB cluster.\nCloneFromRDS: clones data from an existing ApsaraDB for RDS instance to a new ApsaraDB\nfor POLARDB cluster.\nMigrationFromRDS: migrates data from an existing ApsaraDB for RDS instance to a new ApsaraDB for POLARDB cluster. The created ApsaraDB for POLARDB cluster is in read-only mode and has binary logs enabled by default.\nCreateGdnStandby: Create a secondary cluster.\nDefault value: Normal.\nNote:\nWhen DBType is MySQL and DBVersion is 5.6, this parameter can be specified as CloneFromRDS or MigrationFromRDS.\nWhen DBType is MySQL and DBVersion is 8.0, this parameter can be specified as CreateGdnStandby.",
      "AllowedValues": [
        "CloneFromPolarDB",
        "CloneFromRDS",
        "MigrationFromRDS",
        "Normal",
        "CreateGdnStandby"
      ],
      "Default": "Normal"
    },
    "VpcId": {
      "Type": "String",
      "Description": "The ID of the VPC to connect to."
    }
  },
  "Resources": {
    "DBCluster": {
      "Type": "ALIYUN::POLARDB::DBCluster",
      "Properties": {
        "DefaultTimeZone": {
          "Ref": "DefaultTimeZone"
        },
        "CloneDataPoint": {
          "Ref": "CloneDataPoint"
        },
        "GDNId": {
          "Ref": "GDNId"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "BackupRetentionPolicyOnClusterDeletion": {
          "Ref": "BackupRetentionPolicyOnClusterDeletion"
        },
        "SourceResourceId": {
          "Ref": "SourceResourceId"
        },
        "DBType": {
          "Ref": "DBType"
        },
        "DBVersion": {
          "Ref": "DBVersion"
        },
        "ClusterNetworkType": {
          "Ref": "ClusterNetworkType"
        },
        "SecurityIPList": {
          "Ref": "SecurityIPList"
        },
        "DBClusterParameters": {
          "Ref": "DBClusterParameters"
        },
        "MaintainTime": {
          "Ref": "MaintainTime"
        },
        "Tags": {
          "Ref": "Tags"
        },
        "LowerCaseTableNames": {
          "Ref": "LowerCaseTableNames"
        },
        "AutoRenewPeriod": {
          "Ref": "AutoRenewPeriod"
        },
        "TDEStatus": {
          "Ref": "TDEStatus"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "RenewalStatus": {
          "Ref": "RenewalStatus"
        },
        "DBClusterDescription": {
          "Ref": "DBClusterDescription"
        },
        "Period": {
          "Ref": "Period"
        },
        "PayType": {
          "Ref": "PayType"
        },
        "CreationCategory": {
          "Ref": "CreationCategory"
        },
        "SecurityGroupIds": {
          "Ref": "SecurityGroupIds"
        },
        "DBNodeClass": {
          "Ref": "DBNodeClass"
        },
        "CreationOption": {
          "Ref": "CreationOption"
        },
        "VpcId": {
          "Ref": "VpcId"
        }
      }
    }
  },
  "Outputs": {
    "DBNodeIds": {
      "Description": "The ID list of cluster nodes.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "DBNodeIds"
        ]
      }
    },
    "PrimaryConnectionString": {
      "Description": "The primary connection string of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "PrimaryConnectionString"
        ]
      }
    },
    "ClusterConnectionString": {
      "Description": "The cluster connection string of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "ClusterConnectionString"
        ]
      }
    },
    "ClusterEndpointId": {
      "Description": "The cluster endpoint ID of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "ClusterEndpointId"
        ]
      }
    },
    "DBClusterId": {
      "Description": "The ID of the ApsaraDB for POLARDB cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "DBClusterId"
        ]
      }
    },
    "CustomEndpointIds": {
      "Description": "The custom endpoint IDs of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "CustomEndpointIds"
        ]
      }
    },
    "PrimaryEndpointId": {
      "Description": "The primary endpoint ID of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "PrimaryEndpointId"
        ]
      }
    },
    "OrderId": {
      "Description": "The Order ID.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "OrderId"
        ]
      }
    },
    "CustomConnectionStrings": {
      "Description": "The custom connection strings of the db cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "CustomConnectionStrings"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AutoRenewPeriod:
    AllowedValues:
    - 1
    - 2
    - 3
    - 6
    - 12
    - 24
    - 36
    Default: 1
    Description: 'Set the cluster auto renewal time. Valid values: 1, 2, 3, 6, 12,
      24, 36. Default to 1.'
    Type: Number
  BackupRetentionPolicyOnClusterDeletion:
    AllowedValues:
    - ALL
    - LATEST
    - NONE
    Description: 'The backup set retention policy when deleting a cluster, the value
      range is as follows:

      ALL: Keep all backups permanently.

      LATEST: Permanently keep the last backup (automatic backup before deletion).

      NONE: The backup set is not retained when the cluster is deleted.

      When creating a cluster, the default value is NONE, that is, the backup set
      is not retained when the cluster is deleted.

      Note: This parameter takes effect only when the value of DBType is MySQL.'
    Type: String
  CloneDataPoint:
    Default: LATEST
    Description: 'The time point of data to be cloned. Valid values:

      LATEST: clones data of the latest time point.

      <BackupID>: clones historical backup data. Specify the ID of the specific backup
      set.

      <Timestamp>: clones data of a historical time point. Specify the specific time
      in

      the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

      Default value: LATEST.

      Note

      This parameter takes effect only when the DBType parameter is set to MySQL,
      the DBVersion parameter is set to 5.6, and the CreationOption parameter is set
      to CloneFromRDS or CloneFromPolarDB.

      If the CreationOption parameter is set to CloneFromRDS, the value of this parameter
      must be LATEST.'
    Type: String
  ClusterNetworkType:
    AllowedValues:
    - VPC
    Default: VPC
    Description: 'The network type of the cluster. Currently, only VPC is supported.
      Default value: VPC.'
    Type: String
  CreationCategory:
    Description: Cluster series. The value could be Normal (standard version).
    Type: String
  CreationOption:
    AllowedValues:
    - CloneFromPolarDB
    - CloneFromRDS
    - MigrationFromRDS
    - Normal
    - CreateGdnStandby
    Default: Normal
    Description: 'The method for creating an ApsaraDB for POLARDB cluster. Valid values:

      Normal: creates an ApsaraDB for POLARDB cluster.

      CloneFromPolarDB: clones data from an existing ApsaraDB for POLARDB cluster
      to a new ApsaraDB for POLARDB cluster.

      CloneFromRDS: clones data from an existing ApsaraDB for RDS instance to a new
      ApsaraDB

      for POLARDB cluster.

      MigrationFromRDS: migrates data from an existing ApsaraDB for RDS instance to
      a new ApsaraDB for POLARDB cluster. The created ApsaraDB for POLARDB cluster
      is in read-only mode and has binary logs enabled by default.

      CreateGdnStandby: Create a secondary cluster.

      Default value: Normal.

      Note:

      When DBType is MySQL and DBVersion is 5.6, this parameter can be specified as
      CloneFromRDS or MigrationFromRDS.

      When DBType is MySQL and DBVersion is 8.0, this parameter can be specified as
      CreateGdnStandby.'
    Type: String
  DBClusterDescription:
    Description: 'The description of the cluster. The description must comply with
      the following rules:

      It must start with a Chinese character or an English letter.

      It can contain Chinese and English characters, digits, underscores (_), and
      hyphens (-).

      It cannot start with http:// or https://.

      It must be 2 to 256 characters in length.'
    MaxLength: 256
    MinLength: 2
    Type: String
  DBClusterParameters:
    Description: Modifies the parameters of a the PolarDB cluster.
    Type: Json
  DBNodeClass:
    Description: The node specifications of the cluster. For more information, see
      Specifications and pricing.
    Type: String
  DBType:
    AllowedValues:
    - MySQL
    - Oracle
    - PostgreSQL
    Description: 'Database type, value:

      MySQL

      PostgreSQL

      Oracle'
    Type: String
  DBVersion:
    Description: 'The version of the database. Valid values:

      MySQL: 5.6, 5.7 or 8.0

      PostgreSQL: 11

      Oracle: 11'
    Type: String
  DefaultTimeZone:
    Description: 'Set up a time zone (UTC), the value range is as follows:

      System:  The default time zone is the same as the time zone where the region
      is located. This is default value.

      Other pickable value range is from -12:00 to +13:00, for example, 00:00.

      Note: This parameter takes effect only when DBType is MySQL.'
    Type: String
  GDNId:
    Description: 'The ID of the Global Database Network (GDN).

      Note: This parameter is required when the CreationOption is CreateGdnStandby.'
    Type: String
  LowerCaseTableNames:
    AllowedValues:
    - 0
    - 1
    Description: 'Whether the table name is case sensitive, the value range is as
      follows:

      1: Not case sensitive0: case sensitive

      The default value is 1.

      Note: This parameter takes effect only when the value of DBType is MySQL.'
    Type: Number
  MaintainTime:
    Description: 'The maintainable time of the cluster:

      Format: HH: mmZ- HH: mmZ.

      Example: 16:00Z-17:00Z, which means 0 to 1 (UTC+08:00) for routine maintenance.'
    Type: String
  PayType:
    AllowedValues:
    - Postpaid
    - Prepaid
    Description: 'The billing method of the cluster. Valid values:

      Postpaid: pay-as-you-go

      Prepaid: subscription'
    Type: String
  Period:
    AllowedValues:
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    - 12
    - 24
    - 36
    Description: 'The subscription period of the cluster in month. Valid values: 1,
      2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.'
    Type: Number
  RenewalStatus:
    AllowedValues:
    - AutoRenewal
    - Normal
    - NotRenewal
    Default: Normal
    Description: 'The auto renewal status of the cluster Valid values:

      AutoRenewal: automatically renews the cluster.

      Normal: manually renews the cluster.

      NotRenewal: does not renew the cluster.

      Default value: Normal.

      Note If this parameter is set to NotRenewal, the system does not send a reminder
      for expiration,

      but only sends an SMS message three days before the cluster expires to remind
      you

      that the cluster is not renewed.'
    Type: String
  ResourceGroupId:
    Description: The ID of the resource group.
    Type: String
  SecurityGroupIds:
    Description: "The ID of the security group. \nYou can add up to three security\
      \ groups to a cluster.\n"
    Type: Json
  SecurityIPList:
    Description: The whitelist of the Apsara PolarDB cluster.
    Type: String
  SourceResourceId:
    Description: 'The ID of the source RDS instance or source POLARDB cluster.

      Note

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

      This parameter is required if the CreationOption parameter is not set to Normal.'
    Type: String
  TDEStatus:
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
    Description: 'Specifies whether to enable Transparent Data Encryption (TDE). Valid
      values:

      true: enable TDE

      false: disable TDE (default)

      Note: The parameter takes effect only when DBType is PostgreSQL or Oracle. You
      cannot disable TDE after it is enabled.'
    Type: Boolean
  Tags:
    Description: Tags to attach to instance. Max support 20 tags to add during create
      instance. Each tag with two properties Key and Value, and Key is required.
    MaxLength: 20
    Type: Json
  VSwitchId:
    Description: The ID of the VSwitch to connect to.
    Type: String
  VpcId:
    Description: The ID of the VPC to connect to.
    Type: String
  ZoneId:
    Description: The zone ID of the cluster. You can call the DescribeRegions operation
      to query available zones.
    Type: String
Resources:
  DBCluster:
    Properties:
      AutoRenewPeriod:
        Ref: AutoRenewPeriod
      BackupRetentionPolicyOnClusterDeletion:
        Ref: BackupRetentionPolicyOnClusterDeletion
      CloneDataPoint:
        Ref: CloneDataPoint
      ClusterNetworkType:
        Ref: ClusterNetworkType
      CreationCategory:
        Ref: CreationCategory
      CreationOption:
        Ref: CreationOption
      DBClusterDescription:
        Ref: DBClusterDescription
      DBClusterParameters:
        Ref: DBClusterParameters
      DBNodeClass:
        Ref: DBNodeClass
      DBType:
        Ref: DBType
      DBVersion:
        Ref: DBVersion
      DefaultTimeZone:
        Ref: DefaultTimeZone
      GDNId:
        Ref: GDNId
      LowerCaseTableNames:
        Ref: LowerCaseTableNames
      MaintainTime:
        Ref: MaintainTime
      PayType:
        Ref: PayType
      Period:
        Ref: Period
      RenewalStatus:
        Ref: RenewalStatus
      ResourceGroupId:
        Ref: ResourceGroupId
      SecurityGroupIds:
        Ref: SecurityGroupIds
      SecurityIPList:
        Ref: SecurityIPList
      SourceResourceId:
        Ref: SourceResourceId
      TDEStatus:
        Ref: TDEStatus
      Tags:
        Ref: Tags
      VSwitchId:
        Ref: VSwitchId
      VpcId:
        Ref: VpcId
      ZoneId:
        Ref: ZoneId
    Type: ALIYUN::POLARDB::DBCluster
Outputs:
  ClusterConnectionString:
    Description: The cluster connection string of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - ClusterConnectionString
  ClusterEndpointId:
    Description: The cluster endpoint ID of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - ClusterEndpointId
  CustomConnectionStrings:
    Description: The custom connection strings of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - CustomConnectionStrings
  CustomEndpointIds:
    Description: The custom endpoint IDs of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - CustomEndpointIds
  DBClusterId:
    Description: The ID of the ApsaraDB for POLARDB cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - DBClusterId
  DBNodeIds:
    Description: The ID list of cluster nodes.
    Value:
      Fn::GetAtt:
      - DBCluster
      - DBNodeIds
  OrderId:
    Description: The Order ID.
    Value:
      Fn::GetAtt:
      - DBCluster
      - OrderId
  PrimaryConnectionString:
    Description: The primary connection string of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - PrimaryConnectionString
  PrimaryEndpointId:
    Description: The primary endpoint ID of the db cluster.
    Value:
      Fn::GetAtt:
      - DBCluster
      - PrimaryEndpointId

To view more examples, visit POLARDB.json and POLARDB.yml. In the examples, the ALIYUN::POLARDB::DBCluster, ALIYUN::POLARDB::Account, ALIYUN::POLARDB::DBInstance, ALIYUN::POLARDB::DBNodes, ALIYUN::POLARDB::AccountPrivilege, ALIYUN::POLARDB::DBClusterAccessWhiteList, and ALIYUN::POLARDB::DBClusterEndpointAddress resource types are involved.