List of Valid Operations for Mark-for-Op in Cloud Custodian

364 Views Asked by At

I was wondering what were some valid operations that we can do for mark-for-op in cloud custodian. I know pause and stop are valid operations. However, I am running this on my company's subscription and I would just like to see all my options before I pause a possible resource that could be important to the company.

- type: mark-for-op
  tag: c7n_ni_not_allowed
  op:
1

There are 1 best solutions below

0
SomeGuyOnAComputer On

I believe that the mark-for-op will allow the op key to work with any action that corresponds to the resource.

For example, see the policy on this page copied below.

policies:
  - name: rg-mark-empty-for-deletion
    description: |
      Find any empty resource groups and mark for deletion in 7 days
    resource: azure.resourcegroup
    filters:
      - "tag:c7n_rg_empty": absent
      - type: empty-group
    actions:
      - type: mark-for-op
        tag: c7n_rg_empty
        op: delete
        days: 7

This will do the operation delete on the resource azure.resourcegroup. This operation is shown under the actions section of the corresponding resource.

Perhaps a better name for the op key is action?