Data Source: oci_budget_cost_anomaly_events
This data source provides the list of Cost Anomaly Events in Oracle Cloud Infrastructure Budget service.
Gets a list of Cost Anomaly Event in a compartment.
Example Usage
data "oci_budget_cost_anomaly_events" "test_cost_anomaly_events" {
#Required
compartment_id = var.compartment_id
#Optional
cost_anomaly_monitor_id = oci_budget_cost_anomaly_monitor.test_cost_anomaly_monitor.id
cost_impact = var.cost_anomaly_event_cost_impact
cost_impact_percentage = var.cost_anomaly_event_cost_impact_percentage
name = var.cost_anomaly_event_name
region = var.cost_anomaly_event_region
target_tenant_id = oci_budget_target_tenant.test_target_tenant.id
time_anomaly_event_end_date = var.cost_anomaly_event_time_anomaly_event_end_date
time_anomaly_event_start_date = var.cost_anomaly_event_time_anomaly_event_start_date
}
Argument Reference
The following arguments are supported:
compartment_id- (Required) The ID of the compartment in which to list resources.cost_anomaly_monitor_id- (Optional) The cost monitor ocid.cost_impact- (Optional) cost impact (absolute) of the anomaly event.cost_impact_percentage- (Optional) cost impact (percentage) of the anomaly event.name- (Optional) Unique, non-changeable resource name.region- (Optional) region of the anomaly event.target_tenant_id- (Optional) The target tenantId ocid filter param.time_anomaly_event_end_date- (Optional) endDate for anomaly event date.time_anomaly_event_start_date- (Optional) startDate for anomaly event date.
Attributes Reference
The following attributes are exported:
cost_anomaly_event_collection- The list of cost_anomaly_event_collection.
CostAnomalyEvent Reference
The following attributes are exported:
compartment_id- The OCID of the compartment.cost_anomaly_name- The name of the associated cost monitor.cost_impact- The cost impact of the detected anomaly.cost_monitor_id- The OCID of the associated cost monitor.cost_monitor_name- The name of the associated cost monitor.cost_monitor_type- Type of cost monitorcost_variance_percentage- The cost variance percentage of the detected anomaly.defined_tags- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}feedback_response- The feedback response for the cost anomaly event.freeform_tags- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:{"Department": "Finance"}id- The OCID of the Cost Anomaly Event.root_cause_detail- The root cause details of the cost anomaly event.value- The json object representing the root cause details of the anomaly event.
state- The current state of the cost anomaly event.system_tags- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example:{"orcl-cloud.free-tier-retained": "true"}target_resource_filter- The filter object to target resources for cost monitor. Cost generated by one or more resources identified by this filter is monitored for anomalous deviations.time_anomaly_event_date- The event date of the anomaly event.time_created- The created time of the cost anomaly event.time_updated- The updated time of the cost anomaly event.