Skip to content

Commit

Permalink
feat(cloudwatch-alarms): add name property (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
hv202x1 committed Feb 23, 2022
1 parent d30e1b2 commit 24750f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/cloudwatch-alarms.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

0 comments on commit 24750f8

Please sign in to comment.