Skip to content

Commit b8982b4

Browse files
ayogunekristen
authored andcommitted
feat(cloudwatchlogs-loggroup): add RetentionInDays properties
1 parent 51e7c33 commit b8982b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

resources/cloudwatchlogs-loggroups.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ func (l *CloudWatchLogsLogGroupLister) List(_ context.Context, o interface{}) ([
8787
lastEvent = time.Unix(*logGroup.CreationTime/1000, 0)
8888
}
8989

90+
9091
resources = append(resources, &CloudWatchLogsLogGroup{
9192
svc: svc,
9293
logGroup: logGroup,
9394
lastEvent: lastEvent.Format(time.RFC3339),
9495
tags: tagResp.Tags,
9596
})
96-
}
97-
97+
}
9898
if output.NextToken == nil {
9999
break
100100
}
@@ -128,10 +128,13 @@ func (f *CloudWatchLogsLogGroup) Properties() types.Properties {
128128
properties := types.NewProperties().
129129
Set("logGroupName", f.logGroup.LogGroupName).
130130
Set("CreatedTime", f.logGroup.CreationTime).
131-
Set("LastEvent", f.lastEvent)
131+
Set("LastEvent", f.lastEvent).
132+
Set("RetentionInDays", f.logGroup.RetentionInDays)
133+
132134

133135
for k, v := range f.tags {
134136
properties.SetTag(&k, v)
135137
}
136138
return properties
137139
}
140+

0 commit comments

Comments
 (0)