You can call the CreateProxyAccess to authorize users to access the DB instance through the Data Security Protection agent.

  • The data security protection feature is enabled for the instance.
  • Your user role is the administrator role, DBA role, or the owner of data security protection for the current instance.

Debugging

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 CreateProxyAccess

The operation that you want to perform. Set the value to CreateProxyAccess.

UserId Long Yes 1

The ID of the user. You can call the ListUsers or GetUser operation to obtain this parameter.

ProxyId Long Yes 1

The ID of the security protection agent. You can call the ListProxies or GetProxy operation to obtain this parameter.

IndepAccount String No xxx

The database account.

IndepPassword String No 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.

ProxyAccessId Long 1

The ID of the security protection authorization. After the security protection agent authorizes the target user, the system automatically generates a security protection authorization ID. The ID is globally unique.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateProxyAccess
&UserId=1
&ProxyId=1
&IndepAccount=xxx
&IndepPassword=xxx
&Tid=1
&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateProxyAccessResponse>
    <RequestId>22A0495C-566D-5A90-A51A-7E737AD5980A</RequestId>
    <ProxyAccessId>1</ProxyAccessId>
    <Success>true</Success>
</CreateProxyAccessResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "22A0495C-566D-5A90-A51A-7E737AD5980A",
  "ProxyAccessId" : 1,
  "Success" : true
}

Error codes

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