1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Budget
  5. getCostAnomalyEventAnalytics
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 the list of Cost Anomaly Event Analytics in Oracle Cloud Infrastructure Budget service.

    Gets a list of Cost Anomaly Events analytics summary - aggregated metrics for a given time period.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCostAnomalyEventAnalytics = oci.Budget.getCostAnomalyEventAnalytics({
        compartmentId: compartmentId,
        costAnomalyMonitorId: testCostAnomalyMonitor.id,
        costImpact: costAnomalyEventAnalyticCostImpact,
        costImpactPercentage: costAnomalyEventAnalyticCostImpactPercentage,
        name: costAnomalyEventAnalyticName,
        regions: costAnomalyEventAnalyticRegion,
        targetTenantIds: testTargetTenant.id,
        timeAnomalyEventEndDate: costAnomalyEventAnalyticTimeAnomalyEventEndDate,
        timeAnomalyEventStartDate: costAnomalyEventAnalyticTimeAnomalyEventStartDate,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_cost_anomaly_event_analytics = oci.Budget.get_cost_anomaly_event_analytics(compartment_id=compartment_id,
        cost_anomaly_monitor_id=test_cost_anomaly_monitor["id"],
        cost_impact=cost_anomaly_event_analytic_cost_impact,
        cost_impact_percentage=cost_anomaly_event_analytic_cost_impact_percentage,
        name=cost_anomaly_event_analytic_name,
        regions=cost_anomaly_event_analytic_region,
        target_tenant_ids=test_target_tenant["id"],
        time_anomaly_event_end_date=cost_anomaly_event_analytic_time_anomaly_event_end_date,
        time_anomaly_event_start_date=cost_anomaly_event_analytic_time_anomaly_event_start_date)
    
    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.GetCostAnomalyEventAnalytics(ctx, &budget.GetCostAnomalyEventAnalyticsArgs{
    			CompartmentId:             compartmentId,
    			CostAnomalyMonitorId:      pulumi.StringRef(testCostAnomalyMonitor.Id),
    			CostImpact:                pulumi.Float64Ref(costAnomalyEventAnalyticCostImpact),
    			CostImpactPercentage:      pulumi.Float64Ref(costAnomalyEventAnalyticCostImpactPercentage),
    			Name:                      pulumi.StringRef(costAnomalyEventAnalyticName),
    			Regions:                   costAnomalyEventAnalyticRegion,
    			TargetTenantIds:           testTargetTenant.Id,
    			TimeAnomalyEventEndDate:   pulumi.StringRef(costAnomalyEventAnalyticTimeAnomalyEventEndDate),
    			TimeAnomalyEventStartDate: pulumi.StringRef(costAnomalyEventAnalyticTimeAnomalyEventStartDate),
    		}, 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 testCostAnomalyEventAnalytics = Oci.Budget.GetCostAnomalyEventAnalytics.Invoke(new()
        {
            CompartmentId = compartmentId,
            CostAnomalyMonitorId = testCostAnomalyMonitor.Id,
            CostImpact = costAnomalyEventAnalyticCostImpact,
            CostImpactPercentage = costAnomalyEventAnalyticCostImpactPercentage,
            Name = costAnomalyEventAnalyticName,
            Regions = costAnomalyEventAnalyticRegion,
            TargetTenantIds = testTargetTenant.Id,
            TimeAnomalyEventEndDate = costAnomalyEventAnalyticTimeAnomalyEventEndDate,
            TimeAnomalyEventStartDate = costAnomalyEventAnalyticTimeAnomalyEventStartDate,
        });
    
    });
    
    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.GetCostAnomalyEventAnalyticsArgs;
    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 testCostAnomalyEventAnalytics = BudgetFunctions.getCostAnomalyEventAnalytics(GetCostAnomalyEventAnalyticsArgs.builder()
                .compartmentId(compartmentId)
                .costAnomalyMonitorId(testCostAnomalyMonitor.id())
                .costImpact(costAnomalyEventAnalyticCostImpact)
                .costImpactPercentage(costAnomalyEventAnalyticCostImpactPercentage)
                .name(costAnomalyEventAnalyticName)
                .regions(costAnomalyEventAnalyticRegion)
                .targetTenantIds(testTargetTenant.id())
                .timeAnomalyEventEndDate(costAnomalyEventAnalyticTimeAnomalyEventEndDate)
                .timeAnomalyEventStartDate(costAnomalyEventAnalyticTimeAnomalyEventStartDate)
                .build());
    
        }
    }
    
    variables:
      testCostAnomalyEventAnalytics:
        fn::invoke:
          function: oci:Budget:getCostAnomalyEventAnalytics
          arguments:
            compartmentId: ${compartmentId}
            costAnomalyMonitorId: ${testCostAnomalyMonitor.id}
            costImpact: ${costAnomalyEventAnalyticCostImpact}
            costImpactPercentage: ${costAnomalyEventAnalyticCostImpactPercentage}
            name: ${costAnomalyEventAnalyticName}
            regions: ${costAnomalyEventAnalyticRegion}
            targetTenantIds: ${testTargetTenant.id}
            timeAnomalyEventEndDate: ${costAnomalyEventAnalyticTimeAnomalyEventEndDate}
            timeAnomalyEventStartDate: ${costAnomalyEventAnalyticTimeAnomalyEventStartDate}
    

    Using getCostAnomalyEventAnalytics

    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 getCostAnomalyEventAnalytics(args: GetCostAnomalyEventAnalyticsArgs, opts?: InvokeOptions): Promise<GetCostAnomalyEventAnalyticsResult>
    function getCostAnomalyEventAnalyticsOutput(args: GetCostAnomalyEventAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetCostAnomalyEventAnalyticsResult>
    def get_cost_anomaly_event_analytics(compartment_id: Optional[str] = None,
                                         cost_anomaly_monitor_id: Optional[str] = None,
                                         cost_impact: Optional[float] = None,
                                         cost_impact_percentage: Optional[float] = None,
                                         filters: Optional[Sequence[GetCostAnomalyEventAnalyticsFilter]] = None,
                                         name: Optional[str] = None,
                                         regions: Optional[Sequence[str]] = None,
                                         target_tenant_ids: Optional[Sequence[str]] = None,
                                         time_anomaly_event_end_date: Optional[str] = None,
                                         time_anomaly_event_start_date: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetCostAnomalyEventAnalyticsResult
    def get_cost_anomaly_event_analytics_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                         cost_anomaly_monitor_id: Optional[pulumi.Input[str]] = None,
                                         cost_impact: Optional[pulumi.Input[float]] = None,
                                         cost_impact_percentage: Optional[pulumi.Input[float]] = None,
                                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetCostAnomalyEventAnalyticsFilterArgs]]]] = None,
                                         name: Optional[pulumi.Input[str]] = None,
                                         regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                         target_tenant_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                         time_anomaly_event_end_date: Optional[pulumi.Input[str]] = None,
                                         time_anomaly_event_start_date: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetCostAnomalyEventAnalyticsResult]
    func GetCostAnomalyEventAnalytics(ctx *Context, args *GetCostAnomalyEventAnalyticsArgs, opts ...InvokeOption) (*GetCostAnomalyEventAnalyticsResult, error)
    func GetCostAnomalyEventAnalyticsOutput(ctx *Context, args *GetCostAnomalyEventAnalyticsOutputArgs, opts ...InvokeOption) GetCostAnomalyEventAnalyticsResultOutput

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

    public static class GetCostAnomalyEventAnalytics 
    {
        public static Task<GetCostAnomalyEventAnalyticsResult> InvokeAsync(GetCostAnomalyEventAnalyticsArgs args, InvokeOptions? opts = null)
        public static Output<GetCostAnomalyEventAnalyticsResult> Invoke(GetCostAnomalyEventAnalyticsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCostAnomalyEventAnalyticsResult> getCostAnomalyEventAnalytics(GetCostAnomalyEventAnalyticsArgs args, InvokeOptions options)
    public static Output<GetCostAnomalyEventAnalyticsResult> getCostAnomalyEventAnalytics(GetCostAnomalyEventAnalyticsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Budget/getCostAnomalyEventAnalytics:getCostAnomalyEventAnalytics
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    CostAnomalyMonitorId string
    The cost monitor ocid.
    CostImpact double
    cost impact (absolute) of the anomaly event.
    CostImpactPercentage double
    cost impact (percentage) of the anomaly event.
    Filters List<GetCostAnomalyEventAnalyticsFilter>
    Name string
    Unique, non-changeable resource name.
    Regions List<string>
    region of the anomaly event.
    TargetTenantIds List<string>
    The target tenantId ocid filter param.
    TimeAnomalyEventEndDate string
    endDate for anomaly event date.
    TimeAnomalyEventStartDate string
    startDate for anomaly event date.
    CompartmentId string
    The ID of the compartment in which to list resources.
    CostAnomalyMonitorId string
    The cost monitor ocid.
    CostImpact float64
    cost impact (absolute) of the anomaly event.
    CostImpactPercentage float64
    cost impact (percentage) of the anomaly event.
    Filters []GetCostAnomalyEventAnalyticsFilter
    Name string
    Unique, non-changeable resource name.
    Regions []string
    region of the anomaly event.
    TargetTenantIds []string
    The target tenantId ocid filter param.
    TimeAnomalyEventEndDate string
    endDate for anomaly event date.
    TimeAnomalyEventStartDate string
    startDate for anomaly event date.
    compartmentId String
    The ID of the compartment in which to list resources.
    costAnomalyMonitorId String
    The cost monitor ocid.
    costImpact Double
    cost impact (absolute) of the anomaly event.
    costImpactPercentage Double
    cost impact (percentage) of the anomaly event.
    filters List<GetCostAnomalyEventAnalyticsFilter>
    name String
    Unique, non-changeable resource name.
    regions List<String>
    region of the anomaly event.
    targetTenantIds List<String>
    The target tenantId ocid filter param.
    timeAnomalyEventEndDate String
    endDate for anomaly event date.
    timeAnomalyEventStartDate String
    startDate for anomaly event date.
    compartmentId string
    The ID of the compartment in which to list resources.
    costAnomalyMonitorId string
    The cost monitor ocid.
    costImpact number
    cost impact (absolute) of the anomaly event.
    costImpactPercentage number
    cost impact (percentage) of the anomaly event.
    filters GetCostAnomalyEventAnalyticsFilter[]
    name string
    Unique, non-changeable resource name.
    regions string[]
    region of the anomaly event.
    targetTenantIds string[]
    The target tenantId ocid filter param.
    timeAnomalyEventEndDate string
    endDate for anomaly event date.
    timeAnomalyEventStartDate string
    startDate for anomaly event date.
    compartment_id str
    The ID of the compartment in which to list resources.
    cost_anomaly_monitor_id str
    The cost monitor ocid.
    cost_impact float
    cost impact (absolute) of the anomaly event.
    cost_impact_percentage float
    cost impact (percentage) of the anomaly event.
    filters Sequence[GetCostAnomalyEventAnalyticsFilter]
    name str
    Unique, non-changeable resource name.
    regions Sequence[str]
    region of the anomaly event.
    target_tenant_ids Sequence[str]
    The target tenantId ocid filter param.
    time_anomaly_event_end_date str
    endDate for anomaly event date.
    time_anomaly_event_start_date str
    startDate for anomaly event date.
    compartmentId String
    The ID of the compartment in which to list resources.
    costAnomalyMonitorId String
    The cost monitor ocid.
    costImpact Number
    cost impact (absolute) of the anomaly event.
    costImpactPercentage Number
    cost impact (percentage) of the anomaly event.
    filters List<Property Map>
    name String
    Unique, non-changeable resource name.
    regions List<String>
    region of the anomaly event.
    targetTenantIds List<String>
    The target tenantId ocid filter param.
    timeAnomalyEventEndDate String
    endDate for anomaly event date.
    timeAnomalyEventStartDate String
    startDate for anomaly event date.

    getCostAnomalyEventAnalytics Result

    The following output properties are available:

    CompartmentId string
    CostAnomalyEventAnalyticCollections List<GetCostAnomalyEventAnalyticsCostAnomalyEventAnalyticCollection>
    The list of cost_anomaly_event_analytic_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    CostAnomalyMonitorId string
    CostImpact double
    CostImpactPercentage double
    Filters List<GetCostAnomalyEventAnalyticsFilter>
    Name string
    Regions List<string>
    TargetTenantIds List<string>
    TimeAnomalyEventEndDate string
    TimeAnomalyEventStartDate string
    compartmentId String
    costAnomalyEventAnalyticCollections List<GetCostAnomalyEventAnalyticsCostAnomalyEventAnalyticCollection>
    The list of cost_anomaly_event_analytic_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    costAnomalyMonitorId String
    costImpact Double
    costImpactPercentage Double
    filters List<GetCostAnomalyEventAnalyticsFilter>
    name String
    regions List<String>
    targetTenantIds List<String>
    timeAnomalyEventEndDate String
    timeAnomalyEventStartDate String
    compartmentId String
    costAnomalyEventAnalyticCollections List<Property Map>
    The list of cost_anomaly_event_analytic_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    costAnomalyMonitorId String
    costImpact Number
    costImpactPercentage Number
    filters List<Property Map>
    name String
    regions List<String>
    targetTenantIds List<String>
    timeAnomalyEventEndDate String
    timeAnomalyEventStartDate String

    Supporting Types

    GetCostAnomalyEventAnalyticsCostAnomalyEventAnalyticCollection

    items List<Property Map>
    The list of CostAnomalyEvent Analytic summary.

    GetCostAnomalyEventAnalyticsCostAnomalyEventAnalyticCollectionItem

    AverageCostImpact double
    The average cost impact of the anomaly events in the given time period.
    AverageCostVariance double
    The average cost variance of the anomaly events in the given time period.
    CostAnomalyEventAnalyticCount int
    The number of cost anomaly events in the given time period.
    AverageCostImpact float64
    The average cost impact of the anomaly events in the given time period.
    AverageCostVariance float64
    The average cost variance of the anomaly events in the given time period.
    CostAnomalyEventAnalyticCount int
    The number of cost anomaly events in the given time period.
    averageCostImpact Double
    The average cost impact of the anomaly events in the given time period.
    averageCostVariance Double
    The average cost variance of the anomaly events in the given time period.
    costAnomalyEventAnalyticCount Integer
    The number of cost anomaly events in the given time period.
    averageCostImpact number
    The average cost impact of the anomaly events in the given time period.
    averageCostVariance number
    The average cost variance of the anomaly events in the given time period.
    costAnomalyEventAnalyticCount number
    The number of cost anomaly events in the given time period.
    average_cost_impact float
    The average cost impact of the anomaly events in the given time period.
    average_cost_variance float
    The average cost variance of the anomaly events in the given time period.
    cost_anomaly_event_analytic_count int
    The number of cost anomaly events in the given time period.
    averageCostImpact Number
    The average cost impact of the anomaly events in the given time period.
    averageCostVariance Number
    The average cost variance of the anomaly events in the given time period.
    costAnomalyEventAnalyticCount Number
    The number of cost anomaly events in the given time period.

    GetCostAnomalyEventAnalyticsFilter

    Name string
    Unique, non-changeable resource name.
    Values List<string>
    Regex bool
    Name string
    Unique, non-changeable resource name.
    Values []string
    Regex bool
    name String
    Unique, non-changeable resource name.
    values List<String>
    regex Boolean
    name string
    Unique, non-changeable resource name.
    values string[]
    regex boolean
    name str
    Unique, non-changeable resource name.
    values Sequence[str]
    regex bool
    name String
    Unique, non-changeable resource name.
    values List<String>
    regex Boolean

    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