Creates an ApsaraDB RDS external store.
Usage notes
Host consists of a project name and a Simple Log Service endpoint. You must specify a project in Host.
Debugging
Request headers
This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request parameters.
Request syntax
POST /externalstores HTTP/1.1
Request parameters
Parameter |
Type |
Position |
Required |
Example |
Description |
project | String | Host | Yes | A short description of struct |
|
Object | Body | Yes | The request struct. |
||
externalStoreName | String | Body | Yes | rds_store | The name of the external store. The name must be unique in a project and must be different from Logstore names. |
storeType | String | Body | Yes | rds-vpc | The storage type. Set the value to rds-vpc, which indicates an ApsaraDB RDS for MySQL database in a virtual private cloud (VPC). |
parameter | Object | Body | Yes | The parameter struct. |
|
vpc-id | String | Body | No | vpc-bp1aevy8sofi8mh1q**** | The ID of the VPC to which the ApsaraDB RDS for MySQL instance belongs. |
instance-id | String | Body | No | i-bp1b6c719dfa08exf**** | The ID of the ApsaraDB RDS for MySQL instance. |
host | String | Body | No | 192.168.XX.XX | The internal or public endpoint of the ApsaraDB RDS for MySQL instance. |
port | String | Body | Yes | 3306 | The internal or public port of the ApsaraDB RDS for MySQL instance. |
username | String | Body | Yes | root | The username that is used to log on to the ApsaraDB RDS for MySQL instance. |
password | String | Body | Yes | sfdsfldsfksfls**** | The password that is used to log on to the ApsaraDB RDS for MySQL instance. |
db | String | Body | Yes | meta | The name of the database in the ApsaraDB RDS for MySQL instance. |
table | String | Body | Yes | join_meta | The name of the database table in the ApsaraDB RDS for MySQL instance. |
region | String | Body | Yes | cn-qingdao | The region where the ApsaraDB RDS for MySQL instance resides. Valid values: cn-qingdao, cn-beijing, and cn-hangzhou. |
Response parameters
Parameter |
Type |
Example |
Description |
Server | String | nginx | The name of the server. |
Content-Type | String | application/json | The format of the response body. |
Content-Length | String | 0 | The length of the response body. |
Connection | String | close | Indicates whether the connection is persistent. Valid values:
|
Date | String | Sun, 27 May 2018 08:25:04 GMT | The time when the response was returned. |
x-log-requestid | String | 5B0A6B60BB6EE39764D458B5 | The request ID. |
Examples
Sample requests
Sample success responses
JSON
format
HTTP/1.1 200 OK
Error codes
For a list of error codes, see Service error codes.