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.
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.
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://learn.microsoft.com/en-us/azure/frontdoor/manager
So, when disabling Azure Front Door Premium SKU, you would need to disable the endpoints.
Refer: https://learn.microsoft.com/en-us/azure/frontdoor/endpoint?tabs=azurecli
Below are the REST API documents which will help you in this case:
UPDATE/PATCH : https://learn.microsoft.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.
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.