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 to which the instance belongs. | None. |
DBMappings | List | No | No | The databases that are to be created in the instance. | For more information, see DBMappings properties. |
CouponCode | String | No | No | The coupon code. | None. |
MasterUsername | String | No | No | 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 type of network connection of the instance. |
Valid values:
|
MasterUserType | String | No | No | The type of the database account. | Valid values:
|
Port | Integer | No | Yes | The port that is used to connect to the instance. | None. |
ConnectionStringPrefix | String | No | Yes | The prefix of the connection string. | The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). |
ConnectionStringType | String | No | Yes | The type of the connection string. | 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 data. | 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 instance. | Valid values:
|
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the database instance. | Valid values:
|
VSwitchId | String | No | No | The ID of the vSwitch to which the database instance is connected. | None. |
BackupRetentionPeriod | Number | No | No | The number of days for which the backup is retained. | None. |
Quantity | Number | No | No | The number of instances to be created. |
Valid values: 1 to 99. Default value: 1. |
CommodityCode | String | Yes | No | The commodity code of the database instance. | Valid values:
|
ZoneId | String | No | No | The ID of the zone where the instance resides. | None. |
EngineVersion | String | Yes | No | The version of the database engine. | Valid values:
|
DBInstanceClass | String | Yes | Yes | The instance class. | Examples: rds.mys2.large, rds.mss1.large, and rds.pg.s1.small. |
PreferredBackupPeriod | List | No | No | The day on which data is backed up. | Valid values:
|
DBInstanceStorage | Integer | Yes | Yes | The storage capacity of the ApsaraDB RDS instance. | Valid values:
Note You can specify values in multiples of 5.
|
DBInstanceDescription | String | No | No | The description of the instance. | The description must be 2 to 256 characters in length. The description must start
with a letter and cannot start with http:// or https:// . The description can contain letters, digits, underscores (_), and hyphens (-).
|
Tags | Map | No | Yes | The tags of the instance. | None. |
Period | Number | Yes | No | The subscription period. | Valid values:
|
MasterUserPassword | String | No | No | 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. Special characters include ! @ # $ & % ^ * ( ) _ + - = .
|
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 that you need to specify when you create a High-availability Edition or Enterprise Edition instance. | You can specify a maximum of two secondary zones. For example, you can set this property
to ["zone-b"] or ["zone-b", "zone-c"] .
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 to the service account of the instance by your Alibaba Cloud account. This ARN is used to connect 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 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 ID of the key from the KMS console. You can also create a key. |
DBIsIgnoreCase | Integer | No | No | Specifies whether table names on the instance 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 the archived backup is retained. | None. |
LogBackupRetentionPeriod | Integer | No | No | The number of days for which the log backup is retained. | 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 the archived backup is retained. | 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 when the BackupPolicyMode property is set to DataBackupPolicy.
|
LocalLogRetentionHours | Integer | No | No | The number of hours for which the log backup is retained 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 format that is used to compress backup data. | 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 backup files that are retained. | 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 released. | 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 suspension 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. The description must start
with a letter and cannot start with http:// or https:// . The description can contain letters, digits, underscores (_), and hyphens (-).
|
CharacterSetName | String | Yes | No | The character set. |
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 ID of the order.
- PublicConnectionString: the public connection string 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 connection string of the instance.
Examples
-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "PeriodType": { "Type": "String", "Description": "Charge period for created instances.", "AllowedValues": [ "Month", "Year" ], "Default": "Month" }, "ResourceGroupId": { "Type": "String", "Description": "Resource group id." }, "ArchiveBackupRetentionPeriod": { "Type": "Number", "Description": "The number of days for which to retain archived backups. \n The default value 0 specifies not to enable the backup archiving function. Valid values: 30 to 1095.", "MinValue": 30, "MaxValue": 1095 }, "DBTimeZone": { "Type": "String", "Description": "The UTC time zone of the instance. Valid values: -12:00 to +12:00. The time zone must be an integer value such as +08:00. Values such as +08:30 are not allowed." }, "Port": { "Type": "Number", "Description": "The port of the database service.", "MinValue": 1, "MaxValue": 65535 }, "ArchiveBackupKeepCount": { "Type": "Number", "Description": "The number of archived backups that can be retained. Default value: 1. Valid values: \nThe value of this parameter ranges from 1 to 31 when the ArchiveBackupKeepPolicy \n parameter is set to ByMonth. \nThe value of this parameter ranges from 1 to 7 when the ArchiveBackupKeepPolicy \n parameter is set to ByWeek. \nNote You do not need to specify this parameter when the ArchiveBackupKeepPolicy \nparameter is set to KeepAll.", "MinValue": 1, "MaxValue": 31 }, "LogBackupRetentionPeriod": { "Type": "Number", "Description": "The number of days for which to retain log backup files. Valid values: 7 to 730. The log backup \n retention period cannot be longer than the data backup retention period. Note If you enable the log \n backup function, you can specify the log backup retention period. This applies only when the \n instance runs MySQL, PostgreSQL, or PPAS.", "MinValue": 7, "MaxValue": 730 }, "DBInstanceStorage": { "Type": "Number", "Description": "Database instance storage size. mysql is [5,1000]. sql server 2008r2 is [10,1000], sql server 2012/2012_web/2016-web is [20,1000]. PostgreSQL and PPAS is [5,2000]. Increased every 5 GB, Unit in GB" }, "DBMappings": { "Type": "Json", "Description": "Database mappings to attach to db instance." }, "ConnectionStringPrefix": { "Type": "String", "Description": "The prefix of the endpoint. \nOnly the prefix of the CurrentConnectionString parameter value can be modified.\nThe prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). ", "AllowedPattern": "[a-zA-Z0-9-]{8,64}" }, "MultiAZ": { "Type": "Boolean", "Description": "Specifies if the database instance is a multiple Availability Zone deployment. ", "AllowedValues": [ "True", "true", "False", "false" ], "Default": false }, "Engine": { "Type": "String", "Description": "Database instance engine type. Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB now.", "AllowedValues": [ "MySQL", "SQLServer", "PostgreSQL", "PPAS", "MariaDB" ] }, "Tags": { "Type": "Json", "Description": "The tags of an instance.\nYou should input the information of the tag with the format of the Key-Value, such as {\"key1\":\"value1\",\"key2\":\"value2\", ... \"key5\":\"value5\"}.\nAt most 5 tags can be specified.\nKey\nIt can be up to 64 characters in length.\nCannot begin with aliyun.\nCannot begin with http:// or https://.\nCannot be a null string.\nValue\nIt can be up to 128 characters in length.\nCannot begin with aliyun.\nCannot begin with http:// or https://.\nCan be a null string." }, "DBInstanceDescription": { "Type": "String", "Description": "Description of created database instance." }, "TargetDedicatedHostIdForMaster": { "Type": "String", "Description": "The ID of the host to which the instance belongs if you create a primary instance in a host group." }, "EngineVersion": { "Type": "String", "Description": "Database instance version of the relative engine type.Support MySQL: 5.5/5.6/5.7/8.0;\nSQLServer: 2008r2/2012/2012_ent_ha/2012_std_ha/2012_web/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent;\nPostgreSQL: 9.4/10.0/11.0/12.0;\nPPAS: 9.3/10.0;\nMariaDB: 10.3." }, "DBInstanceClass": { "Type": "String", "Description": "Database instance type. Refer the RDS database instance type reference, such as 'rds.mys2.large', 'rds.mss1.large', 'rds.pg.s1.small' etc" }, "ArchiveBackupKeepPolicy": { "Type": "String", "Description": "The period for which to retain archived backups. The number of archived backups that can \n be retained within the specified period is determined by the ArchiveBackupKeepCount parameter. \n Default value: 0. Valid values: \nByMonth \n ByWeek \n KeepAll", "AllowedValues": [ "ByMonth", "ByWeek", "KeepAll" ] }, "VSwitchId": { "Type": "String", "Description": "The vSwitch id of created instance. For VPC network, the property is required." }, "BackupPolicyMode": { "Type": "String", "Description": "Backup type, \nDataBackupPolicy: data backup \nLogBackupPolicy: log backup", "AllowedValues": [ "DataBackupPolicy", "LogBackupPolicy" ] }, "Period": { "Type": "Number", "Description": "Prepaid time period. While choose by pay by month, it could be from 1 to 9. While choose pay by year, it could be from 1 to 3.", "MinValue": 1, "MaxValue": 9, "Default": 1 }, "LocalLogRetentionHours": { "Type": "Number", "Description": "The number of hours for which to retain log backup files on the instance. \nValid values: 0 to 168. The value 0 specifies not to retain log backup files on the instance. \nYou can retain the default value. Note You must specify this parameter when the BackupPolicyMode \nparameter is set to LogBackupPolicy.", "MinValue": 0, "MaxValue": 168 }, "HighSpaceUsageProtection": { "Type": "String", "Description": "Specifies whether to forcibly delete log backup files when the space usage of the \n instance exceeds 80% or the remaining space is less than 5 GB. Valid values: \n Enable and Disable. You can retain the default value. Note You must specify \n this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.", "AllowedValues": [ "Enable", "Disable" ] }, "RoleARN": { "Type": "String", "Description": "The Alibaba Cloud Resource Name (ARN) provided to the service account of the instance by your Alibaba Cloud account to connect to KMS. You can copy the ARN from the RAM console." }, "MasterUserPassword": { "Type": "String", "Description": "The master password for the database instance. ", "MinLength": 8, "MaxLength": 32 }, "VpcId": { "Type": "String", "Description": "The VPC id of created database instance. For VPC network, the property is required." }, "SSLSetting": { "Type": "String", "Description": "Secure Sockets Layer (SSL) link setting of the instance. Valid values:\nDisabled: Disable SSL\nEnabledForPublicConnection: Public connection address will be protected by the SSL certificate. It requires AllocatePublicConnection is true.\nEnabledForInnerConnection: Private connection address will be protected by the SSL certificate.\nDefault value is Disabled.", "AllowedValues": [ "Disabled", "EnabledForPublicConnection", "EnabledForInnerConnection" ], "Default": "Disabled" }, "MasterUsername": { "Type": "String", "Description": "The master user name for the database instance. " }, "ConnectionMode": { "Type": "String", "Description": "Connection Mode for database instance,support 'Standard' and 'Safe' mode. Default is RDS system assigns. " }, "LocalLogRetentionSpace": { "Type": "Number", "Description": "The maximum percentage of space that is allowed to store log backup files on the instance. \n If the space usage for log backup files exceeds this percentage, the system deletes earlier \n log backup files until the space usage falls below this percentage. Valid values:0 to 50. \n You can retain the default value. Note You must specify this parameter when the \n BackupPolicyMode parameter is set to LogBackupPolicy.", "MinValue": 0, "MaxValue": 50 }, "Category": { "Type": "String", "Description": "The edition of the instance. Valid values:\nBasic: specifies to use the Basic Edition.\nHighAvailability: specifies to use the High-availability Edition.\nAlwaysOn: specifies to use the Cluster Edition.\nFinance: specifies to use the Enterprise Edition.", "AllowedValues": [ "Basic", "HighAvailability", "AlwaysOn", "Finance" ] }, "PrivateIpAddress": { "Type": "String", "Description": "The private ip for created instance." }, "TargetDedicatedHostIdForSlave": { "Type": "String", "Description": "The ID of the host to which the instance belongs if you create a secondary instance in a host group." }, "DBInstanceNetType": { "Type": "String", "Description": "Database instance net type, default is Intranet.Internet for public access, Intranet for private access.", "AllowedValues": [ "Internet", "Intranet" ], "Default": "Intranet" }, "ReleasedKeepPolicy": { "Type": "String", "Description": "The policy used to retain archived backups if the instance is released. Default value: None. \n Valid values: \nLastest: Only the last archived backup is retained. \n All: All of the archived backups are retained.", "AllowedValues": [ "Lastest", "All" ] }, "DedicatedHostGroupId": { "Type": "String", "Description": "The ID of the host group to which the instance belongs if you create an instance in a host group." }, "AutoRenew": { "Type": "Boolean", "Description": "Auto renew the prepay instance. If the period type is by year, it will renew by year, else it will renew by month.", "AllowedValues": [ "True", "true", "False", "false" ], "Default": false }, "EncryptionKey": { "Type": "String", "Description": "The ID of the encryption key that is used to encrypt data on SSDs in the region. You can view the encryption key ID in the Key Management Service (KMS) console. You can also create an encryption key." }, "PreferredBackupPeriod": { "Type": "CommaDelimitedList", "Description": "The backup period. Separate multiple values with commas (,). The default value is the original value. Valid values:Monday Tuesday Wednesday Thursday Friday Saturday Sunday Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required." }, "LogBackupLocalRetentionNumber": { "Type": "Number", "Description": "The number of log backup files that can be retained on the instance. \nDefault value: 60. Valid values: 6 to 100.", "MinValue": 6, "MaxValue": 100 }, "SlaveZoneIds": { "Type": "Json", "Description": "List of slave zone ids can specify slave zone ids when creating the high-availability or enterprise edition instance. Meanwhile, VSwitchId needs to pass in the corresponding vswitch id to the slave zone by order. For example, ZoneId = \"zone-a\" and SlaveZoneIds = [\"zone-c\", \"zone-b\"], then the VSwitchId must be \"vsw-zone-a,vsw-zone-c,vsw-zone-b\". Of course, you can also choose automatic allocation, for example, ZoneId = \"zone-a\" and SlaveZoneIds = [\"Auto\", \"Auto\"], then the VSwitchId must be \"vsw-zone-a,Auto,Auto\". The list contains up to 2 slave zone ids, separated by commas.", "MaxLength": 2 }, "DBIsIgnoreCase": { "Type": "Number", "Description": "Specifies whether table names are case-sensitive. Valid values:\n1: Table names are not case-sensitive. This is the default value.\n0: Table names are case-sensitive." }, "CommodityCode": { "Type": "String", "Description": "The CommodityCode of the order.", "AllowedValues": [ "rds", "bards", "rords" ], "Default": "rds" }, "MaintainTime": { "Type": "String", "Description": "The period during which the maintenance performs. The format is HH:mmZ-HH:mmZ." }, "DBParamGroupId": { "Type": "String", "Description": "The ID of the parameter template used by the instance." }, "ZoneId": { "Type": "String", "Description": "selected zone to create database instance. You cannot set the ZoneId parameter if the MultiAZ parameter is set to true." }, "TargetDedicatedHostIdForLog": { "Type": "String", "Description": "The ID of the host to which the instance belongs if you create a log instance in a host group." }, "AllocatePublicConnection": { "Type": "Boolean", "Description": "If true, allocate public connection automate.", "AllowedValues": [ "True", "true", "False", "false" ] }, "PreferredBackupTime": { "Type": "String", "Description": "The time when the backup task is performed. Format: yyyy-MM-ddZ-HH:mm:ssZ.Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required." }, "SecurityGroupId": { "Type": "String", "Description": "The ID of the ECS security groups. \nEach RDS instance can be associated with up to three ECS security groups. \nYou must separate them with commas (,). \nTo delete an ECS Security group, leave this parameter empty. \n" }, "Quantity": { "Type": "Number", "Description": "The number of instance to be created, default is 1, max number is 99", "MinValue": 1, "MaxValue": 99, "Default": 1 }, "AutoPay": { "Type": "Boolean", "Description": "Automatic Payment. Default is false.", "AllowedValues": [ "True", "true", "False", "false" ], "Default": true }, "DBInstanceStorageType": { "Type": "String", "Description": "The storage type of the instance. Valid values:\nlocal_ssd: specifies to use local SSDs. This is the recommended storage type.\ncloud_ssd: specifies to use standard SSDs.\ncloud_essd: specifies to use enhanced SSDs." }, "BackUpCategory": { "Type": "String", "Description": "Specifies whether to enable the second-level backup function. This function allows a backup \nto be completed within seconds. Valid values: \nFlash: specifies to enable the second-level backup function. \n Standard: specifies to disable the second-level backup function.", "AllowedValues": [ "Flash", "Standard" ] }, "CompressType": { "Type": "Number", "Description": "The format used to compress backups. Valid values: \n 1: The zlib tool is used to compress backups into .tar.gz files. \n 4: The QuickLZ tool is used to compress backups into .xb.gz files. \nThis compression format is supported only when the instance runs MySQL 5.6 or 5.7. \nIt can be used to restore individual databases and tables. \n 8: The QuickLZ tool is used to compress backups into .xb.gz files. \n This compression format is supported only when the instance runs MySQL 8.0. \nIt cannot be used to restore individual databases or tables." }, "LogBackupFrequency": { "Type": "String", "Description": "The frequency at which to back up logs. Valid values: \nThe value LogInterval specifies to back up logs every 30 minutes. \n The default value of this parameter is the same as the data backup frequency. \nNote The value LogInterval is supported only when the instance runs SQL Server." }, "ConnectionStringType": { "Type": "String", "Description": "The endpoint type of the instance, allow values: Inner, Public", "AllowedValues": [ "Inner", "Public" ], "Default": "Inner" }, "CouponCode": { "Type": "String", "Description": "The coupon code of the order." }, "MasterUserType": { "Type": "String", "Description": "Privilege type of account.\n Normal: Common privilege. \n Super: High privilege. \nSysadmin: Super privileges (SA) (only supported by SQL Server)\nThe default value is Normal.", "AllowedValues": [ "Normal", "Super", "Sysadmin" ], "Default": "Normal" }, "EnableBackupLog": { "Type": "Boolean", "Description": "Specifies whether to enable the log backup function. Valid values: \nTrue: specifies to enable the log backup function. \nFalse: specifies to disable the log backup function. \nNote You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.", "AllowedValues": [ "True", "true", "False", "false" ] }, "SQLCollectorStatus": { "Type": "String", "Description": "Specifies whether to enable or disable the SQL Explorer (SQL audit) feature. \nValid values:Enable | Disabled.", "AllowedValues": [ "Enable", "Disabled" ] }, "BackupRetentionPeriod": { "Type": "Number", "Description": "The retention period of the data backup. Value range: 7 to 730. The default value is the original value. Note When the BackupPolicyMode parameter is set to LogBackupPolicy, this parameter is required.", "Default": 7 } }, "Resources": { "PrepayDBInstance": { "Type": "ALIYUN::RDS::PrepayDBInstance", "Properties": { "PeriodType": { "Ref": "PeriodType" }, "ResourceGroupId": { "Ref": "ResourceGroupId" }, "ArchiveBackupRetentionPeriod": { "Ref": "ArchiveBackupRetentionPeriod" }, "DBTimeZone": { "Ref": "DBTimeZone" }, "Port": { "Ref": "Port" }, "ArchiveBackupKeepCount": { "Ref": "ArchiveBackupKeepCount" }, "LogBackupRetentionPeriod": { "Ref": "LogBackupRetentionPeriod" }, "DBInstanceStorage": { "Ref": "DBInstanceStorage" }, "DBMappings": { "Ref": "DBMappings" }, "ConnectionStringPrefix": { "Ref": "ConnectionStringPrefix" }, "MultiAZ": { "Ref": "MultiAZ" }, "Engine": { "Ref": "Engine" }, "Tags": { "Ref": "Tags" }, "DBInstanceDescription": { "Ref": "DBInstanceDescription" }, "TargetDedicatedHostIdForMaster": { "Ref": "TargetDedicatedHostIdForMaster" }, "EngineVersion": { "Ref": "EngineVersion" }, "DBInstanceClass": { "Ref": "DBInstanceClass" }, "ArchiveBackupKeepPolicy": { "Ref": "ArchiveBackupKeepPolicy" }, "VSwitchId": { "Ref": "VSwitchId" }, "BackupPolicyMode": { "Ref": "BackupPolicyMode" }, "Period": { "Ref": "Period" }, "LocalLogRetentionHours": { "Ref": "LocalLogRetentionHours" }, "HighSpaceUsageProtection": { "Ref": "HighSpaceUsageProtection" }, "RoleARN": { "Ref": "RoleARN" }, "MasterUserPassword": { "Ref": "MasterUserPassword" }, "VpcId": { "Ref": "VpcId" }, "SSLSetting": { "Ref": "SSLSetting" }, "MasterUsername": { "Ref": "MasterUsername" }, "ConnectionMode": { "Ref": "ConnectionMode" }, "LocalLogRetentionSpace": { "Ref": "LocalLogRetentionSpace" }, "Category": { "Ref": "Category" }, "PrivateIpAddress": { "Ref": "PrivateIpAddress" }, "TargetDedicatedHostIdForSlave": { "Ref": "TargetDedicatedHostIdForSlave" }, "DBInstanceNetType": { "Ref": "DBInstanceNetType" }, "ReleasedKeepPolicy": { "Ref": "ReleasedKeepPolicy" }, "DedicatedHostGroupId": { "Ref": "DedicatedHostGroupId" }, "AutoRenew": { "Ref": "AutoRenew" }, "EncryptionKey": { "Ref": "EncryptionKey" }, "PreferredBackupPeriod": { "Ref": "PreferredBackupPeriod" }, "LogBackupLocalRetentionNumber": { "Ref": "LogBackupLocalRetentionNumber" }, "SlaveZoneIds": { "Ref": "SlaveZoneIds" }, "DBIsIgnoreCase": { "Ref": "DBIsIgnoreCase" }, "CommodityCode": { "Ref": "CommodityCode" }, "MaintainTime": { "Ref": "MaintainTime" }, "DBParamGroupId": { "Ref": "DBParamGroupId" }, "ZoneId": { "Ref": "ZoneId" }, "TargetDedicatedHostIdForLog": { "Ref": "TargetDedicatedHostIdForLog" }, "AllocatePublicConnection": { "Ref": "AllocatePublicConnection" }, "PreferredBackupTime": { "Ref": "PreferredBackupTime" }, "SecurityGroupId": { "Ref": "SecurityGroupId" }, "Quantity": { "Ref": "Quantity" }, "AutoPay": { "Ref": "AutoPay" }, "DBInstanceStorageType": { "Ref": "DBInstanceStorageType" }, "BackUpCategory": { "Ref": "BackUpCategory" }, "CompressType": { "Ref": "CompressType" }, "LogBackupFrequency": { "Ref": "LogBackupFrequency" }, "ConnectionStringType": { "Ref": "ConnectionStringType" }, "CouponCode": { "Ref": "CouponCode" }, "MasterUserType": { "Ref": "MasterUserType" }, "EnableBackupLog": { "Ref": "EnableBackupLog" }, "SQLCollectorStatus": { "Ref": "SQLCollectorStatus" }, "BackupRetentionPeriod": { "Ref": "BackupRetentionPeriod" } } } }, "Outputs": { "InnerConnectionString": { "Description": "DB instance connection url by Intranet.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "InnerConnectionString" ] } }, "DBInstanceId": { "Description": "The instance id of created database instance.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "DBInstanceId" ] } }, "InnerIPAddress": { "Description": "IP Address for created DB instance of Intranet.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "InnerIPAddress" ] } }, "PublicConnectionString": { "Description": "DB instance connection url by Internet.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "PublicConnectionString" ] } }, "PublicIPAddress": { "Description": "IP Address for created DB instance of Internet.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "PublicIPAddress" ] } }, "OrderId": { "Description": "The order id list of created instance.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "OrderId" ] } }, "PublicPort": { "Description": "Internet port of created DB instance.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "PublicPort" ] } }, "InnerPort": { "Description": "Intranet port of created DB instance.", "Value": { "Fn::GetAtt": [ "PrepayDBInstance", "InnerPort" ] } } } }