From 6576de152d6dbb7e82792c2cae4ecc18dcdfd568 Mon Sep 17 00:00:00 2001 From: Mark Pochert Date: Tue, 22 Feb 2022 08:18:42 +0100 Subject: [PATCH] feat(cloudwatch-alarms): add name property --- resources/cloudwatch-alarms.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/cloudwatch-alarms.go b/resources/cloudwatch-alarms.go index d5a36584d..efd05d7e2 100644 --- a/resources/cloudwatch-alarms.go +++ b/resources/cloudwatch-alarms.go @@ -4,6 +4,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatch" + "github.com/rebuy-de/aws-nuke/pkg/types" ) type CloudWatchAlarm struct { @@ -55,6 +56,11 @@ func (f *CloudWatchAlarm) Remove() error { return err } +func (f *CloudWatchAlarm) Properties() types.Properties { + return types.NewProperties(). + Set("Name", f.alarmName) +} + func (f *CloudWatchAlarm) String() string { return *f.alarmName }