How to disable Azure Front Door Premium Profile

D-6386 40 Reputation points
2024-01-12T16:14:01.47+00:00

According to Front-door-faq, front door is only billed/charged when the profile & routing rules are enabled. Is there a CLI command (or other method) available to disable an Azure Front Door Premium profile? This is for internal environments as we want to turn them off overnight when they won't be in use at all. Thanks

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
677 questions
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 49,591 Reputation points Microsoft Employee
    2024-01-15T12:10:29.3066667+00:00

    Hello @D-6386 ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know how to disable Azure Front Door Premium profile.

    Let us first start with the difference between Azure Front Classic SKU and Azure Front Door Standard/Premium SKU.

    The AFD Classic SKU doesn't have a concept of endpoint. The frontend/host name that we add during deployment is both its hostname and profile name.

    User's image

    However, the Premium SKU has a concept of endpoint. The profile name and the endpoint/host name could be same or different in this case.

    enter image description here

    An endpoint is a logical grouping of one or more routes that are associated with domain names. A route contains the origin group configuration and routing rules between domains and origins. An endpoint can have one or more routes.

    • You can enable or disable an endpoint or a route.
    • Traffic will only flow to origins once both the endpoint and route is enabled.

    Refer: https://video2.skills-academy.com/en-us/azure/frontdoor/manager

    So, when disabling Azure Front Door Premium SKU, you would need to disable the endpoints.

    Refer: https://video2.skills-academy.com/en-us/azure/frontdoor/endpoint?tabs=azurecli

    Below are the REST API documents which will help you in this case:

    GET : https://video2.skills-academy.com/en-us/rest/api/frontdoor/azurefrontdoorstandardpremium/afd-endpoints/get?tabs=HTTP

    UPDATE/PATCH : https://video2.skills-academy.com/en-us/rest/api/frontdoor/azurefrontdoorstandardpremium/afd-endpoints/update?tabs=HTTP

    I tested this in my lab, and it works.

    You need to do a GET on the AFD endpoint and then use the response you get as request body in the update Rest API.

    You have to set the field marked below as Disabled in your request body. This field will be at the end of the JSON body.

    enter image description here

    enter image description here

    enter image description here

    If you've more than one endpoint, then disable all the endpoints to disable the Azure Front Door profile.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sedat SALMAN 13,825 Reputation points
    2024-01-13T00:30:09.4233333+00:00

    there is similar post mentioning hos to disable by using API you can check the answer [https://video2.skills-academy.com/en-us/answers/questions/1189969/how-to-disable-the-azure-front-door-cdn-profile-(u](https://video2.skills-academy.com/en-us/answers/questions/1189969/how-to-disable-the-azure-front-door-cdn-profile-(u)


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.