ALIYUN::RDS::DBInstanceClone is used to restore historical data of an instance to a new instance. The new instance is the clone of the instance.
Syntax
{
"Type": "ALIYUN::RDS::DBInstanceClone",
"Properties": {
"PeriodType": String,
"Category": String,
"PrivateIpAddress": String,
"DedicatedHostGroupId": String,
"BackupId": String,
"RestoreTime": String,
"InstanceNetworkType": String,
"DbNames": String,
"Port": Integer",
"ConnectionStringPrefix": String,
"ConnectionStringType": String,
"TimeoutInMinutes": Integer,
"PreferredBackupPeriod": List,
"DBInstanceId": String,
"SecurityIPList": String,
"DBInstanceStorage": Integer,
"BackupType": String,
"DBMappings": List,
"MaintainTime": String,
"Tags": Map,
"DBInstanceDescription": String,
"ZoneId": String,
"SlaveZoneIds": List,
"DBInstanceClass": String,
"AllocatePublicConnection": Boolean,
"SecurityGroupId": String,
"PreferredBackupTime": String,
"VSwitchId": String,
"Period": Integer,
"PayType": String,
"DBInstanceStorageType": String,
"RestoreTable": String,
"MasterUserPassword": String,
"MasterUserType": String,
"VpcId": String,
"SSLSetting": String,
"MasterUsername": String,
"SQLCollectorStatus": String,
"BackupRetentionPeriod": Number,
"TableMeta": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
PeriodType | String | No | No | The unit of the subscription period. | Valid values:
This property is required if you set the PayType property to Prepaid. |
Category | String | No | Yes | The edition of the instance. | Valid values:
|
PrivateIpAddress | String | No | No | The private IP address of the new instance. | The private IP address must be within the CIDR block that is supported by the specified vSwitch. The system allocates the private IP address based on the values of the VpcId and |
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 type of the endpoint. | Valid values:
|
TimeoutInMinutes | Integer | No | No | The timeout period of instance cloning. | Valid values:
Unit: minutes |
Port | Integer | No | Yes | The port of the new instance. | Valid values: 1 to 65535 |
DedicatedHostGroupId | String | No | No | The ID of the host group. | None |
BackupId | String | No | No | The ID of the backup set. | You must specify at least one of the BackupId and RestoreTime properties. |
RestoreTime | String | No | No | The point in time to which you want to restore data. The point in time must fall within the specified backup retention period. | Specify the time in the ISO 8601 standard in the You must specify at least one of the BackupId and RestoreTime properties. |
InstanceNetworkType | String | No | No | The network type of the new instance. | Valid values:
Note By default, the network type of the new instance must be the same as the network type of the source instance. |
DbNames | String | No | No | The name of the database. | None |
PreferredBackupPeriod | List | No | No | The day on which data is backed up. | Valid values:
|
DBInstanceId | String | Yes | No | The ID of the new instance. | None |
SecurityIPList | String | No | Yes | The IP address whitelist. The IP addresses that are included in the whitelist can access all databases on the instance. | Separate multiple IP addresses with commas (,). Each IP address in the whitelist must be unique. You can add up to 1,000 IP addresses to each whitelist. The following types of IP addresses are supported:
|
DBInstanceStorage | Integer | No | Yes | The storage capacity of the new instance. Unit: GB. | The value must be in increments of 5 GB. For more information, see Primary ApsaraDB RDS instance types. Note The default value of this property is the storage capacity of the primary instance. |
BackupType | String | No | No | The backup type. | Valid values:
|
DBMappings | List | No | No | The databases on the new instance. | For more information, see DBMappings properties. |
MaintainTime | String | No | No | The maintenance window of the new instance. |
|
Tags | Map | No | Yes | The tags of the new instance. | None |
DBInstanceDescription | String | No | No | The description of the new instance. | The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with http:// or https://. The description can contain letters, digits, underscores (_), and hyphens (-). |
ZoneId | String | No | No | The zone ID of the new instance. | By default, the zone ID of the new instance is the same as the zone ID of the source instance. |
SlaveZoneIds | List | No | No | The secondary zone IDs if the instance 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 in each primary or secondary zone. For example, if the ZoneId property is set to If you want the system to select a secondary zone, set this property to |
DBInstanceClass | String | No | Yes | The instance type of the new instance. | For more information, see Primary ApsaraDB RDS instance types. Note By default, the instance type of the new instance is the same as the instance type of the source instance. |
AllocatePublicConnection | Boolean | No | No | Specifies whether to apply for a public endpoint for the new instance. | Valid values:
|
SecurityGroupId | String | No | Yes | The ID of the security group with which you want to associate the new instance. | Each ApsaraDB RDS instance can be associated with up to three security groups. Separate multiple security groups with commas (,). To delete all security groups, set this parameter to an empty string. |
PreferredBackupTime | String | No | No | The backup window. | Specify the time in the 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. |
| String | No | No | The ID of the vSwitch to which you want to connect the instance. | None |
Period | Integer | No | No | The subscription duration of the instance. | Valid values:
|
PayType | String | Yes | No | The billing method of the new instance. | Valid values:
|
DBInstanceStorageType | String | No | Yes | The storage type of the new instance. | Valid values:
|
RestoreTable | String | No | No | Specifies whether to restore databases and tables. | If you set this property to 1, databases and tables are restored. Otherwise, databases and tables are not restored. |
MasterUserPassword | String | No | Yes | The password of the database administrator account. | The password must be 8 to 32 characters in length and can contain letters, digits, and underscores (_). |
MasterUserType | String | No | No | The type of the database administrator account. | Valid values:
|
VpcId | String | No | No | The ID of the VPC. | None |
SSLSetting | String | No | No | The secure sockets layer (SSL) connection settings for the new instance. | Valid values:
|
MasterUsername | String | No | Yes | The username of the database administrator account. | The username must be unique. The username must be 1 to 16 characters in length and can contain letters, digits, and underscores (_). The username must start with a letter. |
SQLCollectorStatus | String | No | Yes | Specifies whether to enable SQL Explorer and Audit. | Valid values:
|
BackupRetentionPeriod | Number | No | No | The number of days for which the backup is retained. | Valid values: 7 to 30 Unit: day Default value: 7 |
TableMeta | List | No | No | The information about the database and table that you want to restore. | For more information, see TableMeta properties. |
DBMappings syntax
"DBMappings": [
{
"CharacterSetName": String,
"DBDescription": String,
"DBName": String
}
]
DBMappings properties
Property | Type | Required | Editable | Description | Constraint |
CharacterSetName | String | Yes | No | The character set that is used by the new instance. | Valid values:
|
DBName | String | Yes | No | The name of the database. | The name must be unique. The name must be 1 to 64 characters in length and can contain letters, digits, and underscores (_). The name must start with a letter. |
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 but cannot start with http:// or https://. The description can contain letters, digits, underscores (_), and hyphens (-). |
TableMeta syntax
"TableMeta": [
{
"Type": String,
"Name": String,
"NewName": String,
"Tables": List
}
]
TableMeta properties
Property | Type | Required | Editable | Description | Constraint |
Type | String | No | No | The type of the table metadata. | Set the value to db. |
Name | String | No | No | The name of the database. | None |
NewName | String | No | No | The new name of the database. | None |
Tables | List | No | No | The tables that you want to restore. | For more information, see Tables properties. |
Tables syntax
"Tables": [
{
"Type": String,
"Name": String,
"NewName": String
}
]
Tables properties
Property | Type | Required | Editable | Description | Constraint |
Type | String | No | No | The type of the table. | Set the value to table. |
Name | String | No | No | The name of the table in the database. | None |
NewName | String | No | No | The new name of the table. | None |
Return values
Fn::GetAtt
InnerConnectionString: the internal endpoint of the new instance.
DBInstanceId: the ID of the new instance.
InnerIPAddress: the private IP address of the new instance.
PublicConnectionString: the public endpoint of the new instance.
PublicIPAddress: the public IP address of the new instance.
PublicPort: the public port of the new instance.
InnerPort: the internal port of the new instance.