Skip to main content

alerts

Creates, updates, deletes, gets or lists an alerts resource.

Overview

Namealerts
TypeResource
Idaws.medialive.alerts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
alert_typestringPlaceholder documentation for __string
cleared_timestampstring (date-time)Placeholder documentation for __timestampIso8601
idstringPlaceholder documentation for __string
messagestringPlaceholder documentation for __string
pipeline_idstringPlaceholder documentation for __string
set_timestampstring (date-time)Placeholder documentation for __timestampIso8601
statestringThe state of the alert (SET, CLEARED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_alertsselectchannel_id, regionmaxResults, nextToken, stateFilterList the alerts for a channel with optional filtering based on alert state.

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.

NameDatatypeDescription
channel_idstringThe unique ID of the channel
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of items to return
nextTokenstringThe next pagination token
stateFilterstringSpecifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.

SELECT examples

List the alerts for a channel with optional filtering based on alert state.

SELECT
alert_type,
cleared_timestamp,
id,
message,
pipeline_id,
set_timestamp,
state
FROM aws.medialive.alerts
WHERE channel_id = '{{ channel_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND stateFilter = '{{ stateFilter }}'
;