Skip to main content

anomalies

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

Overview​

Nameanomalies
TypeResource
Idaws.ce.anomalies

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
anomaly_end_datestringThe last day the anomaly is detected. (pattern: <code>(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}:\d{2}Z)?</code>)
anomaly_idstringThe unique identifier for the anomaly. (pattern: <code>[\S\s]*</code>)
anomaly_scoreobjectThe latest and maximum score for the anomaly.
anomaly_start_datestringThe first day the anomaly is detected. (pattern: <code>(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}:\d{2}Z)?</code>)
dimension_valuestringThe dimension for the anomaly (for example, an Amazon Web Services service in a service monitor). (pattern: <code>[\S\s]*</code>)
feedbackstringThe feedback value. (YES, NO, PLANNED_ACTIVITY)
impactobjectThe dollar impact for the anomaly.
monitor_arnstringThe Amazon Resource Name (ARN) for the cost monitor that generated this anomaly. (pattern: <code>[\S\s]*</code>)
root_causesarrayThe list of identified root causes for the anomaly.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_anomaliesselectregionRetrieves all of the cost anomalies detected on your account during the time period that's specified by the DateInterval object. Anomalies are available for up to 90 days.
provide_anomaly_feedbackexecregion, AnomalyIdModifies the feedback property of a given cost anomaly.

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
regionstringAWS region (default: us-east-1)

SELECT examples​

Retrieves all of the cost anomalies detected on your account during the time period that's specified by the DateInterval object. Anomalies are available for up to 90 days.

SELECT
anomaly_end_date,
anomaly_id,
anomaly_score,
anomaly_start_date,
dimension_value,
feedback,
impact,
monitor_arn,
root_causes
FROM aws.ce.anomalies
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods​

Modifies the feedback property of a given cost anomaly.

EXEC aws.ce.anomalies.provide_anomaly_feedback
@region='{{ region }}' --required
@@json=
'{
"AnomalyId": "{{ AnomalyId }}",
"Feedback": "{{ Feedback }}"
}'
;