1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Budget
  5. getCostAnomalyEvent
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
oci logo
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi

    This data source provides details about a specific Cost Anomaly Event resource in Oracle Cloud Infrastructure Budget service.

    Gets a CostAnomalyEvent by the identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCostAnomalyEvent = oci.Budget.getCostAnomalyEvent({
        costAnomalyEventId: testCostAnomalyEventOciBudgetCostAnomalyEvent.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_cost_anomaly_event = oci.Budget.get_cost_anomaly_event(cost_anomaly_event_id=test_cost_anomaly_event_oci_budget_cost_anomaly_event["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/budget"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := budget.GetCostAnomalyEvent(ctx, &budget.GetCostAnomalyEventArgs{
    			CostAnomalyEventId: testCostAnomalyEventOciBudgetCostAnomalyEvent.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testCostAnomalyEvent = Oci.Budget.GetCostAnomalyEvent.Invoke(new()
        {
            CostAnomalyEventId = testCostAnomalyEventOciBudgetCostAnomalyEvent.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Budget.BudgetFunctions;
    import com.pulumi.oci.Budget.inputs.GetCostAnomalyEventArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testCostAnomalyEvent = BudgetFunctions.getCostAnomalyEvent(GetCostAnomalyEventArgs.builder()
                .costAnomalyEventId(testCostAnomalyEventOciBudgetCostAnomalyEvent.id())
                .build());
    
        }
    }
    
    variables:
      testCostAnomalyEvent:
        fn::invoke:
          function: oci:Budget:getCostAnomalyEvent
          arguments:
            costAnomalyEventId: ${testCostAnomalyEventOciBudgetCostAnomalyEvent.id}
    

    Using getCostAnomalyEvent

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCostAnomalyEvent(args: GetCostAnomalyEventArgs, opts?: InvokeOptions): Promise<GetCostAnomalyEventResult>
    function getCostAnomalyEventOutput(args: GetCostAnomalyEventOutputArgs, opts?: InvokeOptions): Output<GetCostAnomalyEventResult>
    def get_cost_anomaly_event(cost_anomaly_event_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetCostAnomalyEventResult
    def get_cost_anomaly_event_output(cost_anomaly_event_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetCostAnomalyEventResult]
    func LookupCostAnomalyEvent(ctx *Context, args *LookupCostAnomalyEventArgs, opts ...InvokeOption) (*LookupCostAnomalyEventResult, error)
    func LookupCostAnomalyEventOutput(ctx *Context, args *LookupCostAnomalyEventOutputArgs, opts ...InvokeOption) LookupCostAnomalyEventResultOutput

    > Note: This function is named LookupCostAnomalyEvent in the Go SDK.

    public static class GetCostAnomalyEvent 
    {
        public static Task<GetCostAnomalyEventResult> InvokeAsync(GetCostAnomalyEventArgs args, InvokeOptions? opts = null)
        public static Output<GetCostAnomalyEventResult> Invoke(GetCostAnomalyEventInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCostAnomalyEventResult> getCostAnomalyEvent(GetCostAnomalyEventArgs args, InvokeOptions options)
    public static Output<GetCostAnomalyEventResult> getCostAnomalyEvent(GetCostAnomalyEventArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Budget/getCostAnomalyEvent:getCostAnomalyEvent
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CostAnomalyEventId string
    The unique costAnomalyEventId OCID.
    CostAnomalyEventId string
    The unique costAnomalyEventId OCID.
    costAnomalyEventId String
    The unique costAnomalyEventId OCID.
    costAnomalyEventId string
    The unique costAnomalyEventId OCID.
    cost_anomaly_event_id str
    The unique costAnomalyEventId OCID.
    costAnomalyEventId String
    The unique costAnomalyEventId OCID.

    getCostAnomalyEvent Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment.
    CostAnomalyEventId string
    CostAnomalyName string
    The name of the associated cost monitor.
    CostImpact double
    The cost impact of the detected anomaly.
    CostMonitorId string
    The OCID of the associated cost monitor.
    CostMonitorName string
    The name of the associated cost monitor.
    CostMonitorType string
    Type of cost monitor
    CostVariancePercentage double
    The cost variance percentage of the detected anomaly.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    FeedbackResponse string
    The feedback response for the cost anomaly event.
    FreeformTags Dictionary<string, string>
    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 string
    The OCID of the Cost Anomaly Event.
    RootCauseDetail string
    The root cause details of the cost anomaly event.
    State string
    The current state of the cost anomaly event.
    SystemTags Dictionary<string, string>
    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"}
    TargetResourceFilter string
    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.
    TimeAnomalyEventDate string
    The event date of the anomaly event.
    TimeCreated string
    The created time of the cost anomaly event.
    TimeUpdated string
    The updated time of the cost anomaly event.
    CompartmentId string
    The OCID of the compartment.
    CostAnomalyEventId string
    CostAnomalyName string
    The name of the associated cost monitor.
    CostImpact float64
    The cost impact of the detected anomaly.
    CostMonitorId string
    The OCID of the associated cost monitor.
    CostMonitorName string
    The name of the associated cost monitor.
    CostMonitorType string
    Type of cost monitor
    CostVariancePercentage float64
    The cost variance percentage of the detected anomaly.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    FeedbackResponse string
    The feedback response for the cost anomaly event.
    FreeformTags map[string]string
    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 string
    The OCID of the Cost Anomaly Event.
    RootCauseDetail string
    The root cause details of the cost anomaly event.
    State string
    The current state of the cost anomaly event.
    SystemTags map[string]string
    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"}
    TargetResourceFilter string
    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.
    TimeAnomalyEventDate string
    The event date of the anomaly event.
    TimeCreated string
    The created time of the cost anomaly event.
    TimeUpdated string
    The updated time of the cost anomaly event.
    compartmentId String
    The OCID of the compartment.
    costAnomalyEventId String
    costAnomalyName String
    The name of the associated cost monitor.
    costImpact Double
    The cost impact of the detected anomaly.
    costMonitorId String
    The OCID of the associated cost monitor.
    costMonitorName String
    The name of the associated cost monitor.
    costMonitorType String
    Type of cost monitor
    costVariancePercentage Double
    The cost variance percentage of the detected anomaly.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    feedbackResponse String
    The feedback response for the cost anomaly event.
    freeformTags Map<String,String>
    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 String
    The OCID of the Cost Anomaly Event.
    rootCauseDetail String
    The root cause details of the cost anomaly event.
    state String
    The current state of the cost anomaly event.
    systemTags Map<String,String>
    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"}
    targetResourceFilter String
    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.
    timeAnomalyEventDate String
    The event date of the anomaly event.
    timeCreated String
    The created time of the cost anomaly event.
    timeUpdated String
    The updated time of the cost anomaly event.
    compartmentId string
    The OCID of the compartment.
    costAnomalyEventId string
    costAnomalyName string
    The name of the associated cost monitor.
    costImpact number
    The cost impact of the detected anomaly.
    costMonitorId string
    The OCID of the associated cost monitor.
    costMonitorName string
    The name of the associated cost monitor.
    costMonitorType string
    Type of cost monitor
    costVariancePercentage number
    The cost variance percentage of the detected anomaly.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    feedbackResponse string
    The feedback response for the cost anomaly event.
    freeformTags {[key: string]: string}
    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 string
    The OCID of the Cost Anomaly Event.
    rootCauseDetail string
    The root cause details of the cost anomaly event.
    state string
    The current state of the cost anomaly event.
    systemTags {[key: string]: string}
    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"}
    targetResourceFilter string
    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.
    timeAnomalyEventDate string
    The event date of the anomaly event.
    timeCreated string
    The created time of the cost anomaly event.
    timeUpdated string
    The updated time of the cost anomaly event.
    compartment_id str
    The OCID of the compartment.
    cost_anomaly_event_id str
    cost_anomaly_name str
    The name of the associated cost monitor.
    cost_impact float
    The cost impact of the detected anomaly.
    cost_monitor_id str
    The OCID of the associated cost monitor.
    cost_monitor_name str
    The name of the associated cost monitor.
    cost_monitor_type str
    Type of cost monitor
    cost_variance_percentage float
    The cost variance percentage of the detected anomaly.
    defined_tags Mapping[str, str]
    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 str
    The feedback response for the cost anomaly event.
    freeform_tags Mapping[str, str]
    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 str
    The OCID of the Cost Anomaly Event.
    root_cause_detail str
    The root cause details of the cost anomaly event.
    state str
    The current state of the cost anomaly event.
    system_tags Mapping[str, str]
    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 str
    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 str
    The event date of the anomaly event.
    time_created str
    The created time of the cost anomaly event.
    time_updated str
    The updated time of the cost anomaly event.
    compartmentId String
    The OCID of the compartment.
    costAnomalyEventId String
    costAnomalyName String
    The name of the associated cost monitor.
    costImpact Number
    The cost impact of the detected anomaly.
    costMonitorId String
    The OCID of the associated cost monitor.
    costMonitorName String
    The name of the associated cost monitor.
    costMonitorType String
    Type of cost monitor
    costVariancePercentage Number
    The cost variance percentage of the detected anomaly.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    feedbackResponse String
    The feedback response for the cost anomaly event.
    freeformTags Map<String>
    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 String
    The OCID of the Cost Anomaly Event.
    rootCauseDetail String
    The root cause details of the cost anomaly event.
    state String
    The current state of the cost anomaly event.
    systemTags Map<String>
    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"}
    targetResourceFilter String
    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.
    timeAnomalyEventDate String
    The event date of the anomaly event.
    timeCreated String
    The created time of the cost anomaly event.
    timeUpdated String
    The updated time of the cost anomaly event.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate