6
votes

I'm using Azure CLI to purge all the contents from Azure CDN endpoint. I got a reference from Microsoft Docs: https://docs.microsoft.com/en-us/cli/azure/cdn/endpoint?view=azure-cli-latest

I'm trying exactly same commands with proper params but it says - "Endpoint(s) not found. Please verify the resource(s), group or it's parent resources exist."

az cdn endpoint purge -g <my-resource-group> --profile-name \
<name-of-cdn-profile> --content-paths '/*' --name <cdn-endpoint-name>

-renders the above error

however, I can see the CDN endpoint when I issue the list command:

az cdn endpoint list -g <my-resource-group> --profile-name <cd>n-profile-name>

the above command works fine and returns the endpoint which I'm trying to purge

Anyone having a similar experience?

TIA!

1
I can produce this error, please check the parameter --name <cdn-endpoint-name>, It should not suffix like.azureedge.net - Nancy Xiong
amazing! thanks @NancyXiong, it worked. how do I mark that as an answer? :-) - Sunny Sharma

1 Answers

6
votes

I can produce this error, please check the parameter --name <cdn-endpoint-name>, It should not have a suffix like .azureedge.net. The endpoint name is the name of the resource which type is Endpoint in your resource group.

enter image description here