Skip to content

Commit 60243b3

Browse files
committed
feat(cloudwatchevents-target): add properties
1 parent 995b7b0 commit 60243b3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

resources/cloudwatchevents-targets.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package resources
22

33
import (
44
"context"
5+
"github.com/ekristen/libnuke/pkg/types"
56

67
"fmt"
78

@@ -87,6 +88,12 @@ func (target *CloudWatchEventsTarget) Remove(_ context.Context) error {
8788

8889
func (target *CloudWatchEventsTarget) String() string {
8990
// TODO: change this to IAM format rule -> target and mark as breaking change for filters
90-
// TODO: add properties for rule and target separately
9191
return fmt.Sprintf("Rule: %s Target ID: %s", *target.ruleName, *target.targetID)
9292
}
93+
94+
func (target *CloudWatchEventsTarget) Properties() types.Properties {
95+
return types.NewProperties().
96+
Set("Name", target.ruleName).
97+
Set("TargetID", target.targetID).
98+
Set("BusName", target.busName)
99+
}

0 commit comments

Comments
 (0)