For RDS products, Alibaba Cloud CLI supports exporting DB instances to files, which is an extended function of the tool. You can choose an instance ID to export the corresponding instance to a file. The exported file content is in the json format, which is convenient for you to view or use in programming. The exported file is also an import file template. You can personalize modifications according to the file, and then import the file to create multiple DB instances.
aliyuncli rds ExportDBInstance --DBInstanceId XXXXX --filename test
DBInstanceId: This is a required parameter, indicating the ID of the instance to be exported.
filename: This is a required parameter, indicating the file to which of the instances is to be exported. It can be an absolute path or a single filename. If it is a single filename, the default path
For RDS products, Alibaba Cloud CLI supports instance creation by file import to easily create multiple identical DB instances. You can create multiple identical instances by specifying a template file and calling a command.
aliyuncli rds ImportDBInstance --filename test --count 5
filename: Template file, which can be a filename or an absolute path. If it is a single filename, the system searches the file under the
count: Indicates the number of DB instances to be created. This value of this parameter is a number. If this number exceeds the maximal value of instances that can be created at one time, a DB instance is created by default. We strongly recommend that you use the file exported with the
alicloudcli rds ExportDBInstancecommand as a template to edit. Do not create separate templates to avoid mistakes.
Note: For more information on the numbers of instances that can be created at one time, see the relevant documents of each product.
Currently DB instances created through RDS open APIs can only be charged on the Pay-As-You-Go basis.