Search code examples
azureazure-cliazure-redis-cache

az cli not showing redisenterprise keys


this command would work for me

az redisenterprise list --resource-group $ResourceGroup

it shows a list of redis enterprise cluster names

and this shows details

az redisenterprise database show --cluster-name $REDIS_NAME --resource-group $ResourceGroup 

however this

az redisenterprise list-keys --cluster-name $REDIS_NAME --resource-group $ResourceGroup

complains list-keys is misspelled but that's from the documentation as the other commands.

Any idea what could be wrong ?


Solution

  • The az redisenterprise list-keys command fails with a "misspelled" error.

    Check that the redisenterprise Azure CLI extension is installed and up to date.

    az extension list
    

    After running the above command look for redisenterprise in the output. If the extension is missing or outdated follow the below command.

    az extension add --name redisenterprise
    

    Or

    az extension update --name redisenterprise
    
    • Use the correct list-keys command under the database subgroup.
    az redisenterprise database list-keys --cluster-name $REDIS_NAME --resource-group $ResourceGroup --name $DATABASE_NAME