ALIYUN::RDS::PrepayDBInstance is used to create a subscription ApsaraDB RDS instance.
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
}
}
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 in 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. | The name must be globally unique. The name must be 2 to 16 characters in length, and can contain letters, digits, and underscores (_). The name must start with a letter and end with a letter or digit. |
PeriodType | String | Yes | No | The unit of the subscription period. | Valid values:
|
DBInstanceNetType | String | No | No | The network 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 network type of the endpoint. | Valid values:
|
PreferredBackupTime | String | No | No | The backup window. | Specify the backup window in the HH:mmZ-HH:mmZ format. Value 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 in the CIDR block of the specified vSwitch. | If you do not specify this property, the system allocates a private IP address. |
Engine | String | Yes | No | The type of the engine. | Valid values:
|
MultiAZ | Boolean | No | No | Specifies whether the instance can be deployed across zones. | Valid values:
|
VpcId | String | No | No | The ID of the 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. |
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the instance. | Valid values:
|
VSwitchId | String | No | No | The ID of the vSwitch to which you want to connect the instance. | None |
BackupRetentionPeriod | Number | No | No | The number of days for which you can retain the backup. | 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 of the instance. | Valid values:
|
ZoneId | String | No | No | The zone ID of the instance. | None |
EngineVersion | String | Yes | No | The version of the database engine. | Valid values:
|
DBInstanceClass | String | Yes | Yes | The instance type of the instance. | Examples: rds.mys2.large, rds.mss1.large, and rds.pg.s1.small. |
PreferredBackupPeriod | List | No | No | The day on which you want to back up data. | Valid values:
|
DBInstanceStorage | Integer | Yes | Yes | The storage capacity of the database instance. | Valid values:
Unit: GB. Note The value 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 and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter but cannot start with |
Tags | Map | No | Yes | The tags of the instance. | None |
Period | Number | Yes | No | The subscription period. | Valid values:
|
MasterUserPassword | String | No | Yes | The password of the database account. | 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 password can contain the following special characters: |
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 for the instance. | Valid values:
|
SlaveZoneIds | List | No | No | The secondary zone IDs if the instance that you want to create is of the High-availability Edition or Enterprise Edition. | 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 ZoneId is set to If you want the system to select a secondary zone, set this property to |
TargetDedicatedHostIdForMaster | String | No | No | The ID of the host on which you want to create the primary instance within a dedicated cluster. | None |
RoleARN | String | No | No | The Alibaba Cloud Resource Name (ARN) that is provided by your Alibaba Cloud account for RAM users. The ARN is used to connect ApsaraDB RDS to Key Management Service (KMS). | None |
DBInstanceStorageType | String | No | No | The storage type of the instance. | Valid values:
|
Category | String | No | No | The edition of the instance. | Valid values:
|
DBParamGroupId | String | No | No | The ID of the property template. | None |
EncryptionKey | String | No | No | The ID of the key that is used for disk encryption in the region in which the instance resides. | You can obtain the ID of the key from the KMS console. You can also create a key. |
DBIsIgnoreCase | Integer | No | No | Specifies whether the table names are case-sensitive. | Valid values:
|
SecurityGroupId | String | No | Yes | The ID of the associated security group. | Each ApsaraDB RDS instance can be associated with up to three security groups. Separate security groups with commas (,). To disassociate the instance from all security groups, set this property to an empty string. |
TargetDedicatedHostIdForLog | String | No | No | The ID of the host on which you want to create the logger instance within a dedicated cluster. | None |
DBTimeZone | String | No | No | The UTC time zone of the instance. | Valid values: -12:59 to +13:00. If you do not specify this property, the system uses the default time zone of the region to which the instance belongs. 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 where you want to create the instance. | None |
TargetDedicatedHostIdForSlave | String | No | No | The ID of the host on which you want to create the secondary instance within 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 secure sockets layer (SSL) connection settings for the instance. | Valid values:
|
ArchiveBackupRetentionPeriod | Integer | No | No | The number of days for which you want to retain archived backup files. | None |
LogBackupRetentionPeriod | Integer | No | No | The number of days for which you want to retain log backups. | None |
EnableBackupLog | Boolean | No | No | Specifies whether to enable the log backup feature. | Valid values:
|
LogBackupLocalRetentionNumber | Integer | No | No | The number of binary log files that you want to retain on the instance. | None |
ArchiveBackupKeepPolicy | String | No | No | The cycle based on which you want to retain archived backups. | Valid values:
ArchiveBackupKeepCount determines the number of backup files that can be retained within the cycle. The default value is 0. Note This property is valid if you set the BackupPolicyMode property to DataBackupPolicy. |
LocalLogRetentionHours | Integer | No | No | The number of hours for which you want to retain the log backups on the instance. | None |
HighSpaceUsageProtection | String | No | No | Specifies whether to delete binary log files 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 compression type. | Valid values:
|
LogBackupFrequency | String | No | No | The backup frequency of log backups. | This property is available only when the instance runs SQL Server. Set the value to LogInterval. This value specifies that logs are backed up every 30 minutes. Note The default value of LogBackupFrequency is the same as that of PreferredBackupPeriod. |
BackupPolicyMode | String | No | No | The backup type. | Valid values:
|
ArchiveBackupKeepCount | Integer | No | No | The number of archived backup files that you want to retain. | None |
LocalLogRetentionSpace | Integer | No | No | The maximum capacity usage that is allowed for log files on the instance. | None |
ReleasedKeepPolicy | String | No | No | The policy that is used to retain archived backup files if the instance is deleted. | Valid values:
|
BackUpCategory | String | No | No | The edition of the secondary instance. | Valid values:
|
ServerlessConfig | Map | No | No | The settings of the serverless instance. | For more information, see ServerlessConfig properties. |
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 the forced scaling feature for the serverless instance. | Valid values:
Note
|
MaxCapacity | Number | Yes | No | The maximum value of RCU scaling. | Valid values: 0.5 to 8. Note The value of this property must be greater than or equal to the value of the MinCapacity property. |
MinCapacity | Number | Yes | No | The minimum value of RCU scaling. | Valid values: 0.5 to 8. Note The value of this property must be less than or equal to the value of the MaxCapacity property. |
AutoPause | Boolean | No | No | Specifies whether to enable the smart startup and stop feature for the serverless instance. | Valid values:
Note After the smart startup and suspension feature is enabled, if no connections to the instance are established within 10 minutes, the instance is suspended. After a connection to the instance is established, the instance is resumed. |
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 and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter but cannot start with http:// or |
CharacterSetName | String | Yes | No | The character set that is used by the instance. | Valid values:
|
DBName | String | Yes | No | The name of the database. | The name must be globally unique. The name must be 1 to 64 characters in length and can contain lowercase letters, digits, and underscores (_). The name must start with a lowercase letter. |
Return values
Fn::GetAtt
InnerPort: the internal port of the instance.
OrderId: the order ID of the instance.
PublicConnectionString: the public endpoint of the instance.
InnerIPAddress: the internal IP address of the instance.
DBInstanceId: the ID of the instance.
PublicIPAddress: the public IP address of the instance.
PublicPort: the public port of the instance.
InnerConnectionString: the internal endpoint of the instance.