Creating a DB Instance (API v5)
Function
This API is derived from the API for creating a DB instance (v3). The subscription_agency field is added to the request body of this API. This field is used when a RAM-based shared key is used to create a yearly/monthly RDS DB instance. This API is used to create a single-node RDS DB instance, primary/standby DB instance, or read replica.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
This API supports only AK/SK authentication. This API allows you to set the X-Client-Token request header in the HTTP request header to ensure the request idempotence. For details, see Idempotent Requests.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:create |
readwrite |
- |
- |
- |
- |
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
Constraints
The value cannot be empty.
Range
To obtain the value, see Obtaining a Project ID.
Default Value
N/A
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Definition Specifies the DB instance name. Instances of the same type can have the same name under the same tenant. Constraints N/A Range
Default Value N/A |
|
datastore |
No |
Object |
Definition Specifies the database information. For details, see Table 4. Constraints This parameter is optional when you create RDS for MySQL read replicas. |
|
ha |
No |
Object |
Definition Specifies the HA configuration parameter. For details, see Table 5. Constraints This parameter is used when you create primary/standby instances. |
|
configuration_id |
No |
String |
Definition Specifies the parameter template ID. Constraints N/A Range For details, see id in Table 3 in section Obtaining a Parameter Template List. Default Value N/A |
|
port |
No |
String |
Definition Specifies the database port information. Constraints N/A Range
Default Value If this parameter is not set, the default value is as follows:
|
|
password |
No |
String |
Definition Specifies the database password. Constraints N/A Range A database password must be 8 to 32 characters long and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Different DB engines support different special characters.
You are advised to enter a strong password to improve security, preventing security risks such as brute force cracking. If the password you provide is regarded as a weak password by the system, you will be prompted to enter a stronger password. Default Value N/A |
|
backup_strategy |
No |
Object |
Definition Specifies the advanced backup policy. For details, see Table 6. Constraints N/A |
|
enterprise_project_id |
No |
String |
Definition Specifies the enterprise project ID. Constraints N/A Range For details, see id in the enterprise_project field data structure table in Querying Enterprise Projects of the Enterprise Management API Reference. Default Value N/A |
|
disk_encryption_id |
No |
String |
Definition Specifies the ID of the key used for disk encryption. Constraints N/A Range N/A Default Value This parameter is left blank by default. |
|
subscription_agency |
No |
String |
Definition Specifies the URN of the agency authorized to billing services. Constraints This parameter is required when you use a RAM-based shared key to create an RDS yearly/monthly instance. Range For details about how to obtain the agency URN, see Obtaining an Agency URN. Default Value The value is left blank by default. |
|
flavor_ref |
Yes |
String |
Definition Specifies the specification code. Constraints N/A Range The value cannot be empty. For details, see spec_code in Table 3 in section Querying Database Specifications. Default Value N/A |
|
volume |
Yes |
Object |
Definition Specifies the volume information. For details, see Table 7. Constraints N/A |
|
region |
Yes |
String |
Definition Specifies the region ID. Constraints N/A Range The value cannot be empty. To obtain this value, see Regions and Endpoints. Default Value N/A |
|
availability_zone |
Yes |
String |
Definition Specifies the AZ ID. If the DB instance is not a single-node instance, you need to specify an AZ for each node of the instance and separate the AZs with commas (,). For details, see the example. The AZ ID can be obtained from the response returned after the API in Querying Database Specifications is called. Constraints N/A Range Default Value N/A |
|
vpc_id |
No |
String |
Definition Specifies the VPC ID. Constraints This parameter is optional when you create RDS for MySQL read replicas. Range
Default Value N/A |
|
subnet_id |
No |
String |
Definition Specifies the subnet ID. Constraints This parameter is optional when you create RDS for MySQL read replicas. Range
Default Value N/A |
|
data_vip |
No |
String |
Definition Specifies the floating IP address of a DB instance. Currently, only IPv4 addresses are supported. Constraints N/A Range
Default Value This parameter is left blank by default. |
|
security_group_id |
No |
String |
Definition Specifies the security group to which the instance belongs. Constraints This parameter is optional when you create RDS for MySQL read replicas. Range
Default Value N/A |
|
charge_info |
No |
Object |
Definition Specifies the billing information, which is yearly/monthly or pay-per-use (default setting). For details, see Table 8. Constraints N/A |
|
time_zone |
No |
String |
Definition Specifies the UTC time zone. Constraints N/A Range If this parameter is specified for MySQL or PostgreSQL, the value range is from UTC-12:00 to UTC+12:00 on the hour. For example, the value can be UTC+08:00 rather than UTC+08:30. Default Value
If this parameter is not specified, the time zone of each engine is as follows:
|
|
dsspool_id |
No |
String |
Definition Specifies the DSS pool ID of DeC users. The DSS pool configured for each AZ is different. When DeC users create DB instances other than single-node instances or read replicas, DSS pool IDs must be specified for all nodes of the DB instances and must be separated by commas (,). Constraints N/A Range To obtain the value, use either of the following methods:
Default Value N/A |
|
replica_of_id |
No |
String |
Definition Specifies the ID of the primary DB instance. Constraints This parameter is mandatory when you create read replicas and is unavailable in other scenarios. Range N/A Default Value N/A |
|
restore_point |
No |
Object |
Definition Specifies the restoration information. For details, see Table 10. Constraints This parameter is mandatory when data is restored to a new instance. |
|
tags |
No |
Array of objects |
Definition Specifies the tag list. Each DB instance can be associated with tag key-value pairs while being created.
If you want to create DB instances with multiple tag keys and values, separate them with commas (,). A maximum of 10 key-value pairs can be added for a DB instance. For details, see Table 9. Constraints N/A |
|
unchangeable_param |
No |
Object |
Definition Specifies the list of unchangeable parameters. For details, see Table 12. Constraints The unchangeable parameters need to be specified before database initialization and cannot be modified after being specified. |
|
collation |
No |
String |
Definition Specifies the collation of an RDS for SQL Server instance. Constraints This parameter applies only to RDS for SQL Server DB instances. Range For details, see Querying the Available SQL Server Character Set. Default Value N/A |
|
dry_run |
No |
Boolean |
Definition Specifies whether DB instances will not be created after the request is checked. Constraints This parameter is supported with the MySQL DB engine only. Range
Default Value N/A |
|
count |
No |
Integer |
Definition Specifies the number of DB instances to be created in a batch. Constraints This parameter is available only when you create an RDS for MySQL or RDS for SQL Server primary instance. This parameter is unavailable when you create read replicas. Range 1–50 Default Value N/A |
|
serverless_info |
No |
Object |
Definition Specifies the resource scaling scope of a serverless instance. For details, see Table 11. Constraints This parameter is mandatory when you create a serverless instance. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Definition Specifies the DB instance name. DB instances of the same type can have same names under the same tenant. Constraints N/A Range
Default Value N/A |
|
enterprise_project_id |
No |
String |
Definition Specifies the project ID. Constraints N/A Range N/A Default Value N/A |
|
disk_encryption_id |
No |
String |
Definition Specifies the ID of the key used for disk encryption. Constraints N/A Range N/A Default Value This parameter is left blank by default. |
|
subscription_agency |
No |
String |
Definition Specifies the URN of the agency authorized to billing services. Constraints This parameter is required when you use a RAM-based shared key to create an RDS yearly/monthly instance. Range For details about how to obtain the agency URN, see Obtaining an Agency URN. Default Value N/A |
|
replica_of_id |
No |
String |
Definition Specifies the ID of the primary DB instance. Constraints This parameter is mandatory when you create read replicas and is unavailable in other scenarios. Range N/A Default Value N/A |
|
flavor_ref |
Yes |
String |
Definition Specifies the specification code. Constraints N/A Range The value cannot be empty. For details, see spec_code in Table 3 in section Querying Database Specifications. Default Value N/A |
|
volume |
Yes |
Object |
Definition Specifies the volume information. For details, see Table 7. Constraints N/A |
|
region |
No |
String |
Definition Specifies the region ID. Constraints Currently, read replicas can be created only in the same region as that of the primary DB instance. Range The value cannot be empty. To obtain this value, see Regions and Endpoints. Default Value N/A |
|
availability_zone |
Yes |
String |
Definition Specifies the AZ ID. Constraints N/A Range The AZ ID can be obtained from the response returned after the API in Querying Database Specifications is called. Default Value N/A |
|
charge_info |
No |
Object |
Definition Specifies the billing information, which is yearly/monthly or pay-per-use (default setting). For details, see Table 8. Constraints To create RDS for MySQL or RDS for PostgreSQL read replicas billed on a yearly/monthly basis, contact customer service to apply for the required permissions. RDS for SQL Server does not support yearly/monthly read replicas. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Definition Specifies the DB engine. Constraints N/A Range
Default Value N/A |
|
version |
Yes |
String |
Definition Specifies the database version. Constraints N/A Range
For details about supported database versions, see section Querying Version Information About a DB Engine. Default Value N/A |
|
complete_version |
No |
String |
Definition Specifies the complete version number. Constraints This parameter is returned only when the DB engine is PostgreSQL. Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
mode |
Yes |
String |
Definition Specifies the primary/standby instance type. Constraints N/A Range HA (case-insensitive) Default Value N/A |
|
replication_mode |
Yes |
String |
Definition Specifies the replication mode for the standby DB instance. Constraints N/A Range
NOTE:
Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
start_time |
Yes |
String |
Definition Specifies the backup time window. Automated backups will be triggered during the backup time window. Constraints N/A Range The value cannot be left blank. It must be a valid value in the hh:mm-HH:MM format. The current time is the UTC time.
Example value:
Default Value N/A |
|
keep_days |
No |
Integer |
Definition Specifies the retention days for specific backup files. Constraints The automated backup policy cannot be disabled for primary/standby DB instances of RDS for MySQL or RDS for SQL Server. Range 0–732 If this parameter is not specified or set to 0, the automated backup policy is disabled. To extend the retention period, contact customer service. Automated backups can be retained for up to 10 years. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Definition Specifies the storage type. Constraints N/A Range Its value can be any of the following and is case-sensitive:
Default Value N/A |
|
size |
No |
Integer |
Definition Specifies the volume size. Constraints For read replicas, this parameter is invalid. The volume size is the same as that of the primary DB instance by default. Range 40–4000, in GB. The value must be a multiple of 10. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
charge_mode |
Yes |
String |
Definition Specifies the billing mode. Constraints N/A Range
Default Value N/A |
|
period_type |
No |
String |
Definition Specifies the subscription type. Constraints This parameter is valid and mandatory if charge_mode is set to prePaid. Range
Default Value N/A |
|
period_num |
No |
Integer |
Definition Specifies the subscription period. Constraints This parameter is valid and mandatory if charge_mode is set to prePaid. Range
Default Value N/A |
|
is_auto_renew |
No |
boolean |
Definition Specifies whether automatic renewal is enabled for yearly/monthly DB instances. The renewal period is the same as the original period and the order will be automatically paid. Constraints N/A Range
Default Value false |
|
is_auto_pay |
No |
boolean |
Definition Specifies whether the order will be automatically paid after yearly/monthly DB instances are created. This parameter does not affect the payment mode of automatic renewal. Constraints N/A Range
Default Value false |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
Yes |
String |
Definition Specifies the tag key. Constraints N/A Range The value must consist of 1 to 128 Unicode characters. It can contain letters, digits, spaces, and special characters _.:=+-@(). However, it cannot start or end with a space, or start with _sys_. Default Value N/A |
|
value |
Yes |
String |
Definition Specifies the tag value. Constraints N/A Range It can be left blank or contain a maximum of 255 Unicode characters. It can contain letters, digits, spaces, and special characters _.:=+-@(). Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
min_cap |
Yes |
String |
Definition Minimum compute power of a serverless instance, in RCU.
NOTE:
RCU: RDS Capacity Unit. It is the billing unit for serverless instances. Constraints The value of max_cap must be greater than that of min_cap. Range The value ranges from 0.5 to 8 and the step is 0.5. Default Value N/A |
|
max_cap |
Yes |
String |
Definition Maximum compute power of a serverless instance, in RCU. Constraints The value of max_cap must be greater than that of min_cap. Range The value ranges from 0.5 to 8 and the step is 0.5. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
lower_case_table_names |
No |
String |
Definition Whether table names are case sensitive. Constraints When data is restored to an existing DB instance, the case sensitivity setting of the existing DB instance must be the same as that of the original DB instance. Otherwise, the restoration may fail. Range
Default Value 1 |
The values of region and availability_zone in the example request are only for reference.
- URI example
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances
- Example request
Create an RDS for MySQL single-node instance billed on a yearly/monthly basis using a RAM-based shared key.
{ "name": "rds-instance-rep2", "datastore": { "type": "MySQL", "version": "5.7" }, "flavor_ref": "rds.mysql.s1.large", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "subscription_agency": "xxx::xxxxx:xx:xxxx", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "data_vip": "192.168.0.147", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": 8635, "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 12 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "Test@12345678", "configuration_id": "452408-ef4b-44c5-94be-305145fg", "enterprise_project_id": "fdsa-3rds", "time_zone": "UTC+04:00", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ], "dry_run": false, "count": 12 }Create an RDS for PostgreSQL single-node instance billed on a yearly/monthly basis using a RAM-based shared key.
{ "name": "rds-instance-rep2", "datastore": { "type": "PostgreSQL", "version": "10" }, "flavor_ref": "rds.pg.s1.large", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "subscription_agency": "xxx::xxxxx:xx:xxxx", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "data_vip": "192.168.0.147", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": 8635, "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 12 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "Test@12345678", "configuration_id": "452408-ef4b-44c5-94be-305145fg", "enterprise_project_id": "fdsa-3rds", "time_zone": "UTC+04:00", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ] }Create an RDS for SQL Server single-node instance billed on a yearly/monthly basis using a RAM-based shared key.
{ "name": "rds-instance-rep2", "datastore": { "type": "SQLServer", "version": "2014_SE" }, "flavor_ref": "rds.mssql.se.m3.large.8", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "subscription_agency": "xxx::xxxxx:xx:xxxx", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "data_vip": "192.168.0.147", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": 8635, "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 12 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "collation": "Cyrillic_General_CI_AS", "password": "Test@12345678", "configuration_id": "452408-ef4b-44c5-94be-305145fg", "enterprise_project_id": "fdsa-3rds", "time_zone": "UTC+04:00", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ] }Create an RDS for MySQL primary/standby instance billed on a yearly/monthly basis using a RAM-based shared key.
{ "name": "rds-instance-rep2", "datastore": { "type": "MySQL", "version": "5.7" }, "ha": { "mode": "ha", "replication_mode": "semisync" }, "flavor_ref": "rds.mysql.s1.large.ha", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "subscription_agency": "xxx::xxxxx:xx:xxxx", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a,ap-southeast-1b", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "data_vip": "192.168.0.147", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": 8635, "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 12 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "Test@12345678", "configuration_id": "452408-ef4b-44c5-94be-305145fg", "enterprise_project_id": "fdsa-3rds", "time_zone": "UTC+04:00", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ], "dry_run": false, "count": 12 }Create an RDS for MySQL read replica billed on a yearly/monthly basis using a RAM-based shared key.
{ "name": "rds-instance-rep2", "replica_of_id": "afdsad-fds-fdsagin01", "flavor_ref": "rds.mysql.s1.large.rr", "volume": { "type": "ULTRAHIGH" }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "subscription_agency": "xxx::xxxxx:xx:xxxx", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "enterprise_project_id": "fdsa-3rds", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ] }
Response
- Normal response
Table 13 Parameters Parameter
Type
Description
instance
Object
Definition
Instance information.
For details, see Table 14.
job_id
String
Definition
ID of the instance creation task.
For details about how to query task details, see Obtaining Information About a Task with a Specified ID.
This parameter is returned only for the creation of pay-per-use instances.
Range
N/A
order_id
String
Definition
Order ID. This parameter is returned only for the creation of yearly/monthly instances.
Range
N/A
Table 14 instance description Parameter
Type
Description
id
String
Definition
Instance ID. If instances are created in batches, multiple instance IDs separated by commas (,) are returned for the MySQL DB engine. For other DB engines, this parameter is left blank.
Range
N/A
name
String
Definition
Instance name. Instances of the same type can have the same name under the same tenant.
Range
N/A
status
String
Definition
Instance status.
Range
For example, BUILD indicates that the DB instance is being created.
This parameter is returned only for the creation of pay-per-use instances.
datastore
Object
Definition
Database information.
For details, see Table 15.
ha
Object
Definition
HA configurations. This parameter is returned only when primary/standby instances are created.
For details, see Table 16.
configuration_id
String
Definition
Parameter template ID. This parameter is returned only when a custom parameter template is used during instance creation.
Range
N/A
port
String
Definition
Database port information.
Range
Same as the request parameter.
backup_strategy
Object
Definition
Automated backup policy.
For details, see Table 17.
enterprise_project_id
String
Definition
Project ID.
Range
N/A
disk_encryption_id
String
Definition
ID of the key used for disk encryption.
Range
This parameter is available only when you specify this parameter during instance creation. By default, this parameter is left blank.
flavor_ref
String
Definition
Specification code.
Range
The value cannot be empty. For details, see spec_code in Table 3 in section Querying Database Specifications.
volume
Object
Definition
Volume information.
For details, see Table 18.
region
String
Definition
Region ID.
Range
N/A
availability_zone
String
Definition
AZ ID.
Range
N/A
vpc_id
String
Definition
VPC ID.
Range
N/A
subnet_id
String
Definition
Subnet ID.
Range
N/A
security_group_id
String
Definition
Security group which the DB instance is associated with. To obtain this parameter value, use either of the following methods:
Range
N/A
charge_info
Object
Definition
Billing information, which is yearly/monthly or pay-per-use.
For details, see Table 19.
collation
String
Definition
Collation for the RDS for SQL Server instance.
Range
N/A
restore_point
Object
Definition
Restoration information. This parameter is mandatory when data is restored to a new instance.
For details, see Table 20.
Table 15 Data structure description of field datastore Parameter
Type
Description
type
String
Definition
DB engine.
Range
- MySQL
- PostgreSQL
- SQLServer
version
String
Definition
Database version.
Range
You can obtain the supported database versions by calling the API for Querying Version Information About a DB Engine.
complete_version
String
Complete database version number.
Table 16 Data structure description of field ha Parameter
Type
Description
mode
String
Definition
Primary/standby instance type.
Range
Ha
replication_mode
String
Definition
Replication mode for the standby instance. This parameter is valid only when the instance is an HA instance.
Range
- For RDS for MySQL, the value is async or semisync.
- For RDS for PostgreSQL, the value is async or sync.
- For RDS for SQL Server, the value is sync.
NOTE:- async indicates asynchronous replication.
- semisync indicates semi-synchronous replication.
- sync indicates synchronous replication.
Table 17 Data structure description of field backupStrategy Parameter
Type
Description
start_time
String
Definition
Backup time window. Automated backups will be triggered during the backup time window.
Range
The value cannot be left blank. It must be a valid value in the hh:mm-HH:MM format. The current time is the UTC time.
- The HH value must be 1 greater than the hh value.
- The values of mm and MM must be the same and must be set to any of the following: 00, 15, 30, or 45.
Example value:
- 08:15-09:15
- 23:00-00:00
If backup_strategy in the request body is empty, 02:00-03:00 is returned for start_time by default.
keep_days
Integer
Definition
Backup retention days.
Range
0–732. If this parameter is not specified or set to 0, the automated backup policy is disabled. To extend the retention period, contact customer service. Automated backups can be retained for up to 10 years.
If backup_strategy in the request body is empty, 7 is returned for keep_days by default.
Table 18 Data structure description of field volume Parameter
Type
Description
type
String
Definition
Disk type.
Range
The value is case-sensitive.
- ULTRAHIGH: ultra-high I/O storage.
- CLOUDSSD: cloud SSD storage. This storage type is supported only with general-purpose and dedicated instances.
- ESSD: extreme SSD storage.
size
Integer
Definition
Disk size.
Range
40–4000, in GB. The value must be a multiple of 10.
Table 19 Data structure description of field chargeInfo Parameter
Type
Description
charge_mode
String
Definition
Billing mode, which is yearly/monthly or pay-per-use.
Range
N/A
period_type
String
Definition
Subscription type.
Range
- month: The service is subscribed by month.
- year: The service is subscribed by year.
period_num
Integer
Definition
Subscription period, which is calculated by month.
This parameter is valid only when charge_mode is set to prePaid (yearly/monthly billing).
Range
N/A
is_auto_pay
Boolean
Definition
Whether the order will be automatically paid after yearly/monthly instances are created. This parameter does not affect the payment method of automatic renewal.
Range
- false: The order will be manually paid. The default value is false.
- true: The order will be automatically paid.
is_auto_renew
Boolean
Definition
Whether automatic renewal is enabled for yearly/monthly instances. The renewal period is the same as the original period, and the order will be automatically paid.
Range
- false: Automatic renewal is disabled. The default value is false.
- true: Automatic renewal is enabled.
Table 20 Data structure description of field restore_point Parameter
Type
Description
instance_id
String
Definition
Source instance ID.
Range
N/A
type
String
Definition
Restoration mode.
Range
- backup: Data is restored using backups.
- timestamp: Data is restored to a point in time.
backup_id
String
Definition
ID of the backup used to restore data.
Range
N/A
restore_time
Integer
Definition
Time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC.
Range
N/A
database_name
Map<String,String>
Definition
This parameter is supported only for RDS for SQL Server instances. If this parameter is specified, you can restore specific databases and rename new databases.
Range
N/A
The values of region and availability_zone in the example response are only for reference.
- Example normal response
RDS for MySQL single-node instance created.
{ "instance": { "id": "dsfae23fsfdsae3435in01", "name": "trove-instance-rep2", "datastore": { "type": "MySQL", "version": "5.7" }, "flavor_ref": "rds.mysql.s1.large", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": "8635", "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 3 }, "configuration_id": "452408-44c5-94be-305145fg", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, }, "job_id": "dff1d289-4d03-4942-8b9f-463ea07c000d" }RDS for SQL Server single-node instance created.
{ "instance": { "id": "dsfae23fsfdsae3435in01", "name": "trove-instance-rep2", "datastore": { "type": "sqlserver", "version": "2014_SE" }, "flavor_ref": "rds.mssql.2014.se.s3.large.2", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": "8635", "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 3 }, "configuration_id": "452408-44c5-94be-305145fg", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "collation": "Cyrillic_General_CI_AS" }, "job_id": "dff1d289-4d03-4942-8b9f-463ea07c000d" }RDS for MySQL primary/standby instance created.
{ "instance":{ "id": "dsfae23fsfdsae3435in01", "name": "trove-instance-rep2", "datastore": { "type": "MySQL", "version": "5.7" }, "ha": { "mode": "ha", "replication_mode": "semisync" }, "flavor_ref": "rds.mysql.s1.large.ha", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a,ap-southeast-1b", "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": "8635", "backup_strategy": { "start_time": "08:15-09:15", "keep_days": 3 }, "configuration_id": "452408-44c5-94be-305145fg", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, }, "job_id": "dff1d289-4d03-4942-8b9f-463ea07c000d" }RDS for MySQL read replica created.
{ "instance":{ "id": "dsfae23fsfdsae3435in01", "name": "trove-instance-rep2", "flavor_ref": "rds.mysql.s1.large.rr", "volume": { "type": "ULTRAHIGH", "size": 100 }, "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4", "region": "ap-southeast-1", "availability_zone": "ap-southeast-1a", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce", "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f", "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5", "port": "8635", "configuration_id": "452408-44c5-94be-305145fg" }, "job_id": "dff1d289-4d03-4942-8b9f-463ea07c000d" } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Obtaining an Agency URN
- Log in to the Identity and Access Management (IAM) console.
Figure 1 IAM page
- Click Agencies. On the displayed page, click Create Agency.
- On the Create Agency page, set the following parameters and click Next.
- Agency Name: For example, enter agency_billing.
- Agency Type: Select Cloud service.
- Cloud Service: Select Billing.
- Validity Period: Select Unlimited.
- Description: Enter a description about the agency.
Figure 2 Creating an agency
- Enter fulfillment in the search box to start a search, select ServicePolicyForRDSFulfillment, and click Next.
When using a RAM-based KMS shared key to create a yearly/monthly RDS instance, you must grant the Billing service the permission to operate resources in your account and the ServicePolicyForRDSFulfillment permission. After the authorization is successful, the Billing service obtains the KMS key to create encrypted disks.
Figure 3 Selecting a policy
- By default, the permissions apply to all resources. Click OK.
Figure 4 Selecting a scope
- Click the name of the created agency. On the Basic Information page, obtain the agency URN.
Figure 5 Obtaining a URN
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot