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
Idawscc.internetmonitor.monitors

Fields

NameDatatypeDescription
created_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.

For more information, see AWS::InternetMonitor::Monitor.

Methods

NameResourceAccessible byRequired Params
create_resourcemonitorsINSERTMonitorName, region
delete_resourcemonitorsDELETEIdentifier, region
update_resourcemonitorsUPDATEIdentifier, PatchDocument, region
list_resourcesmonitors_list_onlySELECTregion
get_resourcemonitorsSELECTIdentifier, region

SELECT examples

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 awscc.internetmonitor.monitors
WHERE
region = '{{ region }}' AND
Identifier = '{{ monitor_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.internetmonitor.monitors (
MonitorName,
region
)
SELECT
'{{ monitor_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.internetmonitor.monitors
SET PatchDocument = string('{{ {
"LinkedAccountId": linked_account_id,
"IncludeLinkedAccounts": include_linked_accounts,
"Resources": resources,
"ResourcesToAdd": resources_to_add,
"ResourcesToRemove": resources_to_remove,
"Status": status,
"Tags": tags,
"MaxCityNetworksToMonitor": max_city_networks_to_monitor,
"TrafficPercentageToMonitor": traffic_percentage_to_monitor,
"InternetMeasurementsLogDelivery": internet_measurements_log_delivery,
"HealthEventsConfig": health_events_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ monitor_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.internetmonitor.monitors
WHERE
Identifier = '{{ monitor_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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