monitors
Creates, updates, deletes or gets a monitor
resource or lists monitors
in a region
Overview
Name | monitors |
Type | Resource |
Description | Represents a monitor, which defines the monitoring boundaries for measurements that Internet Monitor publishes information about for an application |
Id | aws.internetmonitor.monitors |
Fields
Name | Datatype | Description |
---|---|---|
created_at | string | The date value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ssZ) |
modified_at | string | The date value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ssZ) |
monitor_arn | string | |
monitor_name | string | |
linked_account_id | string | |
include_linked_accounts | boolean | |
processing_status | string | |
processing_status_info | string | |
resources | array | |
resources_to_add | array | |
resources_to_remove | array | |
status | string | |
tags | array | |
max_city_networks_to_monitor | integer | |
traffic_percentage_to_monitor | integer | |
internet_measurements_log_delivery | object | |
health_events_config | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | MonitorName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.internetmonitor.monitors (
MonitorName,
region
)
SELECT
'{{ MonitorName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.internetmonitor.monitors (
MonitorName,
LinkedAccountId,
IncludeLinkedAccounts,
Resources,
ResourcesToAdd,
ResourcesToRemove,
Status,
Tags,
MaxCityNetworksToMonitor,
TrafficPercentageToMonitor,
InternetMeasurementsLogDelivery,
HealthEventsConfig,
region
)
SELECT
'{{ MonitorName }}',
'{{ LinkedAccountId }}',
'{{ IncludeLinkedAccounts }}',
'{{ Resources }}',
'{{ ResourcesToAdd }}',
'{{ ResourcesToRemove }}',
'{{ Status }}',
'{{ Tags }}',
'{{ MaxCityNetworksToMonitor }}',
'{{ TrafficPercentageToMonitor }}',
'{{ InternetMeasurementsLogDelivery }}',
'{{ HealthEventsConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: monitor
props:
- name: MonitorName
value: '{{ MonitorName }}'
- name: LinkedAccountId
value: '{{ LinkedAccountId }}'
- name: IncludeLinkedAccounts
value: '{{ IncludeLinkedAccounts }}'
- name: Resources
value:
- '{{ Resources[0] }}'
- name: ResourcesToAdd
value:
- '{{ ResourcesToAdd[0] }}'
- name: ResourcesToRemove
value:
- '{{ ResourcesToRemove[0] }}'
- name: Status
value: '{{ Status }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: MaxCityNetworksToMonitor
value: '{{ MaxCityNetworksToMonitor }}'
- name: TrafficPercentageToMonitor
value: '{{ TrafficPercentageToMonitor }}'
- name: InternetMeasurementsLogDelivery
value:
S3Config:
BucketName: '{{ BucketName }}'
BucketPrefix: '{{ BucketPrefix }}'
LogDeliveryStatus: '{{ LogDeliveryStatus }}'
- name: HealthEventsConfig
value:
AvailabilityScoreThreshold: null
PerformanceScoreThreshold: null
AvailabilityLocalHealthEventsConfig:
Status: '{{ Status }}'
HealthScoreThreshold: null
MinTrafficImpact: null
PerformanceLocalHealthEventsConfig: null
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