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,
"InstanceNetworkType": String,
"StorageAutoScale": String,
"StorageUpperBound": Number,
"StorageThreshold": Number
}
}
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. | The name must be globally unique. The name must be 2 to 16 characters in length, and can contain letters, digits, and underscores (_). It 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 permission type of the database account. | Valid values:
|
Port | Integer | No | Yes | The port number 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 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 engine type. | Valid values:
|
MultiAZ | Boolean | No | No | Specifies whether the instance can be deployed across zones. | Valid values:
|
VpcId | String | No | No | The virtual private cloud (VPC) ID of the instance. | 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 vSwitch ID. | None |
BackupRetentionPeriod | Number | No | No | The retention period of the backup data. Unit: days. | 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. |
|
DBInstanceClass | String | Yes | Yes | The instance specifications. | 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. |
Unit: GB. Note This value must be in increments of 5 GB. |
DBInstanceDescription | String | No | No | The instance description. | 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. | None |
Period | Number | Yes | No | The subscription period. |
|
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 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 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 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 Resource Access Management (RAM) role. ApsaraDB RDS can access Key Management Service (KMS) only after it assumes the RAM 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 for disk encryption in the region of the instance. | 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 security group. | Each ApsaraDB RDS instance can be associated with up to three security groups. Separate multiple security groups with commas (,). To disassociate the instance from all security groups, set this property to an empty string. |
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 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 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 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 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 value is 0. Note This property takes effect when you set the BackupPolicyMode property to DataBackupPolicy. |
LocalLogRetentionHours | Integer | No | No | The number of hours for which you want to retain the local log backups on the instance. | None |
HighSpaceUsageProtection | String | No | No | Specifies whether to 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 backups. | Valid values:
|
LogBackupFrequency | String | No | No | The backup frequency of logs. | 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 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 to retain the archived backups 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. |
InstanceNetworkType | String | No | No | The network type of the instance. | Valid values:
Note If the instance runs MySQL and uses cloud disks, you must set this property to VPC. If the instance runs PostgreSQL or MariaDB, you must set this property to VPC. If the instance runs SQL Server Basic or SQL Server Web, you can set this property to VPC or Classic. If the instance runs other database engines, you must set this property to VPC. |
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 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 smart startup and stop for the serverless instance. | Valid values:
Note After smart startup and stop is enabled, if no connections to the instance are established within 10 minutes, the instance is stopped. After a connection to the instance is established, the instance is started. |
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 After the instance is created, you can call the ModifyDasInstanceConfig operation to adjust the setting of automatic storage expansion for the instance. For more information, see Configure automatic storage expansion. |
StorageUpperBound | Number | No | No | The maximum value of automatic storage expansion. | The storage capacity of the instance cannot 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 for automatic storage expansion. Unit: percent. | Valid values:
Note You must specify this property when StorageAutoScale is set to Enable. |
DBMappings syntax
"DBMappings": [
{
"DBDescription": String,
"CharacterSetName": String,
"DBName": String
}
]
DBMappings properties
Property | Type | Required | Editable | Description | Constraint |
DBDescription | String | No | No | The database description. | 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. |
|
DBName | String | Yes | No | The database name. | The name must be globally unique. The name must be 1 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 internal port of the instance.
OrderId: the order ID.
PublicConnectionString: the public endpoint of the instance.
InnerIPAddress: the internal 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.