Enables the secure access proxy feature for a database instance.
- The database instance runs the MySQL or MariaDB database engine. For example, the database instance can be an ApsaraDB RDS for MySQL instance, a PolarDB for MySQL cluster, a Distributed Relational Database Service (DRDS) cluster, or an AnalyticDB for MySQL cluster. The database instance can also be a self-managed MySQL or MariaDB database, or a MySQL or MariaDB database in a third-party cloud.
- The database instance resides in the China (Hangzhou) or China (Beijing) region.
- You are a Data Management (DMS) administrator, a database administrator (DBA), or the owner of the database instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateProxy |
The operation that you want to perform. Set the value to CreateProxy. |
InstanceId | Long | Yes | 183**** |
The ID of the database instance. You can call the ListInstances or GetInstance operation to query the database instance ID. |
Username | String | Yes | username |
The username of the database account. |
Password | String | Yes | ****** |
The password of the database account. |
Tid | Long | No | 3*** |
The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID. |
RegionId | String | No | cn-hangzhou |
The region in which DMS is activated. For more information, see RegionID parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4FFD154E-F57F-5374-B568-D6276F15**** |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
ErrorMessage | String | The secure access proxy feature is enabled for the database instance. |
The error message returned. |
ErrorCode | String | InvalidParameterValid |
The error code returned. |
ProxyId | Long | 4** |
The ID of the secure access proxy. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=CreateProxy
&InstanceId=183****
&Username=username
&Password=******
&Tid=3***
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateProxyResponse>
<RequestId>4FFD154E-F57F-5374-B568-D6276F15****</RequestId>
<ProxyId>4**</ProxyId>
<Success>true</Success>
</CreateProxyResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4FFD154E-F57F-5374-B568-D6276F15****",
"ProxyId" : "4**",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.