I am trying to create a subscription for my Azure EventGrid Topic using the Azure CLI command as below -
az eventgrid topic event-subscription create -g myresname --topic-name mytopicname --name mysubscriptionname --endpoint https://xyz.azurewebsites.net/api/mywebhookdetails
I am getting this error in the BASH shell in Azure CLI
az eventgrid topic: error: argument _subcommand: invalid choice: event-subscription
What is the reason and how to resolve this?