Tencent Cloud Common Actions

Actions

copy-instance-tags

Action to copy tags from instance to cbs resources which are attached to it

example:

policies:
  - name: copy_instance_tags
    resource: tencentcloud.cbs
    filters:
      - DiskState: ATTACHED
      - type: value
        key: 'InstanceIdList[0]'
        value: not-null
    actions:
      - type: copy-instance-tags
        tags:
          - test_pro_16
          - test_pro_17
      - type: copy-instance-tags
        tags:
          - test_pro_18

mark-for-op

Tag resources for future action.

remove-tag

Delete Tag

rename-tag

Rename the tag information, because Tencent Cloud API does not support direct modification, you need to delete it first and then add it

start

Action to stop a running cvm instance

example:

policies:
- name: cvm-start
  resource: tencentcloud.cvm
  actions:
    - type: start

stop

Action to stop a running cvm instance

example:

policies:
- name: cvm-marked-for-op-stop
  resource: tencentcloud.cvm
  filters:
    - type: marked-for-op
      op: stop
      skew: 14
  actions:
    - type: stop

tag

Add tag information

terminate

Action to stop a running cvm instance

example:

policies:
- name: cvm-marked-for-op-terminate
  resource: tencentcloud.cvm
  filters:
    - type: marked-for-op
      op: terminate
      skew: 14
  actions:
    - type: terminate

webhook

Calls a webhook with optional parameters and body populated from JMESPath queries.

policies:
  - name: call-webhook
    resource: ec2
    description: |
      Call webhook with list of resource groups
    actions:
     - type: webhook
       url: http://foo.com
       query-params:
          resource_name: resource.name
          policy_name: policy.name