Support minutes in mark-for-op actions
See original GitHub issueIs your feature request related to a problem? Please describe.
mark-for-op
just supports days and hours. These units are too big for some use cases.
Describe the solution you’d like
mark-for-op
should also support minutes and maybe the other units supported by datetime.timedelta: seconds, microseconds, milliseconds, and weeks.
https://docs.python.org/3/library/datetime.html#datetime.timedelta
Describe alternatives you’ve considered
mark-for-op
could also accept a float as hours, but this would be more complicated to implement and less reliable.
Additional context
policies:
- name: ec2-mark-stop
resource: ec2
filters:
- type: image-age
op: ge
minutes: 90
actions:
- type: mark-for-op
tag: custodian_cleanup
op: terminate
minutes: 4
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
AWS Common Actions — Cloud Custodian documentation
Real world delay may be several minutes, with worst case into hours[0]. ... 90 actions: - type: mark-for-op tag: custodian_cleanup op: terminate days:...
Read more >mark-for-op action is not working in cloud custodian
"State.Name": stopped mode: schedule: "rate(15 minutes)" type: periodic role: arn:aws:iam::xxxxxxxxxxxx:role/cloud-custodian-role actions: type: ...
Read more >cloud-custodian/cloud-custodian - Gitter
Hey, does url property in value_from filter support File format, we need to whitelist accounts from file which ... custodian schema ec2.actions.mark-for-op.
Read more >C7n Community Meeting Minutes - HackMD
C7n Community Meeting Minutes # May 24th 2022 :::info - **URL:** ... Support Needed; #7240: mark-for-op support for aws.cfn resource ...
Read more >Cloud Custodian Architecture, Deployment and Policy ...
The Lambda function processes this queue every five minutes, ... Ensure that any policies with mark-for-op actions also filter out resources ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m game to support numbers here in the schema for hours.
oh, that’s curious… I am using it for the
asg
resource and figured it was all the same. Sure enough,asg
is an override ofTagDelayedAction
and changes the schema from integer to number. We should just change the defaultTagDelayedAction
schema to numbers instead of integers. Up to @kapilt if also adding minutes is reasonable.