monitor_groups
Creates, updates, deletes, gets or lists a monitor_groups resource.
Overview
| Name | monitor_groups |
| Type | Resource |
| Id | cloudflare.load_balancers.monitor_groups |
Fields
The following fields are returned by SELECT queries:
- get
- list
Monitor Group Details response
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Monitor Group to use for checking the health of origins within this pool. |
created_at | string (date-time) | The timestamp of when the monitor group was created (example: 2014-01-01T05:20:00.12345Z) |
description | string | A short description of the monitor group (example: Primary datacenter monitors) |
members | array | List of monitors in this group |
updated_at | string (date-time) | The timestamp of when the monitor group was last updated (example: 2014-01-01T05:20:00.12345Z) |
List Monitor Groups response
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Monitor Group to use for checking the health of origins within this pool. |
created_at | string (date-time) | The timestamp of when the monitor group was created (example: 2014-01-01T05:20:00.12345Z) |
description | string | A short description of the monitor group (example: Primary datacenter monitors) |
members | array | List of monitors in this group |
updated_at | string (date-time) | The timestamp of when the monitor group was last updated (example: 2014-01-01T05:20:00.12345Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | monitor_group_id, account_id | Fetch a single configured monitor group. | |
list | select | account_id | List configured monitor groups. | |
create | insert | account_id, id, description, members | Create a new monitor group. | |
edit | update | monitor_group_id, account_id, id, description, members | Apply changes to an existing monitor group, overwriting the supplied properties. | |
update | replace | monitor_group_id, account_id, id, description, members | Modify a configured monitor group. | |
delete | delete | monitor_group_id, account_id | Delete a configured monitor group. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
monitor_group_id | string |
SELECT examples
- get
- list
Fetch a single configured monitor group.
SELECT
id,
created_at,
description,
members,
updated_at
FROM cloudflare.load_balancers.monitor_groups
WHERE monitor_group_id = '{{ monitor_group_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List configured monitor groups.
SELECT
id,
created_at,
description,
members,
updated_at
FROM cloudflare.load_balancers.monitor_groups
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a new monitor group.
INSERT INTO cloudflare.load_balancers.monitor_groups (
description,
id,
members,
account_id
)
SELECT
'{{ description }}' /* required */,
'{{ id }}' /* required */,
'{{ members }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: monitor_groups
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the monitor_groups resource.
- name: description
value: "{{ description }}"
description: |
A short description of the monitor group
- name: id
value: "{{ id }}"
description: |
The ID of the Monitor Group to use for checking the health of origins within this pool.
- name: members
description: |
List of monitors in this group
value:
- created_at: "{{ created_at }}"
enabled: {{ enabled }}
monitor_id: "{{ monitor_id }}"
monitoring_only: {{ monitoring_only }}
must_be_healthy: {{ must_be_healthy }}
updated_at: "{{ updated_at }}"
UPDATE examples
- edit
Apply changes to an existing monitor group, overwriting the supplied properties.
UPDATE cloudflare.load_balancers.monitor_groups
SET
description = '{{ description }}',
id = '{{ id }}',
members = '{{ members }}'
WHERE
monitor_group_id = '{{ monitor_group_id }}' --required
AND account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
AND description = '{{ description }}' --required
AND members = '{{ members }}' --required
RETURNING
errors,
messages,
result,
success;
REPLACE examples
- update
Modify a configured monitor group.
REPLACE cloudflare.load_balancers.monitor_groups
SET
description = '{{ description }}',
id = '{{ id }}',
members = '{{ members }}'
WHERE
monitor_group_id = '{{ monitor_group_id }}' --required
AND account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
AND description = '{{ description }}' --required
AND members = '{{ members }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Delete a configured monitor group.
DELETE FROM cloudflare.load_balancers.monitor_groups
WHERE monitor_group_id = '{{ monitor_group_id }}' --required
AND account_id = '{{ account_id }}' --required
;