ALIYUN::RDS::PrepayDBInstance is used to create subscription ApsaraDB RDS instances.
Syntax
{
"Type": "ALIYUN::RDS::PrepayDBInstance",
"Properties": {
"DBMappings": List,
"CouponCode": String,
"MasterUsername": String,
"PeriodType": String,
"DBInstanceNetType": String,
"MasterUserType": String,
"AutoRenew": Boolean,
"PreferredBackupTime": String,
"PrivateIpAddress": String,
"Engine": String,
"MultiAZ": Boolean,
"VpcId": String,
"ConnectionMode": String,
"ResourceGroupId": String,
"VSwitchId": String,
"BackupRetentionPeriod": Number,
"Quantity": Number,
"CommodityCode": String,
"ZoneId": String,
"AutoPay": Boolean,
"Port": Integer,
"ConnectionStringPrefix": String,
"ConnectionStringType": String,
"EngineVersion": String,
"DBInstanceClass": String,
"PreferredBackupPeriod": List,
"DBInstanceStorage": Integer,
"DBInstanceDescription": String,
"Tags": Map,
"Period": Number,
"MasterUserPassword": String,
"AllocatePublicConnection": Boolean,
"SlaveZoneIds": List,
"TargetDedicatedHostIdForMaster": String,
"RoleARN": String,
"DBInstanceStorageType": String,
"Category": String,
"DBParamGroupId": String,
"EncryptionKey": String,
"DBIsIgnoreCase": Integer,
"SecurityGroupId": String,
"TargetDedicatedHostIdForLog": String,
"DBTimeZone": String,
"DedicatedHostGroupId": String,
"TargetDedicatedHostIdForSlave": String,
"MaintainTime": String,
"SQLCollectorStatus": String,
"SSLSetting": String,
"ArchiveBackupRetentionPeriod": Integer,
"LogBackupRetentionPeriod": Integer,
"EnableBackupLog": Boolean,
"LogBackupLocalRetentionNumber": Integer,
"ArchiveBackupKeepPolicy": String,
"LocalLogRetentionHours": Integer,
"HighSpaceUsageProtection": String,
"CompressType": Integer,
"LogBackupFrequency": String,
"BackupPolicyMode": String,
"ArchiveBackupKeepCount": Integer,
"LocalLogRetentionSpace": Integer,
"ReleasedKeepPolicy": String,
"BackUpCategory": String,
"ServerlessConfig": Map,
"InstanceNetworkType": String,
"StorageAutoScale": String,
"StorageUpperBound": Number,
"StorageThreshold": Number,
"IoAccelerationEnabled": String,
"ColdDataEnabled": Boolean,
"BurstingEnabled": Boolean
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
DBMappings | List | No | No | The databases that you want to create on the instance. | For more information, see DBMappings properties. |
CouponCode | String | No | No | The coupon code. | None. |
MasterUsername | String | No | Yes | The name of the database account of the instance. | The name must be globally unique. It must be 2 to 16 characters in length. It must start with a letter and end with a letter or digit. It can contain letters, digits, and underscores (_). |
PeriodType | String | Yes | No | The unit of the subscription duration. | Valid values:
|
DBInstanceNetType | String | No | No | The network connection type of the instance. | Valid values:
|
MasterUserType | String | No | No | The type of the database account. | Valid values:
|
Port | Integer | No | Yes | The port of the instance. | None. |
ConnectionStringPrefix | String | No | Yes | The prefix of the endpoint. | The prefix must be 8 to 64 characters in length, and can contain letters, digits, and hyphens (-). |
ConnectionStringType | String | No | Yes | The endpoint type. | Valid values:
|
PreferredBackupTime | String | No | No | The backup time. | Specify the time in the HH:mmZ-HH:mmZ format. Valid values: 00:00Z-01:00Z, 01:00Z-02:00Z, 02:00Z-03:00Z, 03:00Z-04:00Z, 04:00Z-05:00Z, 05:00Z-06:00Z, 06:00Z-07:00Z, 07:00Z-08:00Z, 08:00Z-09:00Z, 09:00Z-10:00Z, 10:00Z-11:00Z, 11:00Z-12:00Z, 12:00Z-13:00Z, 13:00Z-14:00Z, 14:00Z-15:00Z, 15:00Z-16:00Z, 16:00Z-17:00Z, 17:00Z-18:00Z, 18:00Z-19:00Z, 19:00Z-20:00Z, 20:00Z-21:00Z, 21:00Z-22:00Z, 22:00Z-23:00Z, and 23:00Z-24:00Z. |
PrivateIpAddress | String | No | No | The private IP address that corresponds to the vSwitch. | If you do not specify this property, the system automatically assigns a private IP address. |
Engine | String | Yes | No | The type of the database engine. | Valid values:
|
MultiAZ | Boolean | No | No | Specifies whether to deploy the instance across zones. | Valid values:
|
VpcId | String | No | No | The ID of the virtual private cloud (VPC). | None. |
ConnectionMode | String | No | No | The connection mode of the database. | Valid values:
If you do not specify this property, the system assigns a connection mode by default. |
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the instance. | Valid values:
|
VSwitchId | String | No | No | The vSwitch ID. | None. |
BackupRetentionPeriod | Number | No | No | The number of days for which you can retain the backup data. | None. |
Quantity | Number | No | No | The number of instances that you want to create. | Valid values: 1 to 99. Default value: 1. |
CommodityCode | String | Yes | No | The commodity code. | Valid values:
|
ZoneId | String | No | No | The zone ID. | None. |
EngineVersion | String | Yes | No | The version of the database engine. | Valid values:
|
DBInstanceClass | String | Yes | Yes | The instance type. | Examples: rds.mys2.large, rds.mss1.large, and rds.pg.s1.small. |
PreferredBackupPeriod | List | No | No | The day of a week on which you want to back up data. | Valid values:
|
DBInstanceStorage | Integer | Yes | Yes | The storage capacity of the instance. | Valid values:
Unit: GB. Note The value of DBInstanceStorage must be in increments of 5 GB. |
DBInstanceDescription | String | No | No | The description of the instance. | The description must be 2 to 256 characters in length. It must start with a letter and cannot start with |
Tags | Map | No | Yes | The tags. | None. |
Period | Number | Yes | No | The subscription duration. | Valid values:
|
MasterUserPassword | String | No | Yes | The password of the database account of the instance. | The password must be 8 to 32 characters in length. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported: |
AllocatePublicConnection | Boolean | No | No | Specifies whether to apply for a public endpoint for the instance. | Valid values:
|
AutoPay | Boolean | No | No | Specifies whether to enable automatic payment. | Valid values:
|
SlaveZoneIds | List | No | No | The secondary zone IDs of the High-availability Edition or Enterprise Edition instance. | You can specify up to two secondary zones. For example, you can set this property to You must specify a vSwitch for each primary or secondary zone. For example, if you set ZoneId to If you want the system to automatically select a secondary zone, you must set SlaveZoneIds to |
TargetDedicatedHostIdForMaster | String | No | No | The host ID of the primary instance that you want to create in a dedicated cluster. | None. |
RoleARN | String | No | No | The Alibaba Cloud Resource Name (ARN) of the role. You can access Key Management Service (KMS) from ApsaraDB RDS by using the role. | None. |
DBInstanceStorageType | String | No | Yes | The storage type of the instance. | Valid values:
|
Category | String | No | Yes | The edition of the instance. | Valid values:
|
DBParamGroupId | String | No | No | The ID of the parameter template. | None. |
EncryptionKey | String | No | No | The ID of the key that is used for disk encryption in the region where the instance resides. | You can obtain the key ID from the KMS console. You can also create a key. |
DBIsIgnoreCase | Integer | No | No | Specifies whether the table names are case-insensitive. | Valid values:
|
SecurityGroupId | String | No | Yes | The ID of the security group. | You can associate the instance with up to three security groups. Separate security group IDs with commas (,). If you want to disassociate the instance from all security groups, leave this property empty. |
TargetDedicatedHostIdForLog | String | No | No | The host ID of the logger instance that you want to create in a dedicated cluster. | None. |
DBTimeZone | String | No | No | The UTC time zone. | Valid values: -12:59 to +13:00. By default, if you do not specify this property, the system uses the default time zone of the region where the instance resides. If you create an instance to which local SSDs are attached, you can name the time zone. |
DedicatedHostGroupId | String | No | No | The ID of the dedicated cluster in which you want to create the instance. | None. |
TargetDedicatedHostIdForSlave | String | No | No | The host ID of the secondary instance that you want to create in a dedicated cluster. | None. |
MaintainTime | String | No | No | The maintenance window of the instance. | Specify the maintenance window in the HH:mmZ-HH:mmZ format. |
SQLCollectorStatus | String | No | Yes | Specifies whether to enable SQL Explorer and Audit. | Valid values:
|
SSLSetting | String | No | No | The SSL connection settings of the instance. | Valid values:
|
ArchiveBackupRetentionPeriod | Integer | No | No | The number of days for which you want to retain the archived backups. | None. |
LogBackupRetentionPeriod | Integer | No | No | The number of days for which you want to retain the log backups. | None. |
EnableBackupLog | Boolean | No | No | Specifies whether to enable log backup. | Valid values:
|
LogBackupLocalRetentionNumber | Integer | No | No | The number of local binary logs that you want to retain. | None. |
ArchiveBackupKeepPolicy | String | No | No | The cycle based on which you want to retain the archived backups. | Valid values:
ArchiveBackupKeepCount determines the number of backups that can be retained within the cycle. The default number is 0. Note This property takes effect when BackupPolicyMode is set to DataBackupPolicy. |
LocalLogRetentionHours | Integer | No | No | The number of hours for which you want to retain the local log backups. | None. |
HighSpaceUsageProtection | String | No | No | Specifies whether to forcefully delete binary logs if the capacity usage of the instance exceeds 80% or the remaining capacity is less than 5 GB on the instance. | Valid values:
|
CompressType | Integer | No | No | The method that you want to use to compress backup data. | Valid values:
|
LogBackupFrequency | String | No | No | The frequency at which you want to back up logs. | This property is available when Engine is set to SQLServer. Set the value to LogInterval. A value of LogInterval specifies that the system backs up logs every 30 minutes. Note The default value of LogBackupFrequency is the same as the value of PreferredBackupPeriod. |
BackupPolicyMode | String | No | No | The backup type. | Valid values:
|
ArchiveBackupKeepCount | Integer | No | No | The number of archived backups that you want to retain. | None. |
LocalLogRetentionSpace | Integer | No | No | The maximum capacity usage of local logs on the instance. | None. |
ReleasedKeepPolicy | String | No | No | The policy that you want to use to retain the archived backups if the instance is released. | Valid values:
|
BackUpCategory | String | No | No | The edition of the backup instance. | Valid values:
|
ServerlessConfig | Map | No | No | The settings of the serverless instance. | For more information, see ServerlessConfig properties. |
InstanceNetworkType | String | No | No | The network type of the instance. | Valid values:
Note For the instance that runs MySQL and uses cloud disks, you must set this property to VPC. For the instance that runs PostgreSQL or MariaDB, you must set this property to VPC. For the instance that runs SQL Server Basic or SQL Server Web, you can set this property to VPC or Classic. For other types of instances, you must set this property to VPC. |
StorageAutoScale | String | No | No | Specifies whether to enable automatic storage expansion. | This property is supported only when Engine is set to MySQL or PostgreSQL. Valid values:
Note You can also call the ModifyDasInstanceConfig operation to adjust the settings of automatic storage expansion for an instance after the instance is created. For more information, see Configure automatic storage expansion. |
StorageUpperBound | Number | No | No | The maximum storage capacity that is allowed for automatic storage expansion. | Automatic storage expansion does not cause the storage capacity of the instance to exceed the value of this property. Unit: GB. Note The value must be greater than or equal to 0. You must specify this property when StorageAutoScale is set to Enable. |
StorageThreshold | Number | No | No | The threshold based on which automatic storage expansion is triggered. Unit: %. | Valid values:
Note You must specify this property when StorageAutoScale is set to Enable. |
IoAccelerationEnabled | String | No | No | Specifies whether to enable I/O acceleration. | Valid values:
|
ColdDataEnabled | Boolean | No | No | This property is reserved. | None. |
BurstingEnabled | Boolean | No | No | Specifies whether to enable I/O burst. | Valid values:
|
ServerlessConfig syntax
"ServerlessConfig": {
"SwitchForce": Boolean,
"MaxCapacity": Number,
"MinCapacity": Number,
"AutoPause": Boolean
}
ServerlessConfig properties
Property | Type | Required | Editable | Description | Constraint |
SwitchForce | Boolean | No | No | Specifies whether to enable forced scaling for the serverless instance. | Valid values:
Note
|
MaxCapacity | Number | Yes | No | The maximum number of RCUs of the instance. | Valid values: 0.5 to 8. Note The value of this property must be greater than or equal to the value of MinCapacity. |
MinCapacity | Number | Yes | No | The minimum number of RCUs of the instance. | Valid values: 0.5 to 8. Note The value of this property must be less than or equal to the value of MaxCapacity. |
AutoPause | Boolean | No | No | Specifies whether to enable the automatic startup and suspension feature for the serverless instance. | Valid values:
Note After you enable the feature, the instance is suspended if the instance is not connected within 10 minutes, and the instance is resumed if the instance is connected. |
DBMappings syntax
"DBMappings": [
{
"DBDescription": String,
"CharacterSetName": String,
"DBName": String
}
]
DBMappings properties
Property | Type | Required | Editable | Description | Constraint |
DBDescription | String | No | No | The description of the database. | The description must be 2 to 256 characters in length. It must start with a letter and cannot start with |
CharacterSetName | String | Yes | No | The character set. | Valid values:
|
DBName | String | Yes | No | The database name. | The name must be globally unique. It can be up to 64 characters in length, and can contain lowercase letters, digits, and underscores (_). It must start with a lowercase letter. |
Return values
Fn::GetAtt
InnerPort: the private port of the instance.
OrderId: the order ID.
PublicConnectionString: the public endpoint of the instance.
InnerIPAddress: the private IP address of the instance.
DBInstanceId: the instance ID.
PublicIPAddress: the public IP address of the instance.
PublicPort: the public port of the instance.
InnerConnectionString: the private endpoint of the instance.