SELECT * FROM iasql_install('<modules>');
INSERT INTO log_group (log_group_name)
VALUES ('<logGroupName>');
SELECT *
FROM log_group
WHERE log_group_name = '<logGroupName>';
DELETE FROM log_group
WHERE log_group_name = '<logGroupName>';
INSERT INTO log_group (log_group_name)
VALUES ('<logGroupName>');
DELETE FROM log_group
WHERE log_group_name = '<logGroupName>' AND region = default_aws_region();
SELECT *
FROM log_group
WHERE log_group_name = '<logGroupName>';
UPDATE log_group
SET region = 'us-east-2'
WHERE log_group_name = '<logGroupName>';
INSERT INTO metric_alarm (alarm_name, alarm_description, actions_enabled, comparison_operator, datapoints_to_alarm, dimensions, metric_name, namespace, period, statistic, threshold, evaluation_periods)
VALUES ('<alarmName>', 'Metric alarm description', true, 'GreaterThanThreshold', 1, '[{"Name": "InstanceId", "Value": "test"}]', 'CPUUtilization', 'AWS/EC2', 60, 'Average', 19327352832, 1);
SELECT *
FROM metric_alarm
WHERE alarm_name = '<alarmName>';
UPDATE metric_alarm SET evaluation_periods=3, alarm_actions='<alarmActions>' WHERE alarm_name = '<alarmName>';
SELECT *
FROM metric_alarm
WHERE alarm_name = '<alarmName>' AND evaluation_periods=3;
DELETE FROM metric_alarm
WHERE alarm_name = '<alarmName>';