aws.cache-cluster
Filters
Actions
delete
Action to delete an elasticache cluster
To prevent unwanted deletion of elasticache clusters, it is recommended to include a filter
- example:
policies:
- name: elasticache-delete-stale-clusters
resource: cache-cluster
filters:
- type: value
value_type: age
key: CacheClusterCreateTime
op: ge
value: 90
actions:
- type: delete
skip-snapshot: false
properties:
skip-snapshot:
type: boolean
type:
enum:
- delete
required:
- type
Permissions - elasticache:DeleteCacheCluster, elasticache:DeleteReplicationGroup
rename-tag
Rename an existing tag key to a new value.
- example:
rename Application, and Bap to App, if a resource has both of the old keys then we’ll use the value specified by Application, which is based on the order of values of old_keys.
policies: - name: rename-tags-example resource: aws.log-group filters: - or: - "tag:Bap": present - "tag:Application": present actions: - type: rename-tag old_keys: [Application, Bap] new_key: App
properties:
new_key:
type: string
old_key:
type: string
old_keys:
items:
type: string
type: array
type:
enum:
- rename-tag
required:
- type
Permissions - tag:TagResources, tag:UntagResources
snapshot
Action to snapshot an elasticache cluster
- example:
policies:
- name: elasticache-cluster-snapshot
resource: cache-cluster
filters:
- type: value
key: CacheClusterStatus
op: not-in
value: ["deleted","deleting","creating"]
actions:
- snapshot
properties:
type:
enum:
- snapshot
required:
- type
Permissions - elasticache:CreateSnapshot