You can lock or delete an account of an ApsaraDB RDS PostgreSQL instance that uses cloud disks. To delete a standard account of an ApsaraDB RDS PostgreSQL instance that uses local disks, you must execute the corresponding SQL statement.

Use the console to lock an account

Prerequisites: Your ApsaraDB RDS PostgreSQL instance uses cloud disks.

Note After the account is locked, you cannot use it to log on to the instance anymore.
  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where your instance is deployed.
    Select a region
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, click Databases.
  5. Find the account that you want to lock and click Delete in the Actions column.
    Note After you click Lock, wait until the Status field displays Locked. If you want to use the account again, click Unlock.Lock an account

Use the console to delete an account

Prerequisites: Your ApsaraDB RDS PostgreSQL instance uses cloud disks.

Note If the account to be deleted has permissions to access databases, tables, or other objects, this task only locks the account. You must revoke the permissions of the account before you can delete the account.
  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the target RDS instance is deployed.
    Select a region
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, click Databases.
  5. Find the account that you want to delete and click Delete in the Actions column.
  6. In the message that appears, click OK.

Execute an SQL statement to delete a standard account

Note You can execute an SQL statement to delete a standard account of an ApsaraDB RDS PostgreSQL instance that uses cloud or local disks.
  1. Use Data Management (DMS) to log on to your ApsaraDB RDS PostgreSQL instance. For more information, see Use DMS to log on to an RDS instance.
  2. In the top navigation bar, choose SQL Operations > SQL Window.
  3. Enter the following SQL statement:
    DROP USER <Account name>;
  4. Click Execute.

Related API operations

Operation Description
DeleteAccount Deletes an account.
LockAccount Locks an account.
UnlockAccount Unlocks an account.