Revokes a permission on a resource from a user.

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 RevokeUserPermission

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

Tid Long Yes 3***

The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID.

UserId String Yes 51****

The ID of the user. You can call the ListUsers or GetUser operation to query the user ID.

DsType String Yes DATABASE

The object type on which the permission you want to revoke from the user. Valid values:

  • INSTANCE: database instances
  • DATABASE: physical databases
  • LOGIC_DATABASE: logical databases
  • TABLE: physical tables
  • LOGIC_TABLE: logical tables
InstanceId Long No 174****

The ID of the database instance. You must specify this parameter when you revoke a permission from the database instance. You can call the ListInstances or GetInstance operation to query the database instance ID.

DbId String Yes 1860****

The ID of the database. The database can be a physical database or a logical database.

Logic Boolean No false

Specifies whether the database is a logical database. Valid values:

  • true: The database is a logical database.
  • false: The database is a physical database.
Note
  • If the database is a logical database, set this parameter to true.
  • If the database is a physical database, set this parameter to false.
TableId String No 13****

The ID of the table. You must specify this parameter when you revoke a permission from the table. You can call the ListTables operation to query the table ID.

TableName String No table_name

The name of the table. You can call the ListTables operation to query the table name.

PermTypes String Yes CORRECT

The type of the permission. Valid values:

  • QUERY: the data query permission
  • EXPORT: the data export permission
  • CORRECT: the data change permission
UserAccessId String Yes 774****

The ID of the permission. You can call the ListUserPermission operation to query the permission ID.

RegionId String No cn-hangzhou

The region in which DMS is activated. For more information, see RegionID parameter.

Note

Response parameters

Parameter Type Example Description
RequestId String A99CD576-1E18-4E86-931E-C3CCE56D****

The ID of the request.

ErrorCode String MissingUserId

The error code returned.

ErrorMessage String UserId is mandatory for this action.

The error message returned.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=RevokeUserPermission
&UserId=51****
&DsType=DATABASE
&DbId=1860****
&Logic=false
&TableId=13****
&TableName=table_name
&PermTypes=CORRECT
&UserAccessId=774****
&Common request parameters

Sample success responses

XML format

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

<RevokeUserPermissionResponse>
    <RequestId>A99CD576-1E18-4E86-931E-C3CCE56D****</RequestId>
    <Success>true</Success>
</RevokeUserPermissionResponse>

JSON format

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

{
  "RequestId" : "A99CD576-1E18-4E86-931E-C3CCE56D****",
  "Success" : true
}

Error codes

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