Create monitor

Creates a monitor. Fields left out take their defaults; cost_type defaults to REAL_COST. For what each cost type measures, see Cost Types. CUSTOM_COST is a cost calculation defined for your organization.
If another monitor in your organization already has the same filter_set, group_by, threshold, and cost_type, the call returns 409 without creating a monitor, and error.existing_id names the existing one. A client that retries after a lost response can use that ID to pick up the monitor its first call created. Paused monitors count as a match and deleted monitors don't. The order of values in filter_set and group_by doesn't matter, and monitor_name, description, and is_enabled aren't compared.
group_by accepts at most one Dimension. Notification channels aren't set here; set them afterward with Update monitor notifications. Field validation failures return 422 with a details list.
CloudZero records the change in the activity log, attributed to "Set via API", after saving it. If that log write fails, the monitor is still created.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

A monitor definition. Fields left out take their defaults.

string
enum
Defaults to REAL_COST

The type of cost to monitor.

length ≤ 1000

Optional human-readable description for the monitor

const
enum
Defaults to anomaly

The type of detection to perform. Currently only "anomaly" is supported.

Allowed:
filter_set
object

Cost filters for the monitor. An empty object is valid.

group_by
array of strings
length ≤ 1

Dimensions to group by. Empty means no grouping; create/update requests are capped to a single dimension.

Group By
boolean
Defaults to true

Whether the monitor is running. When false the monitor will not be sent for evaluation.

string
required
length between 1 and 255

Human-readable name for the monitor

threshold
object

Optional significance threshold: an anomaly is surfaced as an incident only if its cost impact
meets it. Leave both min_cost_impact and percentage unset to surface every anomaly.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json