Modifies the permissions of an account on an ApsaraDB for Redis instance.

  • Only ApsaraDB for Redis instances of Redis 4.0 and later are supported.
  • The ApsaraDB for Redis instance must be in the Running state.


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 GrantAccountPrivilege

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance which belongs to the account.

AccountName String Yes demoaccount

The name of the account that you want to manage.

  • The name must start with a lowercase letter.
  • The name can contain lowercase letters, digits, and underscores (_).
  • The name must be 1 to 16 characters in length.
AccountPrivilege String Yes RoleReadWrite

The permissions that you want to grant to the account. Valid values:

  • RoleReadOnly: the read-only permissions.
  • RoleReadWrite: the read and write permissions. This is the default value.
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

Parameter Type Example Description
RequestId String 3845BDF5-15A6-4444-B770-78501819****

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "3845BDF5-15A6-4444-B770-78501819****"

Error codes

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