Updated on 2024-02-08 GMT+08:00

Renaming Commands

Scenarios

General-purpose GeminiDB Redis instances allow you to rename high-risk commands.

Precautions

  • The command renaming function is still in the open beta test (OBT) phase. To use it, contact customer service.
  • To use the command renaming function, you need to update instances with earlier kernel minor versions to the most recent version.
  • High-risk commands can be renamed only when your instance is in the Available state.

Procedure

  1. Log in to the management console.
  2. In the service list, choose Databases > GeminiDB Redis API.
  3. On the Instances page, locate the instance where you want to rename high-risk commands and choose More > Rename High-risk Command in the Operation column.

    Figure 1 Command renaming option

  4. Select the required commands and disable them. For involved parameters, see Table 1.

    Table 1 Parameter description

    Parameter

    Description

    flushall

    Clears all buffers.

    flushdb

    Deletes all keys in the current database.

    hgetall

    Returns all fields and values in the hash table.

    hkeys

    Returns all keys in the hash table.

    hvals

    Returns all values in the hash table.

    keys

    Finds all keys that match a given pattern.

    smembers

    Returns all members in a set. Any set without keys is considered empty.

    New Name

    Name of the command that takes effect currently. The name can include 0 to 30 characters. Command names are case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_). If the name is left blank, the command is disabled. The new name must be unique.

    Disabled

    The Disabled option is toggled off by default. You can click to toggle on it. If a command is disabled, its new name is empty.

  5. Modify parameter information and click OK.

    Figure 2 Renaming commands

  6. Check the renaming result.

    • You can view new command names on the Rename High-risk Command page.
    • After the renaming is complete, original commands become invalid and you need to use new commands to perform operations.