Replies: 6 comments 2 replies
-
|
Hi @fauxbytes, thanks for reaching out. You should be able to do this with @github-actions proposed answer |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @RyanFitzSimmonsAK .
|
Beta Was this translation helpful? Give feedback.
-
|
Is |
Beta Was this translation helpful? Give feedback.
-
|
I confirm the |
Beta Was this translation helpful? Give feedback.
-
|
It's a "hole" in the API, because the help show the {
"logGroups": [
{
"storedBytes": 0,
"metricFilterCount": 0,
"creationTime": 1433189500783,
"logGroupName": "my-logs",
"retentionInDays": 5, <--- here
"arn": "arn:aws:logs:us-west-2:0123456789012:log-group:my-logs:*"
}
]
}But if you create an StateMachine with the same {
"QueryLanguage": "JSONata",
"Comment": "A description of my state machine",
"StartAt": "DescribeLogGroups",
"States": {
"DescribeLogGroups": {
"Type": "Task",
"Arguments": {},
"Resource": "arn:aws:states:::aws-sdk:cloudwatchlogs:describeLogGroups", <--- here
"End": true
}
}
}The result is still without the |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Yes — you can query the retention setting via 1) Get retention for a specific log groupUse LOG_GROUP="YourLogGroupName"
aws logs describe-log-groups \
--log-group-name-prefix "$LOG_GROUP" \
--query "logGroups[?logGroupName=='$LOG_GROUP'].retentionInDays | [0]" \
--output text |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
Is there a cli command to query the current retention setting for a log group?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions