I have an Azure Event Grid subscription, which is returned when I run the following code:-
az eventgrid event-subscription list --resource-group [my resource group]
This returns a list of the event subscriptions that I have. The id is displayed as:
/subscriptions/[subscription ID]/resourceGroups/[my resource group]/providers/Microsoft.Storage/storageAccounts/[my storage account]/providers/Microsoft.EventGrid/eventSubscriptions/[my sub]
And topic as :-
/subscriptions/[susbcription id]/resourceGroups/[my resource group]/providers/Microsoft.Storage/storageAccounts/[my storage account]
However, when I try and use show or update on the event subscription listed, I receive the following error:-
Invalid event subscription request: Supplied URL is invalid. It cannot be null or empty and should be a proper HTTPS URL like https://www.example.com.
I am passing in the topic as listed above into the --source-resource-id
parameter as follows:-
az eventgrid event-subscription show --source-resource-id "/subscriptions/[subscription id]/resourceGroups/[my resource group]/providers/microsoft.storage/storageaccounts/[my storage account]" --name [my event subscription]
This appears to follow the syntax in the help file, and the documentation:-
Any idea what I might be doing wrong?
As discussed below, when running list with the source-resource-id, an empty object is returned:-
If running it without the source-resource-id, and a jmespath query, it returns an object:-
When running with the cloud cli, get this:-