How to Identify and Remove Unused Azure Private Endpoints for Cost Optimization

Navin Prasad Kumar 61 Reputation points
2024-02-17T15:04:50.4033333+00:00

I need assistance with the following:

  1. Identification: What is an effective way to determine which Azure Private Endpoints are not in use or duplicated across all subscriptions or within a specific subscription?
  2. Removal: After identifying them, what is the best and safest approach to remove these unused or duplicate private endpoints to prevent disruption of any services or dependencies?

Any assistance or guidance on completing this through Azure SDK or REST API would be appreciated.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,427 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
504 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 44,921 Reputation points Microsoft Employee
    2024-02-19T16:24:28.3466667+00:00

    @Navin Prasad Kumar ,

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

    I understand that you would like to list the Private EndPoints wrt usage.

    1.Can you please define what do you mean by "unused" wrt Private EndPoint?

    • Because, Azure private endpoint created for a PaaS Resource gets deleted if the PaaS Service is deleted.
    • This means, a Private EndPoint is never "abandoned" as some user/service in the VNET or OnPrem can always use it to access the PaaS Service.
    • If this based on metrics, Azure Private EndPoint has two metrics available.
      • Bytes In
      • Bytes Out
    • Depending on your PaaS Service, and user traffic - you can use the above to filter and check if a particular Private EndPoint is expecting traffic or not.
    • While it is possible to check the above using REST APIs, I suggest you use Portal so that you can visualize the graph
    • See :

    2.For Deleting/Removing the resource,

    Hope this helps.

    Cheers,

    Kapil

    0 comments No comments

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.