Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to purge Azure CDN Endpoint using Azure CLI

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!

like image 495
Sunny Sharma Avatar asked Feb 27 '19 07:02

Sunny Sharma


People also ask

How do I delete Azure CDN?

Resources include Azure CDN custom domains, Azure CDN profiles/endpoints or Azure resource groups that has Azure CDN custom domain(s) enabled. From the Endpoint page, under Custom domains, right-click the custom domain that you want to remove, then select Delete from the context menu. Select Yes.

What is purge in Azure CDN?

Sometimes you may wish to purge cached content from all edge nodes and force them all to retrieve new updated assets. This might be due to updates to your web application, or to quickly update assets that contain incorrect information. Tip. Note that purging only clears the cached content on the CDN edge servers.

How do I know if my Azure CDN is working?

How to find Azure CDN resource health. In the Azure portal, browse to your CDN profile. Click the Settings button. Under Support + troubleshooting, click Resource health.


1 Answers

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

like image 186
Nancy Xiong Avatar answered Sep 30 '22 19:09

Nancy Xiong