Imports a database into a Bastionhost instance for centralized O&M management. Supported databases include ApsaraDB RDS, PolarDB, and self-managed MySQL, SQL Server, PostgreSQL, and Oracle databases.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:CreateDatabase |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the Bastionhost instance. Note
Call the DescribeInstances operation to obtain this parameter. |
bastionhost-cn-7mz2g5hu20e |
| RegionId |
string |
No |
The region ID of the Bastionhost instance. Note
For a list of region IDs and their corresponding region names, see Regions and zones. |
cn-shanghai |
| NetworkDomainId |
string |
No |
The ID of the network domain for the new database. Note
Call the ListNetworkDomains operation to obtain this parameter. |
1 |
| DatabaseType |
string |
Yes |
The type of the database. Valid values:
|
MySQL |
| ActiveAddressType |
string |
Yes |
The address type of the new database. Valid values:
|
Public |
| DatabasePrivateAddress |
string |
No |
The private endpoint of the database. You can use an IPv4 address or a domain name. Note
This parameter is required if you set ActiveAddressType to Private. |
192.168.XX.XX |
| DatabasePublicAddress |
string |
No |
The public endpoint of the database. You can use an IPv4 address or a domain name. Note
This parameter is required if you set ActiveAddressType to Public. |
www.example.com |
| DatabasePort |
integer |
No |
The port used to connect to the database. This parameter is required if you set Source to Local. |
5433 |
| DatabaseName |
string |
No |
The name of the new database instance. This parameter is required if you set Source to Local. |
Test01 |
| SourceInstanceId |
string |
No |
The ID of the database instance. Note
This parameter is required if you set Source to Rds or PolarDB. |
i-bp19ienyt0yax748**** |
| Source |
string |
Yes |
The source of the new database. Valid values:
|
Local |
| Comment |
string |
No |
The comments on the new database. The comments can be up to 500 characters in length. |
cpp |
| SourceInstanceRegionId |
string |
No |
The region ID of the database instance. Note
This parameter is required if Source is set to Rds or PolarDB. |
cn-shanghai |
| PolarDBEndpointType |
string |
No |
This parameter is required if you set Source to PolarDB. This parameter specifies the endpoint type of the PolarDB database. Valid values:
|
Cluster |
| InstanceMemberId |
integer |
No |
The ID of the Alibaba Cloud account to which the new RDS or PolarDB database instance belongs. |
1605494xxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DatabaseId |
string |
The ID of the database instance. |
334 |
| RequestId |
string |
The ID of the request. |
98EDD923-236C-5A88-88E7-4979A91B9325 |
Examples
Success response
JSON format
{
"DatabaseId": "334",
"RequestId": "98EDD923-236C-5A88-88E7-4979A91B9325"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
| 400 | LicenseOutOfLimit | The maximum number of hosts exceeds the license limit. | The maximum number of hosts exceeds the license limit. |
| 400 | DatabaseAlreadyExists | The database already exists. | The database already exists. |
| 500 | InternalError | An unknown error occurred. | An unknown error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.