by Sandro Pereira | Jul 12, 2021 | BizTalk Community Blogs via Syndication
Recently I wrote my version of a script that Mike Stephenson initially created: Find Orphaned Azure API Connectors with PowerShell. This PowerShell script will look at all of the API Connections in a specific resource group and then inspect every Logic App in your resource group to check if the API Connections are being used or not. The goal of this script, of course, is to identify orphaned API Connections in a single Resource Group quickly and effectively.
I modify the original script to have a better output or at least a different output that works better for my needs. Automatically add a Deprecated tag on all the API Connectors with the value True or False. And add additional capabilities on the generation of the output report in a CSV format.
The only limitation of this script is that it only checks a specific Resource Group. So, if you have 3 or 4 Resources Groups, you need to configure this script and run it 3 or 4 times.
To streamline this process and not waste so much time, I decided to create a new version of this script. This new script will look at all the API Connections in all resource groups on a single Azure Subscription and then inspect every Logic App in that specific Resource Group (RG) to check if the API Connections of that RG are being used or not.
What’s new on this PowerShell script:
- It will check in all Resources Groups available on a single Subscription if API Connections are being used or not.
- Subscription Details output is improved and with coloring to better read
- List of available API Connectors group by Resource Group output is improved and with coloring to better read
- List of Logic Apps and API Connectors association group by Resource Group and Logic App output is improved and with coloring to better read
- List of Orphaned API Connectors order by Resource Group output is improved and with coloring to better read
Download
THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.
You can download Find Orphaned API Connectors in all Resource Groups from GitHub here:
The post Find Orphaned Azure API Connectors in all Resource Groups with PowerShell appeared first on SANDRO PEREIRA BIZTALK BLOG.
by Sandro Pereira | Jun 20, 2021 | BizTalk Community Blogs via Syndication
Developing solutions on Azure is sometimes an effortless operation. Administrate all your Azure resources that may be a different story. And this PowerShell script focuses on simplifying one of these processes.
One of the painful processes, not only when we are developing our Logic App, but mainly when we are administrating them, is finding what API Connections and no longer being used by your Logic Apps. What we call Orphaned API Connections.
What is the importance of this script? Over time, our Logic Apps can change to fit new requirements or fix some issues that can occur. And we can quickly end up with unused Azure API Connections. In addition, it is not easy to work out which API Connections are being used by our Logic Apps directly thru the Azure Portal! Neither to see if a specific API connector is orphaned.
This PowerShell script will look at all of the API Connections in your resource group and then inspect every Logic App in your resource group to check if the API Connections are being used or not. This script will help you to identify orphaned API Connections quickly.
This script was initially created by Mike Stephenson, which I took as a reference and improved or modified according to what I thought fit better to this task:
- List the output of existing API Connectors in a specific resource group to print only the API Connector name instead of the full ID to be simple to read;
- List the output of API Connectors bind to a Logic App group by each Logic App to be simple to read;
- List the output of deprecated API Connector to include only connectors are deprecated to be simple to read – this is the main point of the script. give the list of deprecated/orphaned connectors;
- Add a Deprecated tag on all the API Connectors. The reason to add this tag is that sometimes I just want to reference them and make manually double-check on the subscription, talk with the development team or make these changes (remove these API Connectors on the next intervention window, if companies have kind of this policy) :
- If it is orphaned then the value of this tag will be true;
- Otherwise, the value of this tag will be false;
- The output CSV format now includes the option for you to specify what CSV character you want to use as a separator or delimiters like comma or semicolon.
Download
You can download Find Orphaned API Connectors from GitHub here:
The post Find Orphaned Azure API Connectors with PowerShell appeared first on SANDRO PEREIRA BIZTALK BLOG.