azure.cost-management-export

Cost Management Exports for current subscription (doesn’t include Resource Group scopes)

example

Returns all cost exports for current subscription scope

policies:
  - name: get-cost-management-exports
    resource: azure.cost-management-export

Filters

last-execution

Find Cost Management Exports with last execution more than X days ago.

example

Returns all cost exports that didn’t run in last 30 days.

policies:
  - name: find-stale-management-exports
    resource: azure.cost-management-export
    filters:
      - type: last-execution
        age: 30
properties:
  age:
    minimum: 0
    type: integer
  type:
    enum:
    - last-execution
required:
- age
- type

Actions

execute

Trigger Cost Management Export execution

Known issues:

If you see an error Error: (400) A valid email claim is required. Email claim is missing in the request header. please ensure used Service Principal has proper email configured.

example

Find all exports that have not been executed in the last 30 days and then trigger a manual export.

policies:
  - name: execute-stale-management-exports
    resource: azure.cost-management-export
    filters:
      - type: last-execution
        age: 30
    actions:
      - type: execute
properties:
  type:
    enum:
    - execute
required:
- type