Skip to main content

monitors

Creates, updates, deletes or gets a monitor resource or lists monitors in a region

Overview

Namemonitors
TypeResource
DescriptionRepresents a monitor, which defines the monitoring boundaries for measurements that Internet Monitor publishes information about for an application
Idaws.internetmonitor.monitors

Fields

NameDatatypeDescription
created_atstringThe date value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ssZ)
modified_atstringThe date value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ssZ)
monitor_arnstring
monitor_namestring
linked_account_idstring
include_linked_accountsboolean
processing_statusstring
processing_status_infostring
resourcesarray
resources_to_addarray
resources_to_removearray
statusstring
tagsarray
max_city_networks_to_monitorinteger
traffic_percentage_to_monitorinteger
internet_measurements_log_deliveryobject
health_events_configobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTMonitorName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all monitors in a region.

SELECT
region,
created_at,
modified_at,
monitor_arn,
monitor_name,
linked_account_id,
include_linked_accounts,
processing_status,
processing_status_info,
resources,
resources_to_add,
resources_to_remove,
status,
tags,
max_city_networks_to_monitor,
traffic_percentage_to_monitor,
internet_measurements_log_delivery,
health_events_config
FROM aws.internetmonitor.monitors
WHERE region = 'us-east-1';

Gets all properties from an individual monitor.

SELECT
region,
created_at,
modified_at,
monitor_arn,
monitor_name,
linked_account_id,
include_linked_accounts,
processing_status,
processing_status_info,
resources,
resources_to_add,
resources_to_remove,
status,
tags,
max_city_networks_to_monitor,
traffic_percentage_to_monitor,
internet_measurements_log_delivery,
health_events_config
FROM aws.internetmonitor.monitors
WHERE region = 'us-east-1' AND data__Identifier = '<MonitorName>';

INSERT example

Use the following StackQL query and manifest file to create a new monitor resource, using stack-deploy.

/*+ create */
INSERT INTO aws.internetmonitor.monitors (
MonitorName,
region
)
SELECT
'{{ MonitorName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.internetmonitor.monitors
WHERE data__Identifier = '<MonitorName>'
AND region = 'us-east-1';

Permissions

To operate on the monitors resource, the following permissions are required:

Create

internetmonitor:CreateMonitor,
internetmonitor:GetMonitor,
internetmonitor:TagResource,
internetmonitor:UntagResource,
logs:CreateLogDelivery,
logs:GetLogDelivery,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:ListBucket,
iam:PassRole

Read

internetmonitor:GetMonitor,
internetmonitor:ListTagsForResource,
logs:GetLogDelivery

Update

internetmonitor:CreateMonitor,
internetmonitor:GetMonitor,
internetmonitor:UpdateMonitor,
internetmonitor:TagResource,
internetmonitor:UntagResource,
logs:CreateLogDelivery,
logs:GetLogDelivery,
logs:UpdateLogDelivery,
logs:DeleteLogDelivery,
logs:ListLogDeliveries,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:ListBucket,
iam:PassRole

Delete

internetmonitor:UpdateMonitor,
internetmonitor:DeleteMonitor,
internetmonitor:GetMonitor,
logs:DeleteLogDelivery

List

internetmonitor:ListMonitors,
internetmonitor:GetMonitor,
logs:GetLogDelivery