You can call this operation to enable the data security protection proxy of a database instance.

  • The database types of the instance are MySQL and MariaDB, including ApsaraDB for RDS MySQL, PolarDB MySQL engine, PolarDB-X, and AnalyticDB MySQL. It also supports user-created MySQL and MariaDB libraries, and third-party cloud MySQL and MariaDB libraries.
  • The database instance is located in China (Hangzhou) and China (Beijing).
  • Your user role is the administrator role, DBA role, or target instance owner.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 1

The ID of the instance. You can call the GetInstance or ListInstances operation to obtain this parameter.

Username String Yes xxx

The database account.

Password String Yes xxx

The password that is used to log on to the database.

Tid Long No 1

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain this parameter.

RegionId String No cn-hangzhou

Select the service region of DMS. This operation is used to call this operation. For more information, see RegionID parameter description.

Note Set this parameter to the ID of the region that is in proximity to your applications.

Response parameters

Parameter Type Sample response Description
RequestId String 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

ErrorMessage String UnknownError

The error message that is returned.

ErrorCode String 200

The error code returned to the query task.

ProxyId Long 1

The ID of the security protection agent.


Sample requests

&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "3CC995A1-6B0E-54A6-81E4-9F51066C0019",
  "ProxyId" : 1,
  "Success" : true

Error codes

For a list of error codes, visit the API Error Center.