I'm trying to create an Alert Processing Rule using the Azure Monitor SDK in Java, but I'm having trouble finding the right approach. I want to programmatically create an Alert Processing Rule I have already set up the Azure Management SDK in my Java project and have authentication working using the Azure Active Directory credentials. However, I couldn't find a direct method or class for creating Alert Processing Rules in the SDK.
I have already checked the Microsoft documentation, but I couldn't find specific details or code examples for this scenarios.
https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-processing-rules?tabs=portal
You can use the below code to create an alert processing rule using the Azure Monitor java-SDK.
Code:
Output:
Portal:
Reference:
Azure-sdk-for-java/sdk/alertsmanagement· GitHub