Created
August 5, 2021 07:01
-
-
Save skurik/7aa7dc44da356663bf4d3bfe160abe8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AzureAlertStack : Stack | |
{ | |
public AzureAlertStack() | |
{ | |
var resourceGroup = ResourceGroup.Get(resourceGroupName, resourceGroupId); | |
var redis = Pulumi.AzureNative.Cache.Redis.Get(redisName, redisId); | |
var actionGroup = ActionGroup.Get(actionGroupName, actionGroupId); | |
var redisAlert = CreateRedisMemoryUsageAlert(resourceGroup, redis, actionGroup); | |
RedisMemoryUsageAlertId = redisAlert.Id; | |
} | |
[Output] | |
public Output<string> RedisMemoryUsageAlertId { get; private set; } | |
private static MetricAlert CreateRedisMemoryUsageAlert(ResourceGroup resourceGroup, Pulumi.AzureNative.Cache.Redis redis, ActionGroup actionGroup) | |
{ | |
return new MetricAlert(name, new MetricAlertArgs | |
{ | |
... | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment