All Products
Search
Document Center

AnalyticDB for MySQL:ModifyAccountPrivileges

Last Updated:May 20, 2024

Modifies the permissions of a database account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the cluster.

cn-hangzhou
DBClusterIdstringYes

The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.

amv-bp1k5p066e1a****
AccountNamestringYes

The name of the database account.

account1
AccountPrivilegesobject []Yes

The permissions of the database account.

PrivilegeObjectobjectNo

The objects on which the permission takes effect, including databases, tables, and columns.

DatabasestringNo

The databases on which the database account has permissions. This parameter is required if the PrivilegeType parameter is set to Database, Table, or Column.

tsdb1
TablestringNo

The tables on which the database account has permissions. This parameter is required if the PrivilegeType parameter is set to Table or Column.

table1
ColumnstringNo

The columns on which the database account has permissions. This parameter is required if the PrivilegeType parameter is set to Column.

column1
PrivilegesarrayNo

The permissions that you want to modify. You can call the DescribeEnabledPrivileges operation to query the permissions of the database account.

stringNo
select
PrivilegeTypestringNo

The permission level of the database account. You can call the DescribeEnabledPrivileges operation to query the permission level of the database account.

Global

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

9DD88DE7-824F-1082-AA57-575AFC6517A8

Examples

Sample success responses

JSONformat

{
  "RequestId": "9DD88DE7-824F-1082-AA57-575AFC6517A8"
}

Error codes

HTTP status codeError codeError messageDescription
400ACS.Privilege.ModifyFailedFailed to modify the account privilege. Make sure that bound account have sufficient database privileges.Failed to modify the database account permissions. Check whether the database account that is associated with the RAM user has sufficient database permissions.
400InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The DBClusterId parameter is invalid. Check the parameter.
400ACS.Account.NotBindDatabaseAccountThe account has not been associated with a database account.-
400ACS.Parameter.MalformedThe following required parameters are not specified: %sYou must specify the required parameters.
400ACS.InvalidParameter.%sParameter %s is invalid.The specified parameter is invalid.
400InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-09The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
2023-04-20The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
2023-03-24The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.