Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

feat(cloudwatch-alarms): add name property #746

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}