Resource: awsCeAnomalyMonitor
Provides a CE Anomaly Monitor.
Example Usage
There are two main types of a Cost Anomaly Monitor: dimensional
and custom
.
Dimensional Example
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ceAnomalyMonitor.CeAnomalyMonitor(this, "service_monitor", {
monitorDimension: "SERVICE",
monitorType: "DIMENSIONAL",
name: "AWSServiceMonitor",
});
Custom Example
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ceAnomalyMonitor.CeAnomalyMonitor(this, "test", {
monitorSpecification:
'${jsonencode({\n And = null\n CostCategories = null\n Dimensions = null\n Not = null\n Or = null\n\n Tags = {\n Key = "CostCenter"\n MatchOptions = null\n Values = [\n "10000"\n ]\n }\n })}',
monitorType: "CUSTOM",
name: "AWSCustomAnomalyMonitor",
});
Argument Reference
The following arguments are required:
name
- (Required) The name of the monitor.monitorType
- (Required) The possible type values. Valid values:dimensional
|custom
.monitorDimension
- (Required, ifmonitorType
isdimensional
) The dimensions to evaluate. Valid values:service
.monitorSpecification
- (Required, ifmonitorType
iscustom
) A valid JSON representation for the Expression object.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- ARN of the anomaly monitor.id
- Unique ID of the anomaly monitor. Same asarn
.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
awsCeAnomalyMonitor
can be imported using the id
, e.g.