Skip to main content

anomaly_monitors

Creates, updates, deletes or gets an anomaly_monitor resource or lists anomaly_monitors in a region

Overview

Nameanomaly_monitors
TypeResource
DescriptionAWS Cost Anomaly Detection leverages advanced Machine Learning technologies to identify anomalous spend and root causes, so you can quickly take action. You can use Cost Anomaly Detection by creating monitor.
Idawscc.ce.anomaly_monitors

Fields

NameDatatypeDescription
monitor_arnstringSubscription ARN
monitor_typestring
monitor_namestringThe name of the monitor.
creation_datestringThe date when the monitor was created.
last_evaluated_datestringThe date when the monitor last evaluated for anomalies.
last_updated_datestringThe date when the monitor was last updated.
monitor_dimensionstringThe dimensions to evaluate
monitor_specificationstring
dimensional_value_countintegerThe value for evaluated dimensions.
resource_tagsarrayTags to assign to monitor.
regionstringAWS region.

For more information, see AWS::CE::AnomalyMonitor.

Methods

NameResourceAccessible byRequired Params
create_resourceanomaly_monitorsINSERTMonitorName, MonitorType, region
delete_resourceanomaly_monitorsDELETEIdentifier, region
update_resourceanomaly_monitorsUPDATEIdentifier, PatchDocument, region
list_resourcesanomaly_monitors_list_onlySELECTregion
get_resourceanomaly_monitorsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual anomaly_monitor.

SELECT
region,
monitor_arn,
monitor_type,
monitor_name,
creation_date,
last_evaluated_date,
last_updated_date,
monitor_dimension,
monitor_specification,
dimensional_value_count,
resource_tags
FROM awscc.ce.anomaly_monitors
WHERE
region = 'us-east-1' AND
Identifier = '{{ monitor_arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ce.anomaly_monitors (
MonitorType,
MonitorName,
region
)
SELECT
'{{ monitor_type }}',
'{{ monitor_name }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.ce.anomaly_monitors
SET PatchDocument = string('{{ {
"MonitorName": monitor_name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ monitor_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ce.anomaly_monitors
WHERE
Identifier = '{{ monitor_arn }}' AND
region = 'us-east-1';

Permissions

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

ce:CreateAnomalyMonitor,
ce:TagResource